aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2002-03-26 01:07:10 -0800
committerRichard Henderson <rth@gcc.gnu.org>2002-03-26 01:07:10 -0800
commit8e5fe23fb3a2296d7834907a59a5663baa2b9078 (patch)
tree610bd3f5517513c7ea3812759d180003d9f97ef1 /gcc
parent82cf684b41e3b26837a0df5d5b8ec3d38e5709a6 (diff)
downloadgcc-8e5fe23fb3a2296d7834907a59a5663baa2b9078.zip
gcc-8e5fe23fb3a2296d7834907a59a5663baa2b9078.tar.gz
gcc-8e5fe23fb3a2296d7834907a59a5663baa2b9078.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/config/alpha/alpha.c11
2 files changed, 17 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 89dc4be..15820db 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,11 @@
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.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 08f4568..6033479 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -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));