mips-abi-flags.yaml
2.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
## Check how obj2yaml dumps SHT_MIPS_ABIFLAGS sections.
# RUN: yaml2obj %s -o %t
# RUN: obj2yaml %t | FileCheck %s
# CHECK: Sections:
# CHECK-NEXT: - Name: .MIPS.abiflags
# CHECK-NEXT: Type: SHT_MIPS_ABIFLAGS
# CHECK-NEXT: AddressAlign: 0x0000000000000008
# CHECK-NEXT: EntSize: 0x0000000000000018
# CHECK-NEXT: ISA: MIPS64
# CHECK-NEXT: ISARevision: 0x05
# CHECK-NEXT: ISAExtension: EXT_OCTEON3
# CHECK-NEXT: ASEs: [ DSP, DSPR2, VIRT ]
# CHECK-NEXT: FpABI: FP_DOUBLE
# CHECK-NEXT: GPRSize: REG_64
# CHECK-NEXT: CPR1Size: REG_64
# CHECK-NEXT: Flags1: [ ODDSPREG ]
# CHECK-NEXT: ...
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2MSB
Type: ET_REL
Machine: EM_MIPS
Sections:
- Name: .MIPS.abiflags
Type: SHT_MIPS_ABIFLAGS
AddressAlign: 8
Version: 0
ISA: MIPS64
ISARevision: 5
ISAExtension: EXT_OCTEON3
ASEs: [ DSP, DSPR2, VIRT ]
FpABI: FP_DOUBLE
GPRSize: REG_64
CPR1Size: REG_64
CPR2Size: REG_NONE
Flags1: [ ODDSPREG ]
Flags2: 0x0
## Check how we dump the SHT_MIPS_ABIFLAGS (0x7000002a) section when
## the machine type is not EM_MIPS. It is dumped as a regular
## section of an unknown type.
# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_NONE -o %t2.notmips
# RUN: obj2yaml %t2.notmips | FileCheck %s --check-prefix=NOT-MIPS
# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_MIPS -o %t2.mips
# RUN: obj2yaml %t2.mips | FileCheck %s --check-prefix=MIPS
# MIPS: - Name: .MIPS.abiflags
# MIPS-NEXT: Type: SHT_MIPS_ABIFLAGS
# MIPS-NEXT: ISA: 0x00000000
# MIPS-NEXT: ...
# NOT-MIPS: - Name: .MIPS.abiflags
# NOT-MIPS-NEXT: Type: 0x7000002A
# NOT-MIPS-NEXT: Content: '000000000000000000000000000000000000000000000000'
# NOT-MIPS-NEXT: ...
--- !ELF
FileHeader:
Class: ELFCLASS64
Data: ELFDATA2MSB
Type: ET_REL
Machine: [[MACHINE]]
Sections:
- Name: .MIPS.abiflags
Type: SHT_PROGBITS
ShType: 0x7000002a ## SHT_MIPS_ABIFLAGS.
Size: 0x18