File: arm64ec.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 (90 lines) | stat: -rw-r--r-- 3,146 bytes parent folder | download | duplicates (2)
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
88
89
90
# REQUIRES: aarch64-registered-target

## Check that AMD64 image file with CHPE data is recognized as ARM64EC.
# RUN: yaml2obj %s -o %t -DMACHINE=IMAGE_FILE_MACHINE_AMD64
# RUN: llvm-objdump -d %t | FileCheck --check-prefixes=DISASM,ARM64EC %s
# RUN: llvm-readobj --coff-load-config %t | FileCheck --check-prefix=CODEMAP %s

## Check that ARM64 image file with CHPE data is recognized as ARM64X.
# RUN: yaml2obj %s -o %t -DMACHINE=IMAGE_FILE_MACHINE_ARM64
# RUN: llvm-objdump -d %t | FileCheck --check-prefixes=DISASM,ARM64X %s
# RUN: llvm-readobj --coff-load-config %t | FileCheck --check-prefix=CODEMAP %s

# ARM64EC: file format coff-arm64ec
# ARM64X:  file format coff-arm64x

# DISASM:      180001000: 52800040     mov     w0, #0x2
# DISASM-NEXT: 180001004: d65f03c0     ret
# DISASM-NEXT: ...
# DISASM:      180002020: 528000a0     mov     w0, #0x5
# DISASM-NEXT: 180002024: d65f03c0     ret

# CODEMAP:      CodeMap [
# CODEMAP-NEXT:   0x1000 - 0x1008  ARM64EC
# CODEMAP-NEXT:   0x1020 - 0x2007  X64
# CODEMAP-NEXT:   0x2020 - 0x2028  ARM64EC
# CODEMAP-NEXT: ]

--- !COFF
OptionalHeader:
  ImageBase:        0x180000000
  SectionAlignment: 4096
  FileAlignment:    512
  DLLCharacteristics: [ ]
  LoadConfigTable:
    RelativeVirtualAddress: 0x3000
    Size:                   320
header:
  Machine:         [[MACHINE]]
  Characteristics: [ IMAGE_FILE_EXECUTABLE_IMAGE, IMAGE_FILE_LARGE_ADDRESS_AWARE, IMAGE_FILE_DLL ]
sections:
  - Name:            .text
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  0x1000
    VirtualSize:     38
    SectionData:     40008052C0035FD6000000000000000000000000000000000000000000000000B803000000C3
  - Name:            .test
    Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  0x2000
    VirtualSize:     40
    SectionData:     B806000000C3CC00000000000000000000000000000000000000000000000000A0008052C0035FD6
  - Name:            .rdata
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ ]
    VirtualAddress:  0x3000
    VirtualSize:     328
    StructuredData:
      - LoadConfig:
          CHPEMetadataPointer: 0x180004000
  - Name:            .data
    Characteristics: [ IMAGE_SCN_CNT_INITIALIZED_DATA, IMAGE_SCN_MEM_READ, IMAGE_SCN_MEM_WRITE ]
    VirtualAddress:  0x4000
    VirtualSize:     112
    StructuredData:
      - UInt32: 1       # Version
      - UInt32: 0x4050  # CodeMap
      - UInt32: 3       # CodeMapCount
      - UInt32: 0       # CodeRangesToEntryPoints
      - UInt32: 0       # RedirectionMetadata
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0       # CodeRangesToEntryPointsCount
      - UInt32: 0       # RedirectionMetadataCount
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0
      - UInt32: 0x1001  # CodeMap[0]
      - UInt32: 0x8
      - UInt32: 0x1022  # CodeMap[1]
      - UInt32: 0x0fe7
      - UInt32: 0x2021  # CodeMap[2]
      - UInt32: 0x8
symbols:         []
...