diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/getround.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/getround.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/getround.c b/gcc/testsuite/gcc.target/i386/getround.c new file mode 100644 index 00000000000..e9d43b074aa --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/getround.c @@ -0,0 +1,14 @@ +/* { dg-do compile } */ +/* { dg-options "-O -msse" } */ + +#include <xmmintrin.h> + +unsigned save; + +void f(unsigned mode){ + unsigned tmp = _MM_GET_ROUNDING_MODE(); + _MM_SET_ROUNDING_MODE(mode); + save = tmp; +} + +/* { dg-final { scan-assembler-times "stmxcsr" 1 } } */ |