mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 09:19:39 +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 }
 | 
			
		||||
  needslinkreg :=
 | 
			
		||||
    ((not (po_assembler in current_procinfo.procdef.procoptions)) and
 | 
			
		||||
    not(nostackframe) and
 | 
			
		||||
    (((not (po_assembler in current_procinfo.procdef.procoptions)) and
 | 
			
		||||
       ((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
 | 
			
		||||
     ((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
 | 
			
		||||
    ([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []);
 | 
			
		||||
     ([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []));
 | 
			
		||||
 | 
			
		||||
  a_reg_alloc(list, NR_STACK_POINTER_REG);
 | 
			
		||||
  a_reg_alloc(list, NR_R0);
 | 
			
		||||
@ -1590,10 +1591,11 @@ begin
 | 
			
		||||
 | 
			
		||||
  { determine whether we need to restore the link register }
 | 
			
		||||
  needslinkreg :=
 | 
			
		||||
    ((not (po_assembler in current_procinfo.procdef.procoptions)) and
 | 
			
		||||
    not(nostackframe) and
 | 
			
		||||
    (((not (po_assembler in current_procinfo.procdef.procoptions)) and
 | 
			
		||||
       ((pi_do_call in current_procinfo.flags) or (cs_profile in init_settings.moduleswitches))) or
 | 
			
		||||
     ((cs_opt_size in current_settings.optimizerswitches) and ((fprcount > 0) or (gprcount > 0))) or
 | 
			
		||||
    ([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []);
 | 
			
		||||
     ([cs_lineinfo, cs_debuginfo] * current_settings.moduleswitches <> []));
 | 
			
		||||
 | 
			
		||||
  { calculate stack frame }
 | 
			
		||||
  localsize := tppcprocinfo(current_procinfo).calc_stackframe_size(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user