Files
clang-p2996/llvm/test/tools/llvm-objdump/MachO/universal-arm64.test
Ahmed Bougacha f77c948d56 [Triple][MachO] Define "arm64e", an AArch64 subarch for Pointer Auth.
This also teaches MachO writers/readers about the MachO cpu subtype,
beyond the minimal subtype reader support present at the moment.

This also defines a preprocessor macro to allow users to distinguish
__arm64__ from __arm64e__.

arm64e defaults to an "apple-a12" CPU, which supports v8.3a, allowing
pointer-authentication codegen.
It also currently defaults to ios14 and macos11.

Differential Revision: https://reviews.llvm.org/D87095
2020-12-03 07:53:59 -08:00

86 lines
2.4 KiB
Plaintext

## This test checks that the CPUTypes are printed correctly for the subtypes of
## ARM64.
# RUN: yaml2obj %s -o %tarm.o
# RUN: llvm-objdump %tarm.o --universal-headers --macho | \
# RUN: FileCheck %s --match-full-lines
# CHECK: Fat headers
# CHECK-NEXT: fat_magic FAT_MAGIC
# CHECK-NEXT: nfat_arch 3
# CHECK-NEXT: architecture arm64
# CHECK-NEXT: cputype CPU_TYPE_ARM64
# CHECK-NEXT: cpusubtype CPU_SUBTYPE_ARM64_ALL
# CHECK-NEXT: capabilities 0x0
# CHECK-NEXT: offset 4096
# CHECK-NEXT: size 352
# CHECK-NEXT: align 2^12 (4096)
# CHECK-NEXT: architecture
# CHECK-NEXT: cputype CPU_TYPE_ARM64
# CHECK-NEXT: cpusubtype CPU_SUBTYPE_ARM64_V8
# CHECK-NEXT: capabilities 0x0
# CHECK-NEXT: offset 16384
# CHECK-NEXT: size 384
# CHECK-NEXT: align 2^14 (16384)
# CHECK-NEXT: architecture arm64e
# CHECK-NEXT: cputype CPU_TYPE_ARM64
# CHECK-NEXT: cpusubtype CPU_SUBTYPE_ARM64E
# CHECK-NEXT: capabilities 0x0
# CHECK-NEXT: offset 28672
# CHECK-NEXT: size 384
# CHECK-NEXT: align 2^12 (4096)
# CHECK-NOT:{{.}}
--- !fat-mach-o
FatHeader:
magic: 0xCAFEBABE
nfat_arch: 3
FatArchs:
- cputype: 0x0100000C
cpusubtype: 0x00000000
offset: 0x0000000000001000
size: 352
align: 12
- cputype: 0x0100000C
cpusubtype: 0x00000001
offset: 0x0000000000004000
size: 384
align: 14
- cputype: 0x0100000C
cpusubtype: 0x00000002
offset: 0x0000000000007000
size: 384
align: 12
Slices:
- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x0100000C
cpusubtype: 0x00000000
filetype: 0x00000001
ncmds: 0
sizeofcmds: 0
flags: 0x00000000
reserved: 0x00000000
- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x0100000C
cpusubtype: 0x00000001
filetype: 0x00000001
ncmds: 0
sizeofcmds: 0
flags: 0x00000000
reserved: 0x00000000
- !mach-o
FileHeader:
magic: 0xFEEDFACF
cputype: 0x0100000C
cpusubtype: 0x00000002
filetype: 0x00000001
ncmds: 0
sizeofcmds: 0
flags: 0x00000000
reserved: 0x00000000
...