1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

[llvm-objdump] Add the missing ARMv8 subarch detection

Differential Revision: https://reviews.llvm.org/D66849

llvm-svn: 370163
This commit is contained in:
Yi Kong 2019-08-28 06:37:22 +00:00
parent 062f09fe21
commit 97b06562dc
3 changed files with 36 additions and 0 deletions

View File

@ -356,6 +356,21 @@ void ELFObjectFileBase::setARMSubArch(Triple &TheTriple) const {
case ARMBuildAttrs::v7E_M:
Triple += "v7em";
break;
case ARMBuildAttrs::v8_A:
Triple += "v8a";
break;
case ARMBuildAttrs::v8_R:
Triple += "v8r";
break;
case ARMBuildAttrs::v8_M_Base:
Triple += "v8m.base";
break;
case ARMBuildAttrs::v8_M_Main:
Triple += "v8m.main";
break;
case ARMBuildAttrs::v8_1_M_Main:
Triple += "v8.1m.main";
break;
}
}
if (!isLittleEndian())

View File

@ -0,0 +1,9 @@
@ RUN: llvm-mc < %s -triple armv8a-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s
.arch armv8a
lda:
lda r0, [r1]
@ CHECK-LABEL:lda
@ CHECK: 9f 0c 91 e1 lda r0, [r1]

View File

@ -0,0 +1,12 @@
@ RUN: llvm-mc < %s -triple armv8r-elf -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s
.eabi_attribute Tag_CPU_arch, 15 // v8_R
.eabi_attribute Tag_CPU_arch_profile, 0x52 // 'R' profile
.arch armv8
lda:
lda r0, [r1]
@ CHECK-LABEL:lda
@ CHECK: 9f 0c 91 e1 lda r0, [r1]