1 // RUN: %clang -E -target bpfel -mcpu=v1 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_NO %s
2 // RUN: %clang -E -target bpfeb -mcpu=v1 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_NO %s
3 // RUN: %clang -E -target bpfel -mcpu=v1 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_V1 %s
4 // RUN: %clang -E -target bpfel -mcpu=v2 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_V2 %s
5 // RUN: %clang -E -target bpfel -mcpu=v3 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_V3 %s
6 // RUN: %clang -E -target bpfel -mcpu=v4 -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_V4 %s
7 // RUN: %clang -E -target bpfel -mcpu=generic -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_GENERIC %s
8 // RUN: %clang -E -target bpfel -mcpu=probe -x c -o - %s | FileCheck -check-prefix=CHECK -check-prefix=CPU_PROBE %s
19 #ifdef __BPF_CPU_VERSION__
22 #if __BPF_CPU_VERSION__ == 0
25 #if __BPF_CPU_VERSION__ == 1
28 #if __BPF_CPU_VERSION__ == 2
31 #if __BPF_CPU_VERSION__ == 3
34 #if __BPF_CPU_VERSION__ == 4
37 #ifdef __BPF_FEATURE_JMP_EXT
40 #ifdef __BPF_FEATURE_JMP32
43 #ifdef __BPF_FEATURE_ALU32
46 #ifdef __BPF_FEATURE_LDSX
49 #ifdef __BPF_FEATURE_MOVSX
52 #ifdef __BPF_FEATURE_BSWAP
55 #ifdef __BPF_FEATURE_SDIV_SMOD
58 #ifdef __BPF_FEATURE_GOTOL
61 #ifdef __BPF_FEATURE_ST
64 #ifdef __BPF_FEATURE_ADDR_SPACE_CAST
67 #ifdef __BPF_FEATURE_MAY_GOTO
109 // CPU_GENERIC: int g;