mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +02:00
* x86: Minor change to lineinfo in "MovAdd2Lea" so debugging is more logical
This commit is contained in:
parent
fafb293426
commit
bba8558a1a
@ -9927,8 +9927,8 @@ unit aoptx86;
|
||||
|
||||
if not GetNextInstruction(InputInstr, NextInstr) or
|
||||
(
|
||||
{ The FLAGS register isn't always tracked properly, so do not
|
||||
perform this optimisation if a conditional statement follows }
|
||||
{ The FLAGS register isn't always tracked properly, so do not
|
||||
perform this optimisation if a conditional statement follows }
|
||||
not RegReadByInstruction(NR_DEFAULTFLAGS, NextInstr) and
|
||||
not RegUsedAfterInstruction(NR_DEFAULTFLAGS, NextInstr, TmpUsedRegs)
|
||||
) then
|
||||
@ -9951,6 +9951,10 @@ unit aoptx86;
|
||||
taicpu(p).opcode := A_LEA;
|
||||
taicpu(p).loadref(0, NewRef);
|
||||
|
||||
{ For the sake of debugging, have the line info match the
|
||||
arithmetic instruction rather than the MOV instruction }
|
||||
taicpu(p).fileinfo := taicpu(InputInstr).fileinfo;
|
||||
|
||||
RemoveInstruction(InputInstr);
|
||||
|
||||
Result := True;
|
||||
|
Loading…
Reference in New Issue
Block a user