Debian Codegraph @

gcc/testsuite/gcc.target/i386/x86gprintrin-3.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-O0 -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 without 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 compiled
11 as proper functions. */
12
13 #define extern
14 #define __inline
15
16 #include <x86gprintrin.h>
17
18 #define _CONCAT(x,y) x ## y
19
20 #define test_0(func, type, imm) \
21 type _CONCAT(_0,func) (int const I) \
22 { return func (imm); }
23
24 #define test_1(func, type, op1_type) \
25 type _CONCAT(_1,func) (op1_type A) \
26 { return func (A); }
27
28 #define test_1r(func, type, op1_type, imm) \
29 type _CONCAT(_1r,func) (op1_type A, int const I) \
30 { return func (imm, A); }
31
32 #define test_2(func, type, op1_type, op2_type) \
33 type _CONCAT(_2,func) (op1_type A, op2_type B) \
34 { return func (A, B); }
35
36 /* usermsrintrin.h */
37 #ifdef __x86_64__
38 test_0 (_urdmsr, unsigned long long, 1)
39 test_1 (_urdmsr, unsigned long long, unsigned long long)
40 test_1r (_uwrmsr, void, unsigned long long, 1)
41 test_2 (_uwrmsr, void, unsigned long long, unsigned long long)
42 #endif