mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 19:09:23 +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
|
||||
cutils,verbose,
|
||||
systems,
|
||||
globals,
|
||||
cpuinfo,
|
||||
procinfo,
|
||||
@ -5902,7 +5903,9 @@ unit aoptx86;
|
||||
MatchInstruction(hp1,A_RET,[S_NO]) and
|
||||
(taicpu(hp1).ops=0) then
|
||||
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
|
||||
taicpu(p).opcode := A_JMP;
|
||||
taicpu(p).is_jmp := true;
|
||||
|
Loading…
Reference in New Issue
Block a user