Commit 8e5fe23f by Richard Henderson Committed by Richard Henderson

alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK types from the normal argument frame.

        * config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK
        types from the normal argument frame.

From-SVN: r51380
parent 82cf684b
2002-03-26 Richard Henderson <rth@redhat.com>
* expr.h (ADD_PARM_SIZE): Cast INC to ssizetype.
(SUB_PARM_SIZE): Cast DEC to ssizetype.
* config/alpha/alpha.c (alpha_va_arg): Read MUST_PASS_IN_STACK
types from the normal argument frame.
* config/sparc/sparc.c (function_arg_pass_by_reference): Pass
variable sized objects by reference.
(sparc_va_arg): Receive them by reference too.
......
......@@ -5812,6 +5812,17 @@ alpha_va_arg (valist, type)
offset_field = build (COMPONENT_REF, TREE_TYPE (offset_field),
valist, offset_field);
/* If the type could not be passed in registers, skip the block
reserved for the registers. */
if (MUST_PASS_IN_STACK (TYPE_MODE (type), type))
{
t = build (MODIFY_EXPR, TREE_TYPE (offset_field), offset_field,
build (MAX_EXPR, TREE_TYPE (offset_field),
offset_field, build_int_2 (6*8, 0)));
TREE_SIDE_EFFECTS (t) = 1;
expand_expr (t, const0_rtx, VOIDmode, EXPAND_NORMAL);
}
wide_type = make_signed_type (64);
wide_ofs = save_expr (build1 (CONVERT_EXPR, wide_type, offset_field));
......
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