diff options
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/tpause-1.c')
-rw-r--r-- | gcc/testsuite/gcc.target/i386/tpause-1.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/tpause-1.c b/gcc/testsuite/gcc.target/i386/tpause-1.c new file mode 100644 index 0000000..6b0d393 --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/tpause-1.c @@ -0,0 +1,24 @@ +/* { dg-do compile } */ +/* { dg-options "-O2 -mwaitpkg" } */ +/* { dg-final { scan-assembler-times "tpause\[ \\t\]+\[^\{\n\]*%" 3 } } */ +/* { dg-final { scan-assembler-times "setc\[ \\t\]+\[^\{\n\]*%" 3 } } */ + +#include <x86intrin.h> + +unsigned char +foo (unsigned x, unsigned y) +{ + return _tpause (x, y); +} + +unsigned char +bar (unsigned x, unsigned long long y) +{ + return _tpause (x, y); +} + +unsigned char +foo1 (void) +{ + return _tpause (0, 0); +} |