Commit 87300e8c by H.J. Lu Committed by H.J. Lu

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
parent 08203c44
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> 2007-11-28 Rask Ingemann Lambertsen <rask@sygehus.dk>
* config/i386/linux.h (CRT_GET_RFIB_DATA): Add Intel syntax inline * config/i386/linux.h (CRT_GET_RFIB_DATA): Add Intel syntax inline
...@@ -4253,10 +4253,13 @@ function_arg_32 (CUMULATIVE_ARGS *cum, enum machine_mode mode, ...@@ -4253,10 +4253,13 @@ function_arg_32 (CUMULATIVE_ARGS *cum, enum machine_mode mode,
int regno = cum->regno; int regno = cum->regno;
/* Fastcall allocates the first two DWORD (SImode) or /* 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 (cum->fastcall)
{ {
if (mode == BLKmode || mode == DImode) if (mode == BLKmode
|| mode == DImode
|| (type && AGGREGATE_TYPE_P (type)))
break; break;
/* ECX not EAX is the first allocated register. */ /* ECX not EAX is the first allocated register. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment