mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-30 20:11:29 +01:00
* take care of po_noreturn in more cases
git-svn-id: trunk@47623 -
This commit is contained in:
parent
ff87df7581
commit
5ca2356638
@ -1884,6 +1884,11 @@ unit cgcpu;
|
|||||||
ref : TReference;
|
ref : TReference;
|
||||||
ref2: TReference;
|
ref2: TReference;
|
||||||
begin
|
begin
|
||||||
|
{ if a subroutine is marked as non-returning, we do
|
||||||
|
not generate any exit code, so we really trust the noreturn directive
|
||||||
|
}
|
||||||
|
if po_noreturn in current_procinfo.procdef.procoptions then
|
||||||
|
exit;
|
||||||
if not nostackframe then
|
if not nostackframe then
|
||||||
begin
|
begin
|
||||||
list.concat(taicpu.op_reg(A_UNLK,S_NO,NR_FRAME_POINTER_REG));
|
list.concat(taicpu.op_reg(A_UNLK,S_NO,NR_FRAME_POINTER_REG));
|
||||||
|
|||||||
@ -870,6 +870,8 @@ implementation
|
|||||||
|
|
||||||
procedure gen_save_used_regs(list:TAsmList);
|
procedure gen_save_used_regs(list:TAsmList);
|
||||||
begin
|
begin
|
||||||
|
if po_noreturn in current_procinfo.procdef.procoptions then
|
||||||
|
exit;
|
||||||
{ Pure assembler routines need to save the registers themselves }
|
{ Pure assembler routines need to save the registers themselves }
|
||||||
if (po_assembler in current_procinfo.procdef.procoptions) then
|
if (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
exit;
|
exit;
|
||||||
@ -880,6 +882,8 @@ implementation
|
|||||||
|
|
||||||
procedure gen_restore_used_regs(list:TAsmList);
|
procedure gen_restore_used_regs(list:TAsmList);
|
||||||
begin
|
begin
|
||||||
|
if po_noreturn in current_procinfo.procdef.procoptions then
|
||||||
|
exit;
|
||||||
{ Pure assembler routines need to save the registers themselves }
|
{ Pure assembler routines need to save the registers themselves }
|
||||||
if (po_assembler in current_procinfo.procdef.procoptions) then
|
if (po_assembler in current_procinfo.procdef.procoptions) then
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user