File: mips-abi-flags.yaml

package info (click to toggle)
swiftlang 6.0.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,519,992 kB
  • sloc: cpp: 9,107,863; ansic: 2,040,022; asm: 1,135,751; python: 296,500; objc: 82,456; f90: 60,502; lisp: 34,951; pascal: 19,946; sh: 18,133; perl: 7,482; ml: 4,937; javascript: 4,117; makefile: 3,840; awk: 3,535; xml: 914; fortran: 619; cs: 573; ruby: 573
file content (87 lines) | stat: -rw-r--r-- 2,801 bytes parent folder | download | duplicates (21)
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
## 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: 0x8
# CHECK-NEXT:     ISA:          MIPS64
# CHECK-NEXT:     ISARevision:  0x5
# 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
## We don't print the "EntSize" key, because 0x18 is the default value
## for the sh_entsize field of SHT_MIPS_ABIFLAGS.
# MIPS-NEXT:   ISA:  0x0
# MIPS-NEXT: ...

# NOT-MIPS:      - Name:    .MIPS.abiflags
# NOT-MIPS-NEXT:   Type:    0x7000002A
## We print the "EntSize" key, because 0x7000002A only means
## "SHT_MIPS_ABIFLAGS" when machine is EM_MIPS, so 0x18 is not a known default value.
# NOT-MIPS-NEXT:   EntSize: 0x18
# 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
    EntSize: [[ENTSIZE=0x18]]

## Check we dump the "EntSize" key when the value of the "sh_entsize" field is not equal to 0x18.

# RUN: yaml2obj %s --docnum=2 -DMACHINE=EM_MIPS -DENTSIZE=0x19 -o %t2.mips.entsize
# RUN: obj2yaml %t2.mips.entsize | FileCheck %s --check-prefix=MIPS-ENTSIZE

# MIPS-ENTSIZE:      - Name:    .MIPS.abiflags
# MIPS-ENTSIZE-NEXT:   Type:    SHT_MIPS_ABIFLAGS
# MIPS-ENTSIZE-NEXT:   EntSize: 0x19