va_arg on complex float and complex int is currently broken. non-va_arg long double is too if split over reg and stack. This bug report is to remind me to fix this for 3.4.1
Subject: Bug 14567 CVSROOT: /cvs/gcc Module name: gcc Changes by: amodra@gcc.gnu.org 2004-03-13 07:14:13 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.c rs6000.h Log message: PR target/14567 * config/rs6000/rs6000.h (UNITS_PER_ARG, RS6000_ARG_SIZE): Delete. (HARD_REGNO_MODE_OK): Disallow TFmode for fp31. * config/rs6000/rs6000.c (rs6000_arg_size): New function. Update all users of RS6000_ARG_SIZE. (function_arg_advance): Count fregno using mode size. (function_arg): Handle long double split over regs and memory. (function_arg_partial_nregs): Likewise. (rs6000_va_arg): Repackage complex args. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.3155&r2=2.3156 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&r1=1.607&r2=1.608 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&r1=1.316&r2=1.317
Confirmed.
Patch at http://gcc.gnu.org/ml/gcc-patches/2004-02/msg00632.html Patch committed to mainline is slightly different to accommodate other changes to function_arg.
I think this changes the alignment of structs passing on powerpc-apple-darwin. The testcase libffi/ testsuite/libffi.call/cls_3_1byte.c fails now.
This patch is not responsible for the changes in the alignment mentioned by Andrew. (14262 is) Everything ok.
Subject: Bug 14567 CVSROOT: /cvs/gcc Module name: gcc Branch: gcc-3_4-branch Changes by: amodra@gcc.gnu.org 2004-06-10 05:43:54 Modified files: gcc : ChangeLog gcc/config/rs6000: rs6000.c rs6000.h Log message: PR target/14567 2004-03-13 Alan Modra <amodra@bigpond.net.au> * config/rs6000/rs6000.h (UNITS_PER_ARG, RS6000_ARG_SIZE): Delete. (HARD_REGNO_MODE_OK): Disallow TFmode for fp31. * config/rs6000/rs6000.c (rs6000_arg_size): New function. Update all users of RS6000_ARG_SIZE. (function_arg_advance): Count fregno using mode size. (function_arg): Handle long double split over regs and memory. (function_arg_partial_nregs): Likewise. (rs6000_va_arg): Repackage complex args. 2004-02-23 Fariborz Jahanian <fjahanian@apple.com> * config/rs6000/rs6000.c (function_arg): call to rs6000_mixed_function_arg for DFmode moved to allow normal DFmode incoming register assignment. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=2.2326.2.485&r2=2.2326.2.486 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.576.2.20&r2=1.576.2.21 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/config/rs6000/rs6000.h.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.306.4.4&r2=1.306.4.5
Fixed