Commit 29008b51 by Jim Wilson

*** empty log message ***

From-SVN: r1025
parent cbc3885d
......@@ -1485,15 +1485,27 @@ expand_call (exp, target, ignore)
else if (structure_value_addr)
{
if (target == 0 || GET_CODE (target) != MEM)
target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)),
memory_address (TYPE_MODE (TREE_TYPE (exp)),
structure_value_addr));
{
target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)),
memory_address (TYPE_MODE (TREE_TYPE (exp)),
structure_value_addr));
MEM_IN_STRUCT_P (target)
= (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE);
}
}
else if (pcc_struct_value)
{
if (target == 0)
target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)),
copy_to_reg (valreg));
{
target = gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)),
copy_to_reg (valreg));
MEM_IN_STRUCT_P (target)
= (TREE_CODE (TREE_TYPE (exp)) == ARRAY_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == RECORD_TYPE
|| TREE_CODE (TREE_TYPE (exp)) == UNION_TYPE);
}
else if (TYPE_MODE (TREE_TYPE (exp)) != BLKmode)
emit_move_insn (target, gen_rtx (MEM, TYPE_MODE (TREE_TYPE (exp)),
copy_to_reg (valreg)));
......
......@@ -1919,7 +1919,8 @@ i960_function_arg_advance (cum, mode, type, named)
i960_arg_size_and_align (mode, type, &size, &align);
if (named == 0 || size > 4 || cum->ca_nstackparms != 0
|| (size + ROUND (cum->ca_nregparms, align)) > NPARM_REGS)
|| (size + ROUND (cum->ca_nregparms, align)) > NPARM_REGS
|| MUST_PASS_IN_STACK (mode, type))
cum->ca_nstackparms = ROUND (cum->ca_nstackparms, align) + size;
else
cum->ca_nregparms = ROUND (cum->ca_nregparms, align) + size;
......@@ -1941,7 +1942,8 @@ i960_function_arg (cum, mode, type, named)
i960_arg_size_and_align (mode, type, &size, &align);
if (named == 0 || size > 4 || cum->ca_nstackparms != 0
|| (size + ROUND (cum->ca_nregparms, align)) > NPARM_REGS)
|| (size + ROUND (cum->ca_nregparms, align)) > NPARM_REGS
|| MUST_PASS_IN_STACK (mode, type))
{
cum->ca_nstackparms = ROUND (cum->ca_nstackparms, align);
ret = 0;
......
......@@ -790,8 +790,13 @@ struct cum_args { int ca_nregparms; int ca_nstackparms; };
/* Indicate the alignment boundary for an argument of the specified mode and
type. */
#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
((TYPE) && TYPE_ALIGN (TYPE) > PARM_BOUNDARY ? TYPE_ALIGN (TYPE) \
: PARM_BOUNDARY)
(((TYPE) != 0) \
? ((TYPE_ALIGN (TYPE) <= PARM_BOUNDARY) \
? PARM_BOUNDARY \
: TYPE_ALIGN (TYPE)) \
: ((GET_MODE_ALIGNMENT (MODE) <= PARM_BOUNDARY) \
? PARM_BOUNDARY \
: GET_MODE_ALIGNMENT (MODE)))
/* Determine where to put an argument to a function.
Value is zero to push the argument on the stack,
......
......@@ -3031,7 +3031,11 @@ locate_and_pad_parm (passed_mode, type, in_regs, fndecl,
area reserved for registers, skip that area. */
if (! in_regs)
{
#ifdef MAYBE_REG_PARM_STACK_SPACE
reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
#else
reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
#endif
if (reg_parm_stack_space > 0)
{
if (initial_offset_ptr->var)
......
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