brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · df68fc5 Raw
67 lines · yaml
1## Test how yaml2obj creates SHT_MIPS_ABIFLAGS sections.2 3# RUN: yaml2obj %s -o %t4# RUN: llvm-readobj -A %t | FileCheck %s5 6# CHECK:      MIPS ABI Flags {7# CHECK-NEXT:   Version: 08# CHECK-NEXT:   ISA: MIPS64r59# 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)14# CHECK-NEXT:   ]15# CHECK-NEXT:   FP ABI: Hard float (double precision) (0x1)16# CHECK-NEXT:   GPR size: 6417# CHECK-NEXT:   CPR1 size: 6418# CHECK-NEXT:   CPR2 size: 019# CHECK-NEXT:   Flags 1 [ (0x1)20# CHECK-NEXT:     ODDSPREG (0x1)21# CHECK-NEXT:   ]22# CHECK-NEXT:   Flags 2: 0x023# CHECK-NEXT: }24 25--- !ELF26FileHeader:27  Class:   ELFCLASS6428  Data:    ELFDATA2MSB29  Type:    ET_REL30  Machine: [[MACHINE=EM_MIPS]]31Sections:32  - Name:         .MIPS.abiflags33    Type:         SHT_MIPS_ABIFLAGS34    AddressAlign: 835    Version:      036    ISA:          MIPS6437    ISARevision:  538    ISAExtension: EXT_OCTEON339    ASEs:         [ DSP, DSPR2, VIRT ]40    FpABI:        FP_DOUBLE41    GPRSize:      REG_6442    CPR1Size:     REG_6443    CPR2Size:     REG_NONE44    Flags1:       [ ODDSPREG ]45    Flags2:       0x046    Content:     [[CONTENT=<none>]]47    Size:        [[SIZE=<none>]]48 49## Check we don't recognize the SHT_MIPS_ABIFLAGS section for non-MIPS targets.50 51# RUN: not yaml2obj %s -DMACHINE=EM_NONE 2>&1 | FileCheck %s --check-prefix=ERR52 53# ERR:      error: invalid hex32 number54# ERR-NEXT: Type: SHT_MIPS_ABIFLAGS55 56## Document we don't support the "Content" key yet.57 58# RUN: not yaml2obj %s -DCONTENT="'00'" 2>&1 | FileCheck %s --check-prefix=ERR-CONTENT59 60# ERR-CONTENT: error: "Content" key is not implemented for SHT_MIPS_ABIFLAGS section61 62## Document we don't support the "Size" key yet.63 64# RUN: not yaml2obj %s -DSIZE=0 2>&1 | FileCheck %s --check-prefix=ERR-SIZE65 66# ERR-SIZE: error: "Size" key is not implemented for SHT_MIPS_ABIFLAGS section67