[Bug target/34281] [4.3 Regression] ARM: varargs broken with 64bit parameters.
--- Comment #4 from jakub at gcc dot gnu dot org 2007-12-27 08:34 --- http://gcc.gnu.org/ml/gcc-testresults/2007-12/msg01313.html is with the patch I've just checked in, without the arm.c part there were additional FAILs for the newly added testcase, other than that identical results. -- jakub at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34281
[Bug target/34281] [4.3 Regression] ARM: varargs broken with 64bit parameters.
--- Comment #3 from jakub at gcc dot gnu dot org 2007-12-27 08:32 --- Subject: Bug 34281 Author: jakub Date: Thu Dec 27 08:31:54 2007 New Revision: 131196 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131196 Log: 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. Added: trunk/gcc/testsuite/gcc.c-torture/execute/20071213-1.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/arm/arm.c trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34281
[Bug target/34281] [4.3 Regression] ARM: varargs broken with 64bit parameters.
--- Comment #2 from jakub at gcc dot gnu dot org 2007-12-13 14:38 --- Not sure this should count as a regression, since in 3.4 this was using different ABI. If you compile with -mabi=atpcs which matches 3.4, it will work even in 4.3. Anyway, I think: --- gcc/config/arm/arm.c.jj 2007-12-11 00:23:29.0 +0100 +++ gcc/config/arm/arm.c2007-12-13 15:26:01.0 +0100 @@ -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 should fix this, let me poke around a little bit some more and add a testcase. I'll need some volunteer to bootstrap/regtest it though, no arms here... -- jakub at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org |dot org | Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2007-12-13 14:38:11 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34281
[Bug target/34281] [4.3 Regression] ARM: varargs broken with 64bit parameters.
--- Comment #1 from daney at gcc dot gnu dot org 2007-12-11 23:20 --- Verified that it works on MontaVista build 3.4.3. Still failing on: armv5tl-montavista-linuxeabi-g++ (GCC) 4.3.0 20071211 (experimental) [trunk revision 130777] -- daney at gcc dot gnu dot org changed: What|Removed |Added Known to fail||4.3.0 Known to work||3.4.3 Summary|[arm] varargs broken with |[4.3 Regression] ARM: |64bit parameters. |varargs broken with 64bit ||parameters. Target Milestone|--- |4.3.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34281