1 ## Test how yaml2obj creates SHT_MIPS_ABIFLAGS sections.
3 # RUN: yaml2obj %s -o %t
4 # RUN: llvm-readobj -A %t | FileCheck %s
6 # CHECK: MIPS ABI Flags {
7 # CHECK-NEXT: Version: 0
8 # CHECK-NEXT: ISA: MIPS64r5
9 # CHECK-NEXT: ISA Extension: Cavium Networks Octeon3 (0x13)
10 # CHECK-NEXT: ASEs [ (0x103)
11 # CHECK-NEXT: DSP (0x1)
12 # CHECK-NEXT: DSPR2 (0x2)
13 # CHECK-NEXT: VZ (0x100)
15 # CHECK-NEXT: FP ABI: Hard float (double precision) (0x1)
16 # CHECK-NEXT: GPR size: 64
17 # CHECK-NEXT: CPR1 size: 64
18 # CHECK-NEXT: CPR2 size: 0
19 # CHECK-NEXT: Flags 1 [ (0x1)
20 # CHECK-NEXT: ODDSPREG (0x1)
22 # CHECK-NEXT: Flags 2: 0x0
30 Machine: [[MACHINE=EM_MIPS]]
32 - Name: .MIPS.abiflags
33 Type: SHT_MIPS_ABIFLAGS
38 ISAExtension: EXT_OCTEON3
39 ASEs: [ DSP, DSPR2, VIRT ]
46 Content: [[CONTENT=<none>]]
49 ## Check we don't recognize the SHT_MIPS_ABIFLAGS section for non-MIPS targets.
51 # RUN: not yaml2obj %s -DMACHINE=EM_NONE 2>&1 | FileCheck %s --check-prefix=ERR
53 # ERR: error: invalid hex32 number
54 # ERR-NEXT: Type: SHT_MIPS_ABIFLAGS
56 ## Document we don't support the "Content" key yet.
58 # RUN: not yaml2obj %s -DCONTENT="'00'" 2>&1 | FileCheck %s --check-prefix=ERR-CONTENT
60 # ERR-CONTENT: error: "Content" key is not implemented for SHT_MIPS_ABIFLAGS section
62 ## Document we don't support the "Size" key yet.
64 # RUN: not yaml2obj %s -DSIZE=0 2>&1 | FileCheck %s --check-prefix=ERR-SIZE
66 # ERR-SIZE: error: "Size" key is not implemented for SHT_MIPS_ABIFLAGS section