mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-13 17:20:57 +08:00
vect-nop-move.c (foo32x2_be): Call __builtin_ia32_emms for 32bit x86 targets.
* gcc.dg/vect/vect-nop-move.c (foo32x2_be): Call __builtin_ia32_emms for 32bit x86 targets. (foo32x2_le): Ditto. (main): Reorder function calls. From-SVN: r206002
This commit is contained in:
parent
4e7a80dfbf
commit
88fab00db0
@ -1,3 +1,10 @@
|
||||
2013-12-15 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.dg/vect/vect-nop-move.c (foo32x2_be): Call
|
||||
__builtin_ia32_emms for 32bit x86 targets.
|
||||
(foo32x2_le): Ditto.
|
||||
(main): Reorder function calls.
|
||||
|
||||
2013-12-15 Uros Bizjak <ubizjak@gmail.com>
|
||||
|
||||
* gcc.target/i386/pr57756.c (dg-options): Add -mno-sse3.
|
||||
|
@ -30,12 +30,21 @@ bar (float a)
|
||||
NOINLINE float
|
||||
foo32x2_be (float32x2_t x)
|
||||
{
|
||||
#ifdef __i386__
|
||||
/* ix86 passes float32x2 vector arguments in mmx registers. We need to
|
||||
emit emms to empty MMS state and reenable x87 stack before float value
|
||||
can be loaded to and passed in x87 floating-point return register. */
|
||||
__builtin_ia32_emms ();
|
||||
#endif
|
||||
return bar (x[1]);
|
||||
}
|
||||
|
||||
NOINLINE float
|
||||
foo32x2_le (float32x2_t x)
|
||||
{
|
||||
#ifdef __i386__
|
||||
__builtin_ia32_emms ();
|
||||
#endif
|
||||
return bar (x[0]);
|
||||
}
|
||||
|
||||
@ -45,18 +54,18 @@ main()
|
||||
float32x4_t a = { 0.0f, 1.0f, 2.0f, 3.0f };
|
||||
float32x2_t b = { 0.0f, 1.0f };
|
||||
|
||||
if (foo32x4_be (a) != 3.0f)
|
||||
abort ();
|
||||
|
||||
if (foo32x4_le (a) != 0.0f)
|
||||
abort ();
|
||||
|
||||
if (foo32x2_be (b) != 1.0f)
|
||||
abort ();
|
||||
|
||||
if (foo32x2_le (b) != 0.0f)
|
||||
abort ();
|
||||
|
||||
if (foo32x4_be (a) != 3.0f)
|
||||
abort ();
|
||||
|
||||
if (foo32x4_le (a) != 0.0f)
|
||||
abort ();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user