aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/monitor-2.c
blob: 96eeec070f0b8483e312fe14c88bedc832099372 (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 -mmwait -mgeneral-regs-only" } */

/* Verify that they work in both 32bit and 64bit.  */

#include <x86gprintrin.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);
}