1 ## Check obj2yaml is able to decode all possible MIPS e_flags field values.
3 ## e_flags might keep both flags and regular values in a different bits.
4 ## Here we test all flags at once.
6 # RUN: yaml2obj --docnum=1 %s -o %t-non-flags
7 # RUN: obj2yaml %t-non-flags | FileCheck %s --check-prefix=FLAGS
9 # FLAGS: Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI2, EF_MIPS_32BITMODE, EF_MIPS_FP64, EF_MIPS_NAN2008, EF_MIPS_MICROMIPS, EF_MIPS_ARCH_ASE_M16, EF_MIPS_ARCH_ASE_MDMX, EF_MIPS_ARCH_1 ]
17 Flags: [ EF_MIPS_NOREORDER, EF_MIPS_PIC, EF_MIPS_CPIC, EF_MIPS_ABI2, EF_MIPS_32BITMODE,
18 EF_MIPS_FP64, EF_MIPS_NAN2008, EF_MIPS_MICROMIPS, EF_MIPS_ARCH_ASE_M16, EF_MIPS_ARCH_ASE_MDMX]
20 ## Test EF_MIPS_ABI values.
22 # RUN: yaml2obj --docnum=2 %s -o %t-abi-o32
23 # RUN: obj2yaml %t-abi-o32 | FileCheck %s -DABI=EF_MIPS_ABI_O32 --check-prefix=ABI
24 # RUN: yaml2obj --docnum=3 %s -o %t-abi-o64
25 # RUN: obj2yaml %t-abi-o64 | FileCheck -DABI=EF_MIPS_ABI_O64 %s --check-prefix=ABI
26 # RUN: yaml2obj --docnum=4 %s -o %t-eabi32
27 # RUN: obj2yaml %t-eabi32 | FileCheck -DABI=EF_MIPS_ABI_EABI32 %s --check-prefix=ABI
28 # RUN: yaml2obj --docnum=5 %s -o %t-eabi64
29 # RUN: obj2yaml %t-eabi64 | FileCheck -DABI=EF_MIPS_ABI_EABI64 %s --check-prefix=ABI
31 # ABI: Flags: [ [[ABI]], EF_MIPS_ARCH_1 ]
39 Flags: [ EF_MIPS_ABI_O32 ]
47 Flags: [ EF_MIPS_ABI_O64 ]
55 Flags: [ EF_MIPS_ABI_EABI32 ]
63 Flags: [ EF_MIPS_ABI_EABI64 ]
65 ## Test EF_MIPS_MACH values.
67 # RUN: yaml2obj --docnum=6 %s -o %t-mach-3900
68 # RUN: obj2yaml %t-mach-3900 | FileCheck %s -DMACH=EF_MIPS_MACH_3900 --check-prefix=MACH
69 # RUN: yaml2obj --docnum=7 %s -o %t-mach-4010
70 # RUN: obj2yaml %t-mach-4010 | FileCheck %s -DMACH=EF_MIPS_MACH_4010 --check-prefix=MACH
71 # RUN: yaml2obj --docnum=8 %s -o %t-mach-4100
72 # RUN: obj2yaml %t-mach-4100 | FileCheck %s -DMACH=EF_MIPS_MACH_4100 --check-prefix=MACH
73 # RUN: yaml2obj --docnum=9 %s -o %t-mach-4650
74 # RUN: obj2yaml %t-mach-4650 | FileCheck %s -DMACH=EF_MIPS_MACH_4650 --check-prefix=MACH
75 # RUN: yaml2obj --docnum=10 %s -o %t-mach-4120
76 # RUN: obj2yaml %t-mach-4120 | FileCheck %s -DMACH=EF_MIPS_MACH_4120 --check-prefix=MACH
77 # RUN: yaml2obj --docnum=11 %s -o %t-mach-4111
78 # RUN: obj2yaml %t-mach-4111 | FileCheck %s -DMACH=EF_MIPS_MACH_4111 --check-prefix=MACH
79 # RUN: yaml2obj --docnum=12 %s -o %t-mach-sb1
80 # RUN: obj2yaml %t-mach-sb1 | FileCheck %s -DMACH=EF_MIPS_MACH_SB1 --check-prefix=MACH
81 # RUN: yaml2obj --docnum=13 %s -o %t-mach-octeon
82 # RUN: obj2yaml %t-mach-octeon | FileCheck %s -DMACH=EF_MIPS_MACH_OCTEON --check-prefix=MACH
83 # RUN: yaml2obj --docnum=14 %s -o %t-mach-xlr
84 # RUN: obj2yaml %t-mach-xlr | FileCheck %s -DMACH=EF_MIPS_MACH_XLR --check-prefix=MACH
85 # RUN: yaml2obj --docnum=15 %s -o %t-mach-octeon2
86 # RUN: obj2yaml %t-mach-octeon2 | FileCheck %s -DMACH=EF_MIPS_MACH_OCTEON2 --check-prefix=MACH
87 # RUN: yaml2obj --docnum=16 %s -o %t-mach-octeon3
88 # RUN: obj2yaml %t-mach-octeon3 | FileCheck %s -DMACH=EF_MIPS_MACH_OCTEON3 --check-prefix=MACH
89 # RUN: yaml2obj --docnum=17 %s -o %t-mach-5400
90 # RUN: obj2yaml %t-mach-5400 | FileCheck %s -DMACH=EF_MIPS_MACH_5400 --check-prefix=MACH
91 # RUN: yaml2obj --docnum=18 %s -o %t-mach-5900
92 # RUN: obj2yaml %t-mach-5900 | FileCheck %s -DMACH=EF_MIPS_MACH_5900 --check-prefix=MACH
93 # RUN: yaml2obj --docnum=19 %s -o %t-mach-5500
94 # RUN: obj2yaml %t-mach-5500 | FileCheck %s -DMACH=EF_MIPS_MACH_5500 --check-prefix=MACH
95 # RUN: yaml2obj --docnum=20 %s -o %t-mach-9000
96 # RUN: obj2yaml %t-mach-9000 | FileCheck %s -DMACH=EF_MIPS_MACH_9000 --check-prefix=MACH
97 # RUN: yaml2obj --docnum=21 %s -o %t-mach-ls2e
98 # RUN: obj2yaml %t-mach-ls2e | FileCheck %s -DMACH=EF_MIPS_MACH_LS2E --check-prefix=MACH
99 # RUN: yaml2obj --docnum=22 %s -o %t-mach-ls2f
100 # RUN: obj2yaml %t-mach-ls2f | FileCheck %s -DMACH=EF_MIPS_MACH_LS2F --check-prefix=MACH
101 # RUN: yaml2obj --docnum=23 %s -o %t-mach-ls3a
102 # RUN: obj2yaml %t-mach-ls3a | FileCheck %s -DMACH=EF_MIPS_MACH_LS3A --check-prefix=MACH
104 # MACH: Flags: [ [[MACH]], EF_MIPS_ARCH_1 ]
112 Flags: [ EF_MIPS_MACH_3900 ]
120 Flags: [ EF_MIPS_MACH_4010 ]
128 Flags: [ EF_MIPS_MACH_4100 ]
136 Flags: [ EF_MIPS_MACH_4650 ]
144 Flags: [ EF_MIPS_MACH_4120 ]
152 Flags: [ EF_MIPS_MACH_4111 ]
160 Flags: [ EF_MIPS_MACH_SB1 ]
168 Flags: [ EF_MIPS_MACH_OCTEON ]
176 Flags: [ EF_MIPS_MACH_XLR ]
184 Flags: [ EF_MIPS_MACH_OCTEON2 ]
192 Flags: [ EF_MIPS_MACH_OCTEON3 ]
200 Flags: [ EF_MIPS_MACH_5400 ]
208 Flags: [ EF_MIPS_MACH_5900 ]
216 Flags: [ EF_MIPS_MACH_5500 ]
225 Flags: [ EF_MIPS_MACH_9000 ]
233 Flags: [ EF_MIPS_MACH_LS2E ]
241 Flags: [ EF_MIPS_MACH_LS2F ]
249 Flags: [ EF_MIPS_MACH_LS3A ]
251 ## Test EF_MIPS_ARCH values.
253 ## EF_MIPS_ARCH_1 has value = 0x0, so it does not show up in obj2yaml output,
254 ## when there are no other flags.
256 # RUN: yaml2obj --docnum=24 %s -o %t-arch-1a
257 # RUN: obj2yaml %t-arch-1a | FileCheck %s --check-prefix=ARCH-1
258 # RUN: yaml2obj --docnum=25 %s -o %t-arch-1b
259 # RUN: obj2yaml %t-arch-1b | FileCheck %s --check-prefix=ARCH-1
269 Flags: [ EF_MIPS_ARCH_1 ]
279 # RUN: yaml2obj --docnum=26 %s -o %t-arch-2
280 # RUN: obj2yaml %t-arch-2 | FileCheck %s -DARCH=EF_MIPS_ARCH_2 --check-prefix=ARCH
281 # RUN: yaml2obj --docnum=27 %s -o %t-arch-3
282 # RUN: obj2yaml %t-arch-3 | FileCheck %s -DARCH=EF_MIPS_ARCH_3 --check-prefix=ARCH
283 # RUN: yaml2obj --docnum=28 %s -o %t-arch-4
284 # RUN: obj2yaml %t-arch-4 | FileCheck %s -DARCH=EF_MIPS_ARCH_4 --check-prefix=ARCH
285 # RUN: yaml2obj --docnum=29 %s -o %t-arch-5
286 # RUN: obj2yaml %t-arch-5 | FileCheck %s -DARCH=EF_MIPS_ARCH_5 --check-prefix=ARCH
287 # RUN: yaml2obj --docnum=30 %s -o %t-arch-32
288 # RUN: obj2yaml %t-arch-32 | FileCheck %s -DARCH=EF_MIPS_ARCH_32 --check-prefix=ARCH
289 # RUN: yaml2obj --docnum=31 %s -o %t-arch-64
290 # RUN: obj2yaml %t-arch-64 | FileCheck %s -DARCH=EF_MIPS_ARCH_64 --check-prefix=ARCH
291 # RUN: yaml2obj --docnum=32 %s -o %t-arch-32r2
292 # RUN: obj2yaml %t-arch-32r2 | FileCheck %s -DARCH=EF_MIPS_ARCH_32R2 --check-prefix=ARCH
293 # RUN: yaml2obj --docnum=33 %s -o %t-arch-64r2
294 # RUN: obj2yaml %t-arch-64r2 | FileCheck %s -DARCH=EF_MIPS_ARCH_64R2 --check-prefix=ARCH
295 # RUN: yaml2obj --docnum=34 %s -o %t-arch-32r6
296 # RUN: obj2yaml %t-arch-32r6 | FileCheck %s -DARCH=EF_MIPS_ARCH_32R6 --check-prefix=ARCH
297 # RUN: yaml2obj --docnum=35 %s -o %t-arch-64r6
298 # RUN: obj2yaml %t-arch-64r6 | FileCheck %s -DARCH=EF_MIPS_ARCH_64R6 --check-prefix=ARCH
300 # ARCH: Flags: [ [[ARCH]] ]
308 Flags: [ EF_MIPS_ARCH_2 ]
316 Flags: [ EF_MIPS_ARCH_3 ]
324 Flags: [ EF_MIPS_ARCH_4 ]
332 Flags: [ EF_MIPS_ARCH_5 ]
340 Flags: [ EF_MIPS_ARCH_32 ]
348 Flags: [ EF_MIPS_ARCH_64 ]
356 Flags: [ EF_MIPS_ARCH_32R2 ]
364 Flags: [ EF_MIPS_ARCH_64R2 ]
372 Flags: [ EF_MIPS_ARCH_32R6 ]
380 Flags: [ EF_MIPS_ARCH_64R6 ]