diff options
author | Jim Wilson <wilson@cygnus.com> | 2000-08-01 22:23:56 +0000 |
---|---|---|
committer | Jim Wilson <wilson@gcc.gnu.org> | 2000-08-01 15:23:56 -0700 |
commit | 7d17b34de55c8cd8d83581036f8e87fae492db13 (patch) | |
tree | a13aa9c991ea3cccd3b7de7d874f4db84b698ade /gcc | |
parent | 0577bad8bf7781c9d0118b68e9d1bdc8b8d66d8f (diff) | |
download | gcc-7d17b34de55c8cd8d83581036f8e87fae492db13.zip gcc-7d17b34de55c8cd8d83581036f8e87fae492db13.tar.gz gcc-7d17b34de55c8cd8d83581036f8e87fae492db13.tar.bz2 |
Finish ABI change started by last patch, this time I tested it.
* 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.
From-SVN: r35413
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/config/ia64/ia64.c | 27 |
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)); |