Commit 30ee9dbf by H.J. Lu Committed by H.J. Lu

Warn passing SSE argument ABI change for -m64

gcc/

	PR target/53425
	* config/i386/i386.c (type_natural_mode): Warn passing SSE
	vector argument without SSE enabled changes the ABI.

gcc/testsuite/

	PR target/53425
	* gcc.target/i386/pr53425-1.c: New file.
	* gcc.target/i386/pr53425-2.c: Likewise.

From-SVN: r187711
parent 21039e0e
2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/53425
* config/i386/i386.c (type_natural_mode): Warn passing SSE
vector argument without SSE enabled changes the ABI.
2012-05-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53408
......
......@@ -5827,6 +5827,20 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum)
}
return TYPE_MODE (type);
}
else if ((size == 8 || size == 16) && !TARGET_SSE)
{
static bool warnedsse;
if (cum
&& !warnedsse
&& cum->warn_sse)
{
warnedsse = true;
warning (0, "SSE vector argument without SSE "
"enabled changes the ABI");
}
return mode;
}
else
return mode;
}
2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
PR target/53425
* gcc.target/i386/pr53425-1.c: New file.
* gcc.target/i386/pr53425-2.c: Likewise.
2012-05-21 Richard Guenther <rguenther@suse.de>
PR tree-optimization/53408
......
/* PR target/53425 */
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-options "-O2 -mno-sse" } */
typedef double __v2df __attribute__ ((__vector_size__ (16)));
extern __v2df x;
extern void bar (__v2df);
void
foo (void)
{
bar (x); /* { dg-message "warning: SSE vector argument without SSE enabled changes the ABI" } */
}
/* PR target/53425 */
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-options "-O2 -mno-sse" } */
typedef float __v2sf __attribute__ ((__vector_size__ (8)));
extern __v2sf x;
extern void bar (__v2sf);
void
foo (void)
{
bar (x); /* { dg-message "warning: SSE vector argument without SSE enabled changes the ABI" } */
}
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