From 44dca29926bd8364d5b013cbc6820fde67cf3e75 Mon Sep 17 00:00:00 2001 From: florian Date: Tue, 16 Aug 2022 20:26:01 +0200 Subject: [PATCH] + some debug messages added * cosmetics --- compiler/x86/aoptx86.pas | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/compiler/x86/aoptx86.pas b/compiler/x86/aoptx86.pas index 5b17ef5d98..d46d9ca7e8 100644 --- a/compiler/x86/aoptx86.pas +++ b/compiler/x86/aoptx86.pas @@ -6675,6 +6675,7 @@ unit aoptx86; end; taicpu(hp1).oper[0]^.reg := taicpu(p).oper[0]^.reg; taicpu(hp1).oper[1]^.reg := NR_ST; + DebugMsg(SPeepholeOptimization + 'FldF*p2F*',hp1); RemoveCurrentP(p, hp1); Result:=true; exit; @@ -6703,6 +6704,7 @@ unit aoptx86; faddp/ fmul st, st fmulp st, st1 (hp2) } begin + DebugMsg(SPeepholeOptimization + 'Fld/FstFldFaddp/Fmulp2Fld/FstFadd/Fmul',hp1); RemoveCurrentP(p, hp1); if (taicpu(hp2).opcode = A_FADDP) then taicpu(hp2).opcode := A_FADD @@ -6711,10 +6713,12 @@ unit aoptx86; taicpu(hp2).oper[1]^.reg := NR_ST; end else - { change to - fld/fst mem1 (hp1) fld/fst mem1 - fld mem1 (p) fld st} + { change to + fld/fst mem1 (hp1) fld/fst mem1 + fld mem1 (p) fld st + } begin + DebugMsg(SPeepholeOptimization + 'Fld/FstFld2Fld/FstFld',hp1); taicpu(p).changeopsize(S_FL); taicpu(p).loadreg(0,NR_ST); end @@ -6722,11 +6726,10 @@ unit aoptx86; begin case taicpu(hp2).opcode Of A_FMULP,A_FADDP,A_FSUBP,A_FDIVP,A_FSUBRP,A_FDIVRP: - { change to - fld/fst mem1 (hp1) fld/fst mem1 - fld mem2 (p) fxxx mem2 - fxxxp st, st1 (hp2) } - + { change to + fld/fst mem1 (hp1) fld/fst mem1 + fld mem2 (p) fxxx mem2 + fxxxp st, st1 (hp2) } begin case taicpu(hp2).opcode Of A_FADDP: taicpu(p).opcode := A_FADD; @@ -6738,6 +6741,7 @@ unit aoptx86; else internalerror(2019050533); end; + DebugMsg(SPeepholeOptimization + 'Fld/FstFldF*2Fld/FstF*',p); RemoveInstruction(hp2); end else