* do not generate exit code for arm (thumb and thumb-2) if a routine is marked as noreturn

git-svn-id: trunk@49506 -
This commit is contained in:
florian 2021-06-15 20:09:46 +00:00
parent 2c418b988c
commit 3f8aeadb91

View File

@ -3849,6 +3849,10 @@ unit cgcpu;
stackmisalignment: pint;
stack_parameters : Boolean;
begin
{ a routine not returning needs no exit code,
we trust this directive as arm thumb is normally used if small code shall be generated }
if po_noreturn in current_procinfo.procdef.procoptions then
exit;
if not(nostackframe) then
begin
stack_parameters:=current_procinfo.procdef.stack_tainting_parameter(calleeside);
@ -5052,6 +5056,10 @@ unit cgcpu;
LocalSize : longint;
stackmisalignment: pint;
begin
{ a routine not returning needs no exit code,
we trust this directive as arm thumb is normally used if small code shall be generated }
if po_noreturn in current_procinfo.procdef.procoptions then
exit;
if not(nostackframe) then
begin
stackmisalignment:=0;