* remove useless mov instructions

git-svn-id: trunk@30522 -
This commit is contained in:
florian 2015-04-09 21:57:02 +00:00
parent ff20a3c7bc
commit a4c7103033

View File

@ -271,6 +271,20 @@ Implementation
p:=hp1;
result:=true;
end
{ remove
mov reg0,reg0
}
else if (taicpu(p).ops=2) and
(taicpu(p).oper[0]^.typ = top_reg) and
(taicpu(p).oper[1]^.typ = top_reg) and
(taicpu(p).oper[0]^.reg = taicpu(p).oper[1]^.reg) then
begin
GetNextInstruction(p,hp1);
asml.remove(p);
p.free;
p:=hp1;
result:=true;
end
{ fold
mov reg2,reg0
mov reg3,reg1
@ -302,7 +316,7 @@ Implementation
taicpu(p).opcode:=A_MOVW;
asml.remove(hp1);
hp1.free;
result := true;
result:=true;
end;
end;
end;