aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c')
-rw-r--r--gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c b/gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c
new file mode 100644
index 000000000..d006cdc0a
--- /dev/null
+++ b/gcc-4.8/gcc/testsuite/gcc.target/i386/sse-21.c
@@ -0,0 +1,24 @@
+/* Test that we don't generate a fisttp instruction when -mno-sse3. */
+/* { dg-do compile } */
+/* { dg-options "-O -mfpmath=387 -march=nocona -mno-sse3 -mno-avx" } */
+/* { dg-final { scan-assembler-not "fisttp" } } */
+struct foo
+{
+ long a;
+ long b;
+};
+
+extern double c;
+
+extern unsigned long long baz (void);
+
+int
+walrus (const struct foo *input)
+{
+ unsigned long long d;
+
+ d = baz ()
+ + (unsigned long long) (((double) input->a * 1000000000
+ + (double) input->b) * c);
+ return (d ? 1 : 0);
+}