summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2004-05-17 21:33:32 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2004-05-17 21:33:32 +0000
commita7c8e0ae4a4b349099d02bc9d56bcf1979c0f0c3 (patch)
tree97fec65d383f4166f8d6376fd13631584fc35c3d /gnu
parentdabfd0a2b923dc8dd2fab68d1669102a0aa4352c (diff)
Make FUNCTION_ARG_ADVANCE() really match FUNCTION_ARG() register usage.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/egcs/gcc/config/m88k/m88k.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/gnu/egcs/gcc/config/m88k/m88k.c b/gnu/egcs/gcc/config/m88k/m88k.c
index 2c06349c40b..d504e9719fd 100644
--- a/gnu/egcs/gcc/config/m88k/m88k.c
+++ b/gnu/egcs/gcc/config/m88k/m88k.c
@@ -2564,8 +2564,7 @@ m88k_function_arg (args_so_far, mode, type, named)
return (rtx) 0; /* args have exhausted registers */
else if (mode == BLKmode
- && (TYPE_ALIGN (type) != BITS_PER_WORD
- || bytes != UNITS_PER_WORD))
+ && (TYPE_ALIGN (type) != BITS_PER_WORD || bytes != UNITS_PER_WORD))
return (rtx) 0;
return gen_rtx (REG,
@@ -2590,10 +2589,16 @@ m88k_function_arg_advance (args_so_far, mode, type, named)
if ((type != 0) &&
(TREE_CODE(type) == RECORD_TYPE || TREE_CODE(type) == UNION_TYPE))
mode = BLKmode;
+
bytes = (mode != BLKmode) ? GET_MODE_SIZE (mode) : int_size_in_bytes(type);
if ((*args_so_far & 1) && (mode == DImode || mode == DFmode
|| ((type != 0) && TYPE_ALIGN (type) > BITS_PER_WORD)))
(*args_so_far)++;
+
+ if (mode == BLKmode
+ && (TYPE_ALIGN (type) != BITS_PER_WORD || bytes != UNITS_PER_WORD))
+ return;
+
(*args_so_far) += (bytes + UNITS_PER_WORD - 1) / UNITS_PER_WORD;
}