mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 08:59:26 +02:00
+ Aarch64: implemented FMovFMov2FMov, not yet used
git-svn-id: trunk@47534 -
This commit is contained in:
parent
ef1ba48cc4
commit
4c0dac4864
@ -538,6 +538,27 @@ Implementation
|
||||
DebugMsg(SPeepholeOptimization + 'FMovFMov2FMov done', p);
|
||||
Result:=true;
|
||||
end;
|
||||
{ not enabled as apparently not happening
|
||||
if MatchOpType(taicpu(p),top_reg,top_reg) and
|
||||
GetNextInstructionUsingReg(p,hp1,taicpu(p).oper[0]^.reg) and
|
||||
MatchInstruction(hp1, [A_FSUB,A_FADD,A_FNEG,A_FMUL,A_FSQRT,A_FDIV,A_FABS], [PF_None]) and
|
||||
(MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) or
|
||||
((taicpu(hp1).ops=3) and MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[2]^))
|
||||
) and
|
||||
RegEndofLife(taicpu(p).oper[0]^.reg,taicpu(hp1)) and
|
||||
not(RegUsedBetween(taicpu(p).oper[0]^.reg,p,hp1)) then
|
||||
begin
|
||||
DebugMsg(SPeepholeOptimization + 'FMovFOp2FOp done', hp1);
|
||||
AllocRegBetween(taicpu(hp1).oper[1]^.reg,p,hp1,UsedRegs);
|
||||
if MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[1]^) then
|
||||
taicpu(hp1).oper[1]^.reg:=taicpu(p).oper[1]^.reg;
|
||||
if (taicpu(hp1).ops=3) and MatchOperand(taicpu(p).oper[0]^,taicpu(hp1).oper[2]^) then
|
||||
taicpu(hp1).oper[2]^.reg:=taicpu(p).oper[1]^.reg;
|
||||
RemoveCurrentP(p);
|
||||
Result:=true;
|
||||
exit;
|
||||
end;
|
||||
}
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user