mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* x86: Fixed attributes of the LEAVE instruction - it reads EBP.
This fixes crashes with -O3s in some cases due to an incorrect peephole optimization.
This commit is contained in:
parent
e121a753e1
commit
4a7a113a30
@ -169,7 +169,7 @@
|
|||||||
(Ch: [Ch_All]),
|
(Ch: [Ch_All]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_RWESP, Ch_WEBP]),
|
(Ch: [Ch_RWESP, Ch_RWEBP]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: []),
|
(Ch: []),
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
(Ch: [Ch_All]),
|
(Ch: [Ch_All]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_RWESP, Ch_WEBP]),
|
(Ch: [Ch_RWESP, Ch_RWEBP]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: []),
|
(Ch: []),
|
||||||
|
@ -3229,6 +3229,7 @@ unit aoptx86;
|
|||||||
RegLoadedWithNewValue(CurrentReg, hp2) or
|
RegLoadedWithNewValue(CurrentReg, hp2) or
|
||||||
not RegUsedAfterInstruction(CurrentReg, hp2, TmpUsedRegs) then
|
not RegUsedAfterInstruction(CurrentReg, hp2, TmpUsedRegs) then
|
||||||
begin
|
begin
|
||||||
|
RegUsedAfterInstruction(CurrentReg, hp2, TmpUsedRegs);
|
||||||
{ We can remove the original MOV }
|
{ We can remove the original MOV }
|
||||||
DebugMsg(SPeepholeOptimization + 'Mov2Nop 3b done',p);
|
DebugMsg(SPeepholeOptimization + 'Mov2Nop 3b done',p);
|
||||||
RemoveCurrentp(p, hp1);
|
RemoveCurrentp(p, hp1);
|
||||||
|
@ -942,7 +942,7 @@ reg16|32,mem \320\1\xC5\110 8086,NOX86_64
|
|||||||
reg16|32|64,mem \320\1\x8D\110 8086
|
reg16|32|64,mem \320\1\x8D\110 8086
|
||||||
|
|
||||||
[LEAVE]
|
[LEAVE]
|
||||||
(Ch_RWESP, Ch_WEBP)
|
(Ch_RWESP, Ch_RWEBP)
|
||||||
void \1\xC9 186
|
void \1\xC9 186
|
||||||
|
|
||||||
[LES,lesX]
|
[LES,lesX]
|
||||||
|
@ -160,7 +160,7 @@
|
|||||||
(Ch: [Ch_Wop2, Ch_WZeroFlag]),
|
(Ch: [Ch_Wop2, Ch_WZeroFlag]),
|
||||||
(Ch: [Ch_All]),
|
(Ch: [Ch_All]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: [Ch_RWESP, Ch_WEBP]),
|
(Ch: [Ch_RWESP, Ch_RWEBP]),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
(Ch: []),
|
(Ch: []),
|
||||||
(Ch: [Ch_Wop2, Ch_Rop1]),
|
(Ch: [Ch_Wop2, Ch_Rop1]),
|
||||||
|
Loading…
Reference in New Issue
Block a user