This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch v2] Get rid of stack trampolines for nested functions (1/4)


> There are a couple of changes to the RTL expander for calls; they are
> supposed to be transparent but they might have tripped on a latent issue.

Tentative fix attached, I need to test it extensively in Ada though.

Btw, Ian, if the heap trampoline support is no longer used by the Go compiler, 
you might want to remove it from the middle-end.

-- 
Eric Botcazou
Index: calls.c
===================================================================
--- calls.c	(revision 243245)
+++ calls.c	(working copy)
@@ -3427,13 +3427,6 @@ expand_call (tree exp, rtx target, int i
       if (STRICT_ALIGNMENT)
 	store_unaligned_arguments_into_pseudos (args, num_actuals);
 
-      /* Prepare the address of the call.  This must be done before any
-	 register parameters is loaded for find_first_parameter_load to
-	 work properly in the presence of descriptors.  */
-      funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp,
-				     static_chain_value, &call_fusage,
-				     reg_parm_seen, flags);
-
       /* Now store any partially-in-registers parm.
 	 This is the last place a block-move can happen.  */
       if (reg_parm_seen)
@@ -3544,6 +3537,9 @@ expand_call (tree exp, rtx target, int i
 	}
 
       after_args = get_last_insn ();
+      funexp = prepare_call_address (fndecl ? fndecl : fntype, funexp,
+				     static_chain_value, &call_fusage,
+				     reg_parm_seen, flags);
       load_register_parameters (args, num_actuals, &call_fusage, flags,
 				pass == 0, &sibcall_failure);
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]