[PATCH] D66849: [llvm-objdump] Add the missing ARMv8 subarch detection
Yi Kong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 20:47:46 PDT 2019
kongyi updated this revision to Diff 217571.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66849/new/
https://reviews.llvm.org/D66849
Files:
llvm/lib/Object/ELFObjectFile.cpp
llvm/test/tools/llvm-objdump/ARM/v8a-subarch.s
llvm/test/tools/llvm-objdump/ARM/v8r-subarch.s
Index: llvm/test/tools/llvm-objdump/ARM/v8r-subarch.s
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-objdump/ARM/v8r-subarch.s
@@ -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]
Index: llvm/test/tools/llvm-objdump/ARM/v8a-subarch.s
===================================================================
--- /dev/null
+++ llvm/test/tools/llvm-objdump/ARM/v8a-subarch.s
@@ -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]
Index: llvm/lib/Object/ELFObjectFile.cpp
===================================================================
--- llvm/lib/Object/ELFObjectFile.cpp
+++ llvm/lib/Object/ELFObjectFile.cpp
@@ -356,6 +356,21 @@
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())
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66849.217571.patch
Type: text/x-patch
Size: 1593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190828/b1dbfa90/attachment.bin>
More information about the llvm-commits
mailing list