| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-O2 -Werror-implicit-function-declaration -march=x86-64 -madx -mbmi -mbmi2 -mcldemote -mclflushopt -mclwb -mclzero -menqcmd -mfsgsbase -mfxsr -mhreset -mlzcnt -mlwp -mmovdiri -mmwaitx -mpconfig -mpopcnt -mpku -mptwrite -mrdpid -mrdrnd -mrdseed -mrtm -mserialize -msgx -mshstk -mtbm -mtsxldtrk -mwaitpkg -mwbnoinvd -mxsave -mxsavec -mxsaveopt -mxsaves -mraoint -mno-sse -mno-mmx" } */ |
| 3 |
/* { dg-add-options bind_pic_locally } */ |
| 4 |
/* { dg-additional-options "-musermsr -mcmpccxadd -mprefetchi -muintr" { target { ! ia32 } } } */ |
| 5 |
|
| 6 |
/* Test that the intrinsics in <x86gprintrin.h> compile with optimization. |
| 7 |
All of them are defined as inline functions that reference the proper |
| 8 |
builtin functions. |
| 9 |
|
| 10 |
Defining away "extern" and "__inline" results in all of them being |
| 11 |
compiled as proper functions. */ |
| 12 |
|
| 13 |
#define extern |
| 14 |
#define __inline |
| 15 |
|
| 16 |
/* Following intrinsics require immediate arguments. */ |
| 17 |
|
| 18 |
/* lwpintrin.h */ |
| 19 |
#define __builtin_ia32_lwpval32(D2, D1, F) __builtin_ia32_lwpval32 (D2, D1, 1) |
| 20 |
#define __builtin_ia32_lwpval64(D2, D1, F) __builtin_ia32_lwpval64 (D2, D1, 1) |
| 21 |
#define __builtin_ia32_lwpins32(D2, D1, F) __builtin_ia32_lwpins32 (D2, D1, 1) |
| 22 |
#define __builtin_ia32_lwpins64(D2, D1, F) __builtin_ia32_lwpins64 (D2, D1, 1) |
| 23 |
|
| 24 |
/* tbmintrin.h */ |
| 25 |
#define __builtin_ia32_bextri_u32(X, Y) __builtin_ia32_bextri_u32 (X, 1) |
| 26 |
#define __builtin_ia32_bextri_u64(X, Y) __builtin_ia32_bextri_u64 (X, 1) |
| 27 |
|
| 28 |
/* rtmintrin.h */ |
| 29 |
#define __builtin_ia32_xabort(N) __builtin_ia32_xabort(1) |
| 30 |
|
| 31 |
/* cmpccxadd.h */ |
| 32 |
#define __builtin_ia32_cmpccxadd(A, B, C, D) __builtin_ia32_cmpccxadd(A, B, C, 1) |
| 33 |
#define __builtin_ia32_cmpccxadd64(A, B, C, D) __builtin_ia32_cmpccxadd64(A, B, C, 1) |
| 34 |
|
| 35 |
/* usermsrintrin.h */ |
| 36 |
#define __builtin_ia32_urdmsr(A) __builtin_ia32_urdmsr(1) |
| 37 |
#define __builtin_ia32_uwrmsr(A, B) __builtin_ia32_uwrmsr(1, B) |
| 38 |
|
| 39 |
#include <x86gprintrin.h> |