+ RCallReg2RJmp optimization

git-svn-id: trunk@38318 -
This commit is contained in:
florian 2018-02-22 20:19:03 +00:00
parent 1d6e0743aa
commit 5b16a84de1

View File

@ -701,6 +701,20 @@ Implementation
asml.Remove(hp1);
hp1.Free;
result:=true;
end;
A_RCALL:
if (cs_opt_level4 in current_settings.optimizerswitches) and
GetNextInstruction(p,hp1) and
MatchInstruction(hp1,A_RET) then
begin
DebugMsg('Peephole RCallReg2RJmp performed', p);
taicpu(p).opcode:=A_RJMP;
asml.Remove(hp1);
hp1.Free;
result:=true;
end;
A_MOV: