* x86: Minor change to lineinfo in "MovAdd2Lea" so debugging is more logical

This commit is contained in:
J. Gareth "Curious Kit" Moreton 2024-05-20 02:59:08 +01:00 committed by J. Gareth "Kit" Moreton
parent fafb293426
commit bba8558a1a

View File

@ -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;