mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-09 10:59:38 +01:00
* never store/restore lr for nostackframe routines, even if debugging
is turned on git-svn-id: trunk@6820 -
This commit is contained in:
parent
691ad89ba5
commit
f97d028e39
@ -1450,10 +1450,11 @@ begin
|
|||||||
|
|
||||||
{ determine whether we need to save the link register }
|
{ determine whether we need to save the link register }
|
||||||
needslinkreg :=
|
needslinkreg :=
|
||||||
((not (po_assembler in current_procinfo.procdef.procoptions)) and
|
not(nostackframe) and
|
||||||
((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
|
(((not (po_assembler in current_procinfo.procdef.procoptions)) and
|
||||||
((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
|
((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
|
||||||
([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []);
|
((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
|
||||||
|
([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []));
|
||||||
|
|
||||||
a_reg_alloc(list, NR_STACK_POINTER_REG);
|
a_reg_alloc(list, NR_STACK_POINTER_REG);
|
||||||
a_reg_alloc(list, NR_R0);
|
a_reg_alloc(list, NR_R0);
|
||||||
@ -1590,10 +1591,11 @@ begin
|
|||||||
|
|
||||||
{ determine whether we need to restore the link register }
|
{ determine whether we need to restore the link register }
|
||||||
needslinkreg :=
|
needslinkreg :=
|
||||||
((not (po_assembler in current_procinfo.procdef.procoptions)) and
|
not(nostackframe) and
|
||||||
((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
|
(((not (po_assembler in current_procinfo.procdef.procoptions)) and
|
||||||
((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
|
((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
|
||||||
([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []);
|
((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
|
||||||
|
([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []));
|
||||||
|
|
||||||
{ calculate stack frame }
|
{ calculate stack frame }
|
||||||
localsize := tppcprocinfo(current_procinfo).calc_stackframe_size(
|
localsize := tppcprocinfo(current_procinfo).calc_stackframe_size(
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user