mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-04 20:58:55 +02:00
* AArch64 and i386: omit exit stackframe, same as r44191 for x86-64
git-svn-id: trunk@44196 -
This commit is contained in:
parent
3188dc18d4
commit
9989d408fd
@ -1742,7 +1742,14 @@ implementation
|
||||
regsstored: boolean;
|
||||
sr: tsuperregister;
|
||||
begin
|
||||
if not nostackframe then
|
||||
if not(nostackframe) and
|
||||
{ we do not need an exit stack frame when we never return
|
||||
|
||||
* the final ret is left so the peephole optimizer can easily do call/ret -> jmp or call conversions
|
||||
* the entry stack frame must be normally generated because the subroutine could be still left by
|
||||
an exception and then the unwinding code might need to restore the registers stored by the entry code
|
||||
}
|
||||
not(po_noreturn in current_procinfo.procdef.procoptions) then
|
||||
begin
|
||||
{ if no registers have been stored, we don't have to subtract the
|
||||
allocated temp space from the stack pointer }
|
||||
|
@ -308,7 +308,14 @@ unit cgcpu;
|
||||
list.concat(Taicpu.op_none(A_EMMS,S_NO));
|
||||
|
||||
{ remove stackframe }
|
||||
if not nostackframe then
|
||||
if not(nostackframe) and
|
||||
{ we do not need an exit stack frame when we never return
|
||||
|
||||
* the final ret is left so the peephole optimizer can easily do call/ret -> jmp or call conversions
|
||||
* the entry stack frame must be normally generated because the subroutine could be still left by
|
||||
an exception and then the unwinding code might need to restore the registers stored by the entry code
|
||||
}
|
||||
not(po_noreturn in current_procinfo.procdef.procoptions) then
|
||||
begin
|
||||
if (current_procinfo.framepointer=NR_STACK_POINTER_REG) or
|
||||
(current_procinfo.procdef.proctypeoption=potype_exceptfilter) then
|
||||
|
Loading…
Reference in New Issue
Block a user