brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.7 KiB · 86c641b Raw
88 lines · yaml
1## Check how obj2yaml dumps SHT_MIPS_ABIFLAGS sections.2 3# RUN: yaml2obj %s -o %t4# RUN: obj2yaml %t | FileCheck %s5 6# CHECK:      Sections:7# CHECK-NEXT:   - Name:         .MIPS.abiflags8# CHECK-NEXT:     Type:         SHT_MIPS_ABIFLAGS9# CHECK-NEXT:     AddressAlign: 0x810# CHECK-NEXT:     ISA:          MIPS6411# CHECK-NEXT:     ISARevision:  0x512# CHECK-NEXT:     ISAExtension: EXT_OCTEON313# CHECK-NEXT:     ASEs:         [ DSP, DSPR2, VIRT ]14# CHECK-NEXT:     FpABI:        FP_DOUBLE15# CHECK-NEXT:     GPRSize:      REG_6416# CHECK-NEXT:     CPR1Size:     REG_6417# CHECK-NEXT:     Flags1:       [ ODDSPREG ]18# CHECK-NEXT: ...19 20--- !ELF21FileHeader:22  Class:   ELFCLASS6423  Data:    ELFDATA2MSB24  Type:    ET_REL25  Machine: EM_MIPS26Sections:27  - Name:         .MIPS.abiflags28    Type:         SHT_MIPS_ABIFLAGS29    AddressAlign: 830    Version:      031    ISA:          MIPS6432    ISARevision:  533    ISAExtension: EXT_OCTEON334    ASEs:         [ DSP, DSPR2, VIRT ]35    FpABI:        FP_DOUBLE36    GPRSize:      REG_6437    CPR1Size:     REG_6438    CPR2Size:     REG_NONE39    Flags1:       [ ODDSPREG ]40    Flags2:       0x041 42## Check how we dump the SHT_MIPS_ABIFLAGS (0x7000002a) section when43## the machine type is not EM_MIPS. It is dumped as a regular44## section of an unknown type.45 46# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_NONE -o %t2.notmips47# RUN: obj2yaml %t2.notmips | FileCheck %s --check-prefix=NOT-MIPS48 49# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_MIPS -o %t2.mips50# RUN: obj2yaml %t2.mips | FileCheck %s --check-prefix=MIPS51 52# MIPS:      - Name: .MIPS.abiflags53# MIPS-NEXT:   Type: SHT_MIPS_ABIFLAGS54## We don't print the "EntSize" key, because 0x18 is the default value55## for the sh_entsize field of SHT_MIPS_ABIFLAGS.56# MIPS-NEXT:   ISA:  0x057# MIPS-NEXT: ...58 59# NOT-MIPS:      - Name:    .MIPS.abiflags60# NOT-MIPS-NEXT:   Type:    0x7000002A61## We print the "EntSize" key, because 0x7000002A only means62## "SHT_MIPS_ABIFLAGS" when machine is EM_MIPS, so 0x18 is not a known default value.63# NOT-MIPS-NEXT:   EntSize: 0x1864# NOT-MIPS-NEXT:   Content: '000000000000000000000000000000000000000000000000'65# NOT-MIPS-NEXT: ...66 67--- !ELF68FileHeader:69  Class:   ELFCLASS6470  Data:    ELFDATA2MSB71  Type:    ET_REL72  Machine: [[MACHINE]]73Sections:74  - Name:    .MIPS.abiflags75    Type:    SHT_PROGBITS76    ShType:  0x7000002a ## SHT_MIPS_ABIFLAGS.77    Size:    0x1878    EntSize: [[ENTSIZE=0x18]]79 80## Check we dump the "EntSize" key when the value of the "sh_entsize" field is not equal to 0x18.81 82# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_MIPS -DENTSIZE=0x19 -o %t2.mips.entsize83# RUN: obj2yaml %t2.mips.entsize | FileCheck %s --check-prefix=MIPS-ENTSIZE84 85# MIPS-ENTSIZE:      - Name:    .MIPS.abiflags86# MIPS-ENTSIZE-NEXT:   Type:    SHT_MIPS_ABIFLAGS87# MIPS-ENTSIZE-NEXT:   EntSize: 0x1988