mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-02 19:22:05 +01:00
* improved TX86AsmOptimizer.OptPass1MOVXX
This commit is contained in:
parent
4610980f2e
commit
10fcae34a9
@ -4094,7 +4094,8 @@ unit aoptx86;
|
||||
Result:=false;
|
||||
if taicpu(p).ops <> 2 then
|
||||
exit;
|
||||
if GetNextInstruction(p,hp1) then
|
||||
if ((taicpu(p).oper[1]^.typ=top_reg) and GetNextInstructionUsingReg(p,hp1,taicpu(p).oper[1]^.reg)) or
|
||||
GetNextInstruction(p,hp1) then
|
||||
begin
|
||||
if MatchInstruction(hp1,taicpu(p).opcode,[taicpu(p).opsize]) and
|
||||
(taicpu(hp1).ops = 2) then
|
||||
@ -4129,7 +4130,8 @@ unit aoptx86;
|
||||
Result:=true;
|
||||
exit;
|
||||
end
|
||||
else if (taicpu(hp1).oper[1]^.typ<>top_ref) or (not(vol_write in taicpu(hp1).oper[1]^.ref^.volatility)) then
|
||||
else if (taicpu(hp1).oper[1]^.typ<>top_ref) or (not(vol_write in taicpu(hp1).oper[1]^.ref^.volatility)) and
|
||||
(taicpu(hp1).oper[0]^.typ<>top_ref) or (not(vol_read in taicpu(hp1).oper[0]^.ref^.volatility)) then
|
||||
begin
|
||||
DebugMsg(SPeepholeOptimization + 'MovXXMovXX2MoVXX 1 done',p);
|
||||
RemoveInstruction(hp1);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user