1# RUN: yaml2obj -format=elf %s > %t
2# RUN: llvm-readobj -mips-abi-flags %t | FileCheck -check-prefix=OBJ %s
3# RUN: obj2yaml %t | FileCheck -check-prefix=YAML %s
4
5# OBJ:      MIPS ABI Flags {
6# OBJ-NEXT:   Version: 0
7# OBJ-NEXT:   ISA: MIPS64r5
8# OBJ-NEXT:   ISA Extension: Cavium Networks Octeon3 (0x13)
9# OBJ-NEXT:   ASEs [ (0x103)
10# OBJ-NEXT:     DSP (0x1)
11# OBJ-NEXT:     DSPR2 (0x2)
12# OBJ-NEXT:     VZ (0x100)
13# OBJ-NEXT:   ]
14# OBJ-NEXT:   FP ABI: Hard float (double precision) (0x1)
15# OBJ-NEXT:   GPR size: 64
16# OBJ-NEXT:   CPR1 size: 64
17# OBJ-NEXT:   CPR2 size: 0
18# OBJ-NEXT:   Flags 1 [ (0x1)
19# OBJ-NEXT:     ODDSPREG (0x1)
20# OBJ-NEXT:   ]
21# OBJ-NEXT:   Flags 2: 0x0
22# OBJ-NEXT: }
23
24# YAML:      Sections:
25# YAML-NEXT: - Name:            .MIPS.abiflags
26# YAML-NEXT:   Type:            SHT_MIPS_ABIFLAGS
27# YAML-NEXT:   AddressAlign:    0x0000000000000008
28# YAML-NEXT:   ISA:             MIPS64
29# YAML-NEXT:   ISARevision:     0x05
30# YAML-NEXT:   ISAExtension:    EXT_OCTEON3
31# YAML-NEXT:   ASEs:            [ DSP, DSPR2, VIRT ]
32# YAML-NEXT:   FpABI:           FP_DOUBLE
33# YAML-NEXT:   GPRSize:         REG_64
34# YAML-NEXT:   CPR1Size:        REG_64
35# YAML-NEXT:   Flags1:          [ ODDSPREG ]
36
37FileHeader:
38  Class:   ELFCLASS64
39  Data:    ELFDATA2MSB
40  Type:    ET_REL
41  Machine: EM_MIPS
42
43Sections:
44- Name: .MIPS.abiflags
45  Type: SHT_MIPS_ABIFLAGS
46  AddressAlign: 8
47  Version:      0
48  ISA:          MIPS64
49  ISARevision:  5
50  ISAExtension: EXT_OCTEON3
51  ASEs:         [ DSP, DSPR2, VIRT ]
52  FpABI:        FP_DOUBLE
53  GPRSize:      REG_64
54  CPR1Size:     REG_64
55  CPR2Size:     REG_NONE
56  Flags1:       [ ODDSPREG ]
57  Flags2:       0x0
58
59Symbols:
60  Local:
61    - Name:    .MIPS.abiflags
62      Type:    STT_SECTION
63      Section: .MIPS.abiflags
64