xref: /minix3/external/bsd/llvm/dist/clang/test/Headers/x86intrin.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding %s -verify
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding -fno-lax-vector-conversions %s -verify
3*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -ffreestanding -x c++ %s -verify
4*f4a2713aSLionel Sambuc // expected-no-diagnostics
5*f4a2713aSLionel Sambuc 
6*f4a2713aSLionel Sambuc #if defined(i386) || defined(__x86_64__)
7*f4a2713aSLionel Sambuc 
8*f4a2713aSLionel Sambuc // Pretend to enable all features.
9*f4a2713aSLionel Sambuc #ifndef __3dNOW__
10*f4a2713aSLionel Sambuc #define __3dNOW__
11*f4a2713aSLionel Sambuc #endif
12*f4a2713aSLionel Sambuc #ifndef __BMI__
13*f4a2713aSLionel Sambuc #define __BMI__
14*f4a2713aSLionel Sambuc #endif
15*f4a2713aSLionel Sambuc #ifndef __BMI2__
16*f4a2713aSLionel Sambuc #define __BMI2__
17*f4a2713aSLionel Sambuc #endif
18*f4a2713aSLionel Sambuc #ifndef __LZCNT__
19*f4a2713aSLionel Sambuc #define __LZCNT__
20*f4a2713aSLionel Sambuc #endif
21*f4a2713aSLionel Sambuc #ifndef __POPCNT__
22*f4a2713aSLionel Sambuc #define __POPCNT__
23*f4a2713aSLionel Sambuc #endif
24*f4a2713aSLionel Sambuc #ifndef __RDSEED__
25*f4a2713aSLionel Sambuc #define __RDSEED__
26*f4a2713aSLionel Sambuc #endif
27*f4a2713aSLionel Sambuc #ifndef __PRFCHW__
28*f4a2713aSLionel Sambuc #define __PRFCHW__
29*f4a2713aSLionel Sambuc #endif
30*f4a2713aSLionel Sambuc #ifndef __SSE4A__
31*f4a2713aSLionel Sambuc #define __SSE4A__
32*f4a2713aSLionel Sambuc #endif
33*f4a2713aSLionel Sambuc #ifndef __FMA4__
34*f4a2713aSLionel Sambuc #define __FMA4__
35*f4a2713aSLionel Sambuc #endif
36*f4a2713aSLionel Sambuc #ifndef __XOP__
37*f4a2713aSLionel Sambuc #define __XOP__
38*f4a2713aSLionel Sambuc #endif
39*f4a2713aSLionel Sambuc #ifndef __F16C__
40*f4a2713aSLionel Sambuc #define __F16C__
41*f4a2713aSLionel Sambuc #endif
42*f4a2713aSLionel Sambuc #ifndef __MMX__
43*f4a2713aSLionel Sambuc #define __MMX__
44*f4a2713aSLionel Sambuc #endif
45*f4a2713aSLionel Sambuc #ifndef __SSE__
46*f4a2713aSLionel Sambuc #define __SSE__
47*f4a2713aSLionel Sambuc #endif
48*f4a2713aSLionel Sambuc #ifndef __SSE2__
49*f4a2713aSLionel Sambuc #define __SSE2__
50*f4a2713aSLionel Sambuc #endif
51*f4a2713aSLionel Sambuc #ifndef __SSE3__
52*f4a2713aSLionel Sambuc #define __SSE3__
53*f4a2713aSLionel Sambuc #endif
54*f4a2713aSLionel Sambuc #ifndef __SSSE3__
55*f4a2713aSLionel Sambuc #define __SSSE3__
56*f4a2713aSLionel Sambuc #endif
57*f4a2713aSLionel Sambuc #ifndef __SSE4_1__
58*f4a2713aSLionel Sambuc #define __SSE4_1__
59*f4a2713aSLionel Sambuc #endif
60*f4a2713aSLionel Sambuc #ifndef __SSE4_2__
61*f4a2713aSLionel Sambuc #define __SSE4_2__
62*f4a2713aSLionel Sambuc #endif
63*f4a2713aSLionel Sambuc #ifndef __AES__
64*f4a2713aSLionel Sambuc #define __AES__
65*f4a2713aSLionel Sambuc #endif
66*f4a2713aSLionel Sambuc #ifndef __AVX__
67*f4a2713aSLionel Sambuc #define __AVX__
68*f4a2713aSLionel Sambuc #endif
69*f4a2713aSLionel Sambuc #ifndef __AVX2__
70*f4a2713aSLionel Sambuc #define __AVX2__
71*f4a2713aSLionel Sambuc #endif
72*f4a2713aSLionel Sambuc #ifndef __BMI__
73*f4a2713aSLionel Sambuc #define __BMI__
74*f4a2713aSLionel Sambuc #endif
75*f4a2713aSLionel Sambuc #ifndef __BMI2__
76*f4a2713aSLionel Sambuc #define __BMI2__
77*f4a2713aSLionel Sambuc #endif
78*f4a2713aSLionel Sambuc #ifndef __LZCNT__
79*f4a2713aSLionel Sambuc #define __LZCNT__
80*f4a2713aSLionel Sambuc #endif
81*f4a2713aSLionel Sambuc #ifndef __FMA__
82*f4a2713aSLionel Sambuc #define __FMA__
83*f4a2713aSLionel Sambuc #endif
84*f4a2713aSLionel Sambuc #ifndef __RDRND__
85*f4a2713aSLionel Sambuc #define __RDRND__
86*f4a2713aSLionel Sambuc #endif
87*f4a2713aSLionel Sambuc 
88*f4a2713aSLionel Sambuc // Now include the metaheader that includes all x86 intrinsic headers.
89*f4a2713aSLionel Sambuc #include <x86intrin.h>
90*f4a2713aSLionel Sambuc 
91*f4a2713aSLionel Sambuc #endif
92