|
@@ -122,6 +122,27 @@ const
|
|
|
result := true;
|
|
|
end;
|
|
|
end;
|
|
|
+ A_SLWI:
|
|
|
+ begin
|
|
|
+ if getnextinstruction(p,next1) and
|
|
|
+ (next1.typ = ait_instruction) and
|
|
|
+ (taicpu(next1).opcode = A_RLWINM) and
|
|
|
+ (taicpu(next1).oper[0]^.reg = taicpu(p).oper[0]^.reg) and
|
|
|
+ (taicpu(next1).oper[1]^.reg = taicpu(p).oper[0]^.reg) then
|
|
|
+ begin
|
|
|
+ if (taicpu(next1).oper[2]^.val = 0) then
|
|
|
+ begin
|
|
|
+ { convert slwi to rlwinm and see if the rlwinm }
|
|
|
+ { optimization can do something with it }
|
|
|
+ taicpu(p).opcode := A_RLWINM;
|
|
|
+ taicpu(p).ops := 5;
|
|
|
+ taicpu(p).loadconst(2,taicpu(p).oper[2]^.val);
|
|
|
+ taicpu(p).loadconst(3,0);
|
|
|
+ taicpu(p).loadconst(4,31-taicpu(p).oper[2]^.val);
|
|
|
+ result := true;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
A_SRWI:
|
|
|
begin
|
|
|
if getnextinstruction(p,next1) and
|