diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2007-11-28 01:20:34 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2007-11-27 17:20:34 -0800 |
commit | 87300e8c8102f83f8770da9a1d8758970bf28949 (patch) | |
tree | 38574da2654ea6e300788a15041034e29ab8a2f2 | |
parent | 08203c44a36583c34b12551d1d7f7a2429b6fb2c (diff) | |
download | gcc-87300e8c8102f83f8770da9a1d8758970bf28949.zip gcc-87300e8c8102f83f8770da9a1d8758970bf28949.tar.gz gcc-87300e8c8102f83f8770da9a1d8758970bf28949.tar.bz2 |
re PR target/34001 (Incorrect x86 fastcall behavior)
2007-11-27 H.J. Lu <hongjiu.lu@intel.com>
Joey Ye <joey.ye@intel.com>
PR target/34001
* config/i386/i386.c (function_arg_32): Don't pass aggregate
arguments in ECX/EDX for fastcall.
Co-Authored-By: Joey Ye <joey.ye@intel.com>
From-SVN: r130488
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config/i386/i386.c | 7 |
2 files changed, 12 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a4c11dd..9262b26 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2007-11-27 H.J. Lu <hongjiu.lu@intel.com> + Joey Ye <joey.ye@intel.com> + + PR target/34001 + * config/i386/i386.c (function_arg_32): Don't pass aggregate + arguments in ECX/EDX for fastcall. + 2007-11-28 Rask Ingemann Lambertsen <rask@sygehus.dk> * config/i386/linux.h (CRT_GET_RFIB_DATA): Add Intel syntax inline diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index a81ee3d0..afed858 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -4253,10 +4253,13 @@ function_arg_32 (CUMULATIVE_ARGS *cum, enum machine_mode mode, int regno = cum->regno; /* Fastcall allocates the first two DWORD (SImode) or - smaller arguments to ECX and EDX. */ + smaller arguments to ECX and EDX if it isn't an + aggregate type . */ if (cum->fastcall) { - if (mode == BLKmode || mode == DImode) + if (mode == BLKmode + || mode == DImode + || (type && AGGREGATE_TYPE_P (type))) break; /* ECX not EAX is the first allocated register. */ |