mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-11 09:26:15 +02:00
* CallRet2* optimization may not misalign the stack, reported by C Western on fpc-devel
git-svn-id: trunk@44253 -
This commit is contained in:
parent
ac974c9ab7
commit
34be9e4643
@ -176,6 +176,7 @@ unit aoptx86;
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
cutils,verbose,
|
cutils,verbose,
|
||||||
|
systems,
|
||||||
globals,
|
globals,
|
||||||
cpuinfo,
|
cpuinfo,
|
||||||
procinfo,
|
procinfo,
|
||||||
@ -5902,7 +5903,9 @@ unit aoptx86;
|
|||||||
MatchInstruction(hp1,A_RET,[S_NO]) and
|
MatchInstruction(hp1,A_RET,[S_NO]) and
|
||||||
(taicpu(hp1).ops=0) then
|
(taicpu(hp1).ops=0) then
|
||||||
begin
|
begin
|
||||||
if cs_opt_level4 in current_settings.optimizerswitches then
|
if (cs_opt_level4 in current_settings.optimizerswitches) and
|
||||||
|
{ we might destroy stack alignment here if we do not do a call }
|
||||||
|
(target_info.stackalign<=sizeof(SizeUInt)) then
|
||||||
begin
|
begin
|
||||||
taicpu(p).opcode := A_JMP;
|
taicpu(p).opcode := A_JMP;
|
||||||
taicpu(p).is_jmp := true;
|
taicpu(p).is_jmp := true;
|
||||||
|
Loading…
Reference in New Issue
Block a user