Yet another fix llvm-objdump so it picks a good CPU based for Mach-O files,

in this case for CPU_SUBTYPE_ARM64_ALL.

For this cpusubtype it should default to a cyclone CPU
to give proper disassembly without a -mcpu= flag.

rdar://27767188

llvm-svn: 294771
This commit is contained in:
Kevin Enderby 2017-02-10 19:27:10 +00:00
parent 0e01170c79
commit dc412ccc41
4 changed files with 6 additions and 1 deletions

View File

@ -2477,6 +2477,8 @@ Triple MachOObjectFile::getArchTriple(uint32_t CPUType, uint32_t CPUSubType,
case MachO::CPU_TYPE_ARM64:
switch (CPUSubType & ~MachO::CPU_SUBTYPE_MASK) {
case MachO::CPU_SUBTYPE_ARM64_ALL:
if (McpuDefault)
*McpuDefault = "cyclone";
if (ArchFlag)
*ArchFlag = "arm64";
return Triple("arm64-apple-darwin");

View File

@ -0,0 +1,3 @@
RUN: llvm-objdump -d -m -no-show-raw-insn %p/Inputs/print-armv8crypto.obj.macho-aarch64 | FileCheck %s
CHECK: 0: sha1su0.4s v0, v1, v2

View File

@ -1,3 +1,3 @@
RUN: llvm-objdump -d -m -no-show-raw-insn %p/Inputs/print-mrs.obj.macho-aarch64 | FileCheck %s
CHECK: 0: mrs x0, S3_7_C15_C2_0
CHECK: 0: mrs x0, CPM_IOACC_CTL_EL3