aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c b/gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c
new file mode 100644
index 000000000..939969f79
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.target/i386/monitor.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse3" } */
+
+/* Verify that they work in both 32bit and 64bit. */
+
+#include <pmmintrin.h>
+
+void
+foo (char *p, int x, int y, int z)
+{
+ _mm_monitor (p, y, x);
+ _mm_mwait (z, y);
+}
+
+void
+bar (char *p, long x, long y, long z)
+{
+ _mm_monitor (p, y, x);
+ _mm_mwait (z, y);
+}
+
+void
+foo1 (char *p)
+{
+ _mm_monitor (p, 0, 0);
+ _mm_mwait (0, 0);
+}