aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/ia64/ia64.c27
2 files changed, 26 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 7708394..2f9c4a6 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2000-08-01 Jim Wilson <wilson@cygnus.com>
+
+ * config/ia64/ia64.c (ia64_function_arg): Fix last change. Verify
+ type exists before using it. Use number of words as alignment
+ otherwise.
+ (ia64_function_arg_partial_nregs, ia64_function_arg_advance,
+ ia64_va_arg): Propagate ia64_function_args changes here.
+
2000-08-01 Richard Henderson <rth@cygnus.com>
* config/elfos.h (ASM_DECLARE_OBJECT_NAME): Care for null DECL.
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index 7c015f4..fb2a24c 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -1544,12 +1544,15 @@ ia64_function_arg (cum, mode, type, named, incoming)
/* Integer and float arguments larger than 8 bytes start at the next even
boundary. Aggregates larger than 8 bytes start at the next even boundary
- if the aggregate has 16 byte alignment. */
+ if the aggregate has 16 byte alignment. Net effect is that types with
+ alignment greater than 8 start at the next even boundary. */
/* ??? The ABI does not specify how to handle aggregates with alignment from
9 to 15 bytes, or greater than 16. We handle them all as if they had
16 byte alignment. Such aggregates can occur only if gcc extensions are
used. */
- if ((TYPE_ALIGN (type) > 8 * BITS_PER_UNIT) && (cum->words & 1))
+ if ((type ? (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
+ : (words > 1))
+ && (cum->words & 1))
offset = 1;
/* If all argument slots are used, then it must go on the stack. */
@@ -1690,8 +1693,11 @@ ia64_function_arg_partial_nregs (cum, mode, type, named)
/ UNITS_PER_WORD);
int offset = 0;
- /* Arguments larger than 8 bytes start at the next even boundary. */
- if (words > 1 && (cum->words & 1))
+ /* Arguments with alignment larger than 8 bytes start at the next even
+ boundary. */
+ if ((type ? (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
+ : (words > 1))
+ && (cum->words & 1))
offset = 1;
/* If all argument slots are used, then it must go on the stack. */
@@ -1729,8 +1735,11 @@ ia64_function_arg_advance (cum, mode, type, named)
if (cum->words >= MAX_ARGUMENT_SLOTS)
return;
- /* Arguments larger than 8 bytes start at the next even boundary. */
- if (words > 1 && (cum->words & 1))
+ /* Arguments with alignment larger than 8 bytes start at the next even
+ boundary. */
+ if ((type ? (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
+ : (words > 1))
+ && (cum->words & 1))
offset = 1;
cum->words += words + offset;
@@ -1832,9 +1841,9 @@ ia64_va_arg (valist, type)
HOST_WIDE_INT size;
tree t;
- /* Arguments larger than 8 bytes are 16 byte aligned. */
- size = int_size_in_bytes (type);
- if (size > UNITS_PER_WORD)
+ /* Arguments with alignment larger than 8 bytes start at the next even
+ boundary. */
+ if (TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
{
t = build (PLUS_EXPR, TREE_TYPE (valist), valist,
build_int_2 (2 * UNITS_PER_WORD - 1, 0));