diff options
author | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-01 22:23:56 +0000 |
---|---|---|
committer | wilson <wilson@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-01 22:23:56 +0000 |
commit | 8c75b6d416f92cf7fe17d6762d4c988de29e6dc3 (patch) | |
tree | a13aa9c991ea3cccd3b7de7d874f4db84b698ade | |
parent | 313d969b6af36e28d2dfe4dabb2c210d0f0ded63 (diff) | |
download | gcc-8c75b6d416f92cf7fe17d6762d4c988de29e6dc3.tar.gz |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35413 138bc75d-0d04-0410-961f-82ee72b054a4
-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 77083945b21..2f9c4a62e15 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 7c015f47c27..fb2a24c02c4 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)); |