2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / monitorx.c
blobe4ca18d33761ffec5e391b643a3e6294dddcf0ae
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mmwaitx" } */
4 /* Verify that they work in both 32bit and 64bit. */
6 #include <x86intrin.h>
8 void
9 foo (char *p, int x, int y, int z, int c)
11 _mm_monitorx (p, y, x);
12 _mm_mwaitx (z, y, c);
15 void
16 bar (char *p, long x, long y, long z, long c)
18 _mm_monitorx (p, y, x);
19 _mm_mwaitx (z, y, c);
22 void
23 foo1 (char *p)
25 _mm_monitorx (p, 0, 0);
26 _mm_mwaitx (0, 0, 0);