|
@@ -91,11 +91,12 @@ Implementation
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
- function MatchInstruction(const instr: tai; const op: TAsmOp): boolean;
|
|
|
|
|
|
+ function MatchInstruction(const instr: tai; const op: TAsmOp; const postfix: TOpPostfixes): boolean;
|
|
begin
|
|
begin
|
|
result :=
|
|
result :=
|
|
(instr.typ = ait_instruction) and
|
|
(instr.typ = ait_instruction) and
|
|
- (taicpu(instr).opcode = op);
|
|
|
|
|
|
+ (taicpu(instr).opcode = op) and
|
|
|
|
+ ((postfix = []) or (taicpu(instr).oppostfix in postfix));
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -190,7 +191,7 @@ Implementation
|
|
hp1 : tai;
|
|
hp1 : tai;
|
|
begin
|
|
begin
|
|
Result:=false;
|
|
Result:=false;
|
|
- if MatchInstruction(movp, A_MOV) and
|
|
|
|
|
|
+ if MatchInstruction(movp, A_MOV, [PF_None,PF_N]) and
|
|
(taicpu(p).ops>=3) and
|
|
(taicpu(p).ops>=3) and
|
|
{ We can't optimize if there is a shiftop }
|
|
{ We can't optimize if there is a shiftop }
|
|
(taicpu(movp).ops=2) and
|
|
(taicpu(movp).ops=2) and
|