Commit 6e290f11 by Fariborz Jahanian

Do not assign long long argument to memory in prologue if loaded in register.

OKed by Richard Henderson.

From-SVN: r76648
parent c353b8e3
...@@ -4374,6 +4374,7 @@ assign_parms (tree fndecl) ...@@ -4374,6 +4374,7 @@ assign_parms (tree fndecl)
int in_regs; int in_regs;
int partial = 0; int partial = 0;
int pretend_bytes = 0; int pretend_bytes = 0;
int loaded_in_reg = 0;
/* Set LAST_NAMED if this is last named arg before last /* Set LAST_NAMED if this is last named arg before last
anonymous args. */ anonymous args. */
...@@ -4745,6 +4746,7 @@ assign_parms (tree fndecl) ...@@ -4745,6 +4746,7 @@ assign_parms (tree fndecl)
emit_group_store (parmreg, entry_parm, TREE_TYPE (parm), emit_group_store (parmreg, entry_parm, TREE_TYPE (parm),
int_size_in_bytes (TREE_TYPE (parm))); int_size_in_bytes (TREE_TYPE (parm)));
SET_DECL_RTL (parm, parmreg); SET_DECL_RTL (parm, parmreg);
loaded_in_reg = 1;
if (regno >= max_parm_reg) if (regno >= max_parm_reg)
{ {
...@@ -4776,7 +4778,8 @@ assign_parms (tree fndecl) ...@@ -4776,7 +4778,8 @@ assign_parms (tree fndecl)
Handle calls that pass values in multiple non-contiguous Handle calls that pass values in multiple non-contiguous
locations. The Irix 6 ABI has examples of this. */ locations. The Irix 6 ABI has examples of this. */
if (GET_CODE (entry_parm) == REG 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 = int_size_in_bytes (TREE_TYPE (parm));
int size_stored = CEIL_ROUND (size, UNITS_PER_WORD); int size_stored = CEIL_ROUND (size, UNITS_PER_WORD);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment