1 ## Test various combinations of ELF flag values for SPARC.
3 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC" -DFLAG_NAME=""
4 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON -DFLAG_VALUE=0x0
5 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
6 # RUN: -DFLAG_VALUE=0x0 -DGNU_FLAG_NAME=""
8 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC32PLUS" -DFLAG_NAME="EF_SPARC_32PLUS"
9 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0 \
10 # RUN: -DFLAG0_NAME=EF_SPARC_32PLUS -DFLAG_VALUE=0x100
11 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
12 # RUN: -DFLAG_VALUE=0x100 -DGNU_FLAG_NAME=", V8+ ABI"
14 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC32PLUS" \
15 # RUN: -DFLAG_NAME="EF_SPARC_32PLUS, EF_SPARC_SUN_US1"
16 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0,LLVM-FLAG1\
17 # RUN: -DFLAG_VALUE=0x300 \
18 # RUN: -DFLAG0_NAME=EF_SPARC_32PLUS -DFLAG1_NAME=EF_SPARC_SUN_US1
19 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
20 # RUN: -DFLAG_VALUE=0x300 \
21 # RUN: -DGNU_FLAG_NAME=", V8+ ABI, Sun UltraSPARC I extensions"
23 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS32" -DMACHINE_NAME="EM_SPARC32PLUS" \
24 # RUN: -DFLAG_NAME="EF_SPARC_32PLUS, EF_SPARC_SUN_US1, EF_SPARC_HAL_R1, EF_SPARC_SUN_US3"
25 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0,LLVM-FLAG1,LLVM-FLAG2,LLVM-FLAG3 \
26 # RUN: -DFLAG_VALUE=0xF00 \
27 # RUN: -DFLAG0_NAME=EF_SPARC_32PLUS -DFLAG1_NAME=EF_SPARC_HAL_R1 \
28 # RUN: -DFLAG2_NAME=EF_SPARC_SUN_US1 -DFLAG3_NAME=EF_SPARC_SUN_US3
29 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
30 # RUN: -DFLAG_VALUE=0xF00 \
31 # RUN: -DGNU_FLAG_NAME=", V8+ ABI, Sun UltraSPARC I extensions, HAL/Fujitsu R1 extensions, Sun UltraSPARC III extensions"
33 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" -DFLAG_NAME=""
34 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON -DFLAG_VALUE=0x0
35 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
36 # RUN: -DFLAG_VALUE=0x0 -DGNU_FLAG_NAME=""
38 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" -DFLAG_NAME="EF_SPARC_SUN_US1"
39 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0 \
40 # RUN: -DFLAG_VALUE=0x200 -DFLAG0_NAME=EF_SPARC_SUN_US1
41 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
42 # RUN: -DFLAG_VALUE=0x200 -DGNU_FLAG_NAME=", Sun UltraSPARC I extensions"
44 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" \
45 # RUN: -DFLAG_NAME="EF_SPARC_SUN_US1, EF_SPARCV9_RMO"
46 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0,LLVM-FLAG1 \
47 # RUN: -DFLAG_VALUE=0x202 \
48 # RUN: -DFLAG0_NAME=EF_SPARCV9_RMO -DFLAG1_NAME=EF_SPARC_SUN_US1
49 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
50 # RUN: -DFLAG_VALUE=0x202 \
51 # RUN: -DGNU_FLAG_NAME=", Sun UltraSPARC I extensions, Relaxed Memory Ordering"
53 # RUN: yaml2obj %s -o %t -DCLASS_NAME="ELFCLASS64" -DMACHINE_NAME="EM_SPARCV9" \
54 # RUN: -DFLAG_NAME="EF_SPARC_SUN_US1, EF_SPARC_HAL_R1, EF_SPARC_SUN_US3, EF_SPARCV9_PSO"
55 # RUN: llvm-readobj -h %t | FileCheck %s --check-prefixes=LLVM-COMMON,LLVM-FLAG0,LLVM-FLAG1,LLVM-FLAG2,LLVM-FLAG3 \
56 # RUN: -DFLAG_VALUE=0xE01 \
57 # RUN: -DFLAG0_NAME=EF_SPARCV9_PSO -DFLAG1_NAME=EF_SPARC_HAL_R1 \
58 # RUN: -DFLAG2_NAME=EF_SPARC_SUN_US1 -DFLAG3_NAME=EF_SPARC_SUN_US3
59 # RUN: llvm-readelf -h %t | FileCheck %s --match-full-lines --check-prefix=GNU \
60 # RUN: -DFLAG_VALUE=0xE01\
61 # RUN: -DGNU_FLAG_NAME=", Sun UltraSPARC I extensions, HAL/Fujitsu R1 extensions, Sun UltraSPARC III extensions, Partial Store Ordering"
68 Machine: [[MACHINE_NAME]]
69 Flags: [ [[FLAG_NAME]] ]
71 # LLVM-COMMON: Flags [ ([[FLAG_VALUE]])
72 # LLVM-FLAG0-NEXT: [[FLAG0_NAME]]
73 # LLVM-FLAG1-NEXT: [[FLAG1_NAME]]
74 # LLVM-FLAG2-NEXT: [[FLAG2_NAME]]
75 # LLVM-FLAG3-NEXT: [[FLAG3_NAME]]
78 # GNU: Flags: [[FLAG_VALUE]][[GNU_FLAG_NAME]]