Commit 26237a50 by Eric Botcazou Committed by Eric Botcazou

sparc.c (function_arg_vector_value): Remove 'base_mode' parameter.

	* config/sparc/sparc.c (function_arg_vector_value): Remove 'base_mode'
	parameter.  Use DImode for computing the number of registers.
	(function_arg): Adjust for above change.
	(function_value): Likewise.

From-SVN: r141921
parent dfc1a404
2008-11-16 Eric Botcazou <ebotcazou@adacore.com>
* config/sparc/sparc.c (function_arg_vector_value): Remove 'base_mode'
parameter. Use DImode for computing the number of registers.
(function_arg): Adjust for above change.
(function_value): Likewise.
2008-11-15 Zdenek Dvorak <ook@ucw.cz> 2008-11-15 Zdenek Dvorak <ook@ucw.cz>
PR tree-optimization/37950 PR tree-optimization/37950
......
...@@ -5138,15 +5138,13 @@ function_arg_union_value (int size, enum machine_mode mode, int slotno, ...@@ -5138,15 +5138,13 @@ function_arg_union_value (int size, enum machine_mode mode, int slotno,
Return an expression valid as a return value for the two macros Return an expression valid as a return value for the two macros
FUNCTION_ARG and FUNCTION_VALUE. FUNCTION_ARG and FUNCTION_VALUE.
SIZE is the size in bytes of the vector. SIZE is the size in bytes of the vector (at least 8 bytes).
BASE_MODE is the argument's base machine mode.
REGNO is the FP hard register the vector will be passed in. */ REGNO is the FP hard register the vector will be passed in. */
static rtx static rtx
function_arg_vector_value (int size, enum machine_mode base_mode, int regno) function_arg_vector_value (int size, int regno)
{ {
unsigned short base_mode_size = GET_MODE_SIZE (base_mode); int i, nregs = size / 8;
int nregs = size / base_mode_size, i;
rtx regs; rtx regs;
regs = gen_rtx_PARALLEL (BLKmode, rtvec_alloc (nregs)); regs = gen_rtx_PARALLEL (BLKmode, rtvec_alloc (nregs));
...@@ -5155,9 +5153,8 @@ function_arg_vector_value (int size, enum machine_mode base_mode, int regno) ...@@ -5155,9 +5153,8 @@ function_arg_vector_value (int size, enum machine_mode base_mode, int regno)
{ {
XVECEXP (regs, 0, i) XVECEXP (regs, 0, i)
= gen_rtx_EXPR_LIST (VOIDmode, = gen_rtx_EXPR_LIST (VOIDmode,
gen_rtx_REG (base_mode, regno), gen_rtx_REG (DImode, regno + 2*i),
GEN_INT (base_mode_size * i)); GEN_INT (i*8));
regno += base_mode_size / 4;
} }
return regs; return regs;
...@@ -5203,7 +5200,6 @@ function_arg (const struct sparc_args *cum, enum machine_mode mode, ...@@ -5203,7 +5200,6 @@ function_arg (const struct sparc_args *cum, enum machine_mode mode,
if (mode == BLKmode) if (mode == BLKmode)
return function_arg_vector_value (size, return function_arg_vector_value (size,
TYPE_MODE (TREE_TYPE (type)),
SPARC_FP_ARG_FIRST + 2*slotno); SPARC_FP_ARG_FIRST + 2*slotno);
else else
mclass = MODE_FLOAT; mclass = MODE_FLOAT;
...@@ -5619,7 +5615,6 @@ function_value (const_tree type, enum machine_mode mode, int incoming_p) ...@@ -5619,7 +5615,6 @@ function_value (const_tree type, enum machine_mode mode, int incoming_p)
if (mode == BLKmode) if (mode == BLKmode)
return function_arg_vector_value (size, return function_arg_vector_value (size,
TYPE_MODE (TREE_TYPE (type)),
SPARC_FP_ARG_FIRST); SPARC_FP_ARG_FIRST);
else else
mclass = MODE_FLOAT; mclass = MODE_FLOAT;
......
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