• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Check subtype Arm64-ALL:
2# RUN: yaml2obj %s -o %t.arm64-all -DSUBTYPE=0x0
3# RUN: llvm-readobj -h %t.arm64-all \
4# RUN:  | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.arm64-all --check-prefix=ARM64 -DSUBTYPE="CPU_SUBTYPE_ARM64_ALL (0x0)"
5
6## Check subtype Arm64-V8:
7# RUN: yaml2obj %s -o %t.arm64-v8 -DSUBTYPE=0x1
8# RUN: llvm-readobj -h %t.arm64-v8 \
9# RUN:  | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.arm64-v8 --check-prefix=ARM64 -DSUBTYPE="CPU_SUBTYPE_ARM64_V8 (0x1)"
10
11## Check subtype Arm64E:
12# RUN: yaml2obj %s -o %t.arm64e -DSUBTYPE=0x2
13# RUN: llvm-readobj -h %t.arm64e \
14# RUN:  | FileCheck %s --strict-whitespace --match-full-lines -DFILE=%t.arm64e --check-prefix=ARM64 -DSUBTYPE="CPU_SUBTYPE_ARM64E (0x2)"
15
16#      ARM64:File: [[FILE]]
17# ARM64-NEXT:Format: Mach-O arm64
18# ARM64-NEXT:Arch: aarch64
19# ARM64-NEXT:AddressSize: 64bit
20# ARM64-NEXT:MachHeader {
21# ARM64-NEXT:  Magic: Magic64 (0xFEEDFACF)
22# ARM64-NEXT:  CpuType: Arm64 (0x100000C)
23# ARM64-NEXT:  CpuSubType: [[SUBTYPE]]
24# ARM64-NEXT:  FileType: Relocatable (0x1)
25# ARM64-NEXT:  NumOfLoadCommands: 0
26# ARM64-NEXT:  SizeOfLoadCommands: 0
27# ARM64-NEXT:  Flags [ (0x0)
28# ARM64-NEXT:  ]
29# ARM64-NEXT:  Reserved: 0x0
30# ARM64-NEXT:}
31# ARM64-NOT:{{.}}
32
33--- !mach-o
34FileHeader:
35  magic:           0xFEEDFACF
36  cputype:         0x0100000C
37  cpusubtype:      [[SUBTYPE]]
38  filetype:        0x00000001
39  ncmds:           0
40  sizeofcmds:      0
41  flags:           0x00000000
42  reserved:        0x00000000
43...
44