From 6e290f11559f1bebdb91b7ff556ef160ee241d1e Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 26 Jan 2004 17:43:46 +0000 Subject: [PATCH] Do not assign long long argument to memory in prologue if loaded in register. OKed by Richard Henderson. From-SVN: r76648 --- gcc/function.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gcc/function.c b/gcc/function.c index f4c90b5cdc3..5af0a901cde 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4374,6 +4374,7 @@ assign_parms (tree fndecl) int in_regs; int partial = 0; int pretend_bytes = 0; + int loaded_in_reg = 0; /* Set LAST_NAMED if this is last named arg before last anonymous args. */ @@ -4745,6 +4746,7 @@ assign_parms (tree fndecl) emit_group_store (parmreg, entry_parm, TREE_TYPE (parm), int_size_in_bytes (TREE_TYPE (parm))); SET_DECL_RTL (parm, parmreg); + loaded_in_reg = 1; if (regno >= max_parm_reg) { @@ -4776,7 +4778,8 @@ assign_parms (tree fndecl) Handle calls that pass values in multiple non-contiguous locations. The Irix 6 ABI has examples of this. */ if (GET_CODE (entry_parm) == REG - || GET_CODE (entry_parm) == PARALLEL) + || (GET_CODE (entry_parm) == PARALLEL + && (!loaded_in_reg || !optimize))) { int size = int_size_in_bytes (TREE_TYPE (parm)); int size_stored = CEIL_ROUND (size, UNITS_PER_WORD); -- 2.30.2