+ AddAdc2Add

+ SubSbc2Sub

git-svn-id: trunk@38485 -
This commit is contained in:
florian 2018-03-10 21:53:43 +00:00
parent 3a81ccf48b
commit 52cb8fbb98

View File

@ -546,6 +546,38 @@ Implementation
result:=true;
end;
end;
A_ADD:
begin
if (taicpu(p).oper[1]^.reg=NR_R1) and
GetNextInstruction(p, hp1) and
MatchInstruction(hp1,A_ADC) then
begin
DebugMsg('Peephole AddAdc2Add performed', p);
taicpu(hp1).opcode:=A_ADD;
asml.Remove(p);
p.Free;
p:=hp1;
result:=true;
end;
end;
A_SUB:
begin
if (taicpu(p).oper[1]^.reg=NR_R1) and
GetNextInstruction(p, hp1) and
MatchInstruction(hp1,A_SBC) then
begin
DebugMsg('Peephole SubSbc2Sub performed', p);
taicpu(hp1).opcode:=A_SUB;
asml.Remove(p);
p.Free;
p:=hp1;
result:=true;
end;
end;
A_CLR:
begin
{ turn the common