summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/monitor.c
blob: 939969f791948ae514cbe26fc578c71a54e72f89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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);
}