diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-27 08:31:54 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-12-27 08:31:54 +0000 |
commit | 4ac850f83ea1fc582346a032912f7c45089ff0d2 (patch) | |
tree | 6266007d280b8018d3b7a82c90f432b944d112df /gcc/config/arm | |
parent | 60dbe80112ea8b85a12e2421c5136ea72ca08eaf (diff) | |
download | gcc-4ac850f83ea1fc582346a032912f7c45089ff0d2.tar.gz |
PR target/34281
* config/arm/arm.c (arm_setup_incoming_varargs): If last named
argument needs double word alignment and cum->nregs is odd, account
for the inserted padding.
* gcc.c-torture/execute/20071213-1.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/arm')
-rw-r--r-- | gcc/config/arm/arm.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c index 5b3b7035c15..ea9719a5d6e 100644 --- a/gcc/config/arm/arm.c +++ b/gcc/config/arm/arm.c @@ -17765,14 +17765,20 @@ arm_output_load_gr (rtx *operands) static void arm_setup_incoming_varargs (CUMULATIVE_ARGS *cum, - enum machine_mode mode ATTRIBUTE_UNUSED, - tree type ATTRIBUTE_UNUSED, + enum machine_mode mode, + tree type, int *pretend_size, int second_time ATTRIBUTE_UNUSED) { + int nregs = cum->nregs; + if (nregs & 1 + && ARM_DOUBLEWORD_ALIGN + && arm_needs_doubleword_align (mode, type)) + nregs++; + cfun->machine->uses_anonymous_args = 1; - if (cum->nregs < NUM_ARG_REGS) - *pretend_size = (NUM_ARG_REGS - cum->nregs) * UNITS_PER_WORD; + if (nregs < NUM_ARG_REGS) + *pretend_size = (NUM_ARG_REGS - nregs) * UNITS_PER_WORD; } /* Return nonzero if the CONSUMER instruction (a store) does not need |