From d88e28d13e66dfd9bd9dc22e21d82793161c5391 Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Thu, 20 Jun 2019 00:29:40 +0000 Subject: [llvm-objdump] Switch between ARM/Thumb based on mapping symbols. The ARMDisassembler changes allow changing between ARM and Thumb mode based on the MCSubtargetInfo, rather than the Target, which simplifies the other changes a bit. I'm not really happy with adding more target-specific logic to tools/llvm-objdump/, but there isn't any easy way around it: the logic in question specifically applies to disassembling an object file, and that code simply isn't located in lib/Target, at least at the moment. Differential Revision: https://reviews.llvm.org/D60927 llvm-svn: 363903 --- llvm/test/tools/llvm-objdump/ARM/v7r-subfeatures.s | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'llvm/test/tools/llvm-objdump/ARM') diff --git a/llvm/test/tools/llvm-objdump/ARM/v7r-subfeatures.s b/llvm/test/tools/llvm-objdump/ARM/v7r-subfeatures.s index bbe40a19387..78ec0ac61a7 100644 --- a/llvm/test/tools/llvm-objdump/ARM/v7r-subfeatures.s +++ b/llvm/test/tools/llvm-objdump/ARM/v7r-subfeatures.s @@ -1,5 +1,6 @@ -@ RUN: llvm-mc < %s -triple armv7r -mattr=+hwdiv-arm -filetype=obj | llvm-objdump -triple=thumb -d - | FileCheck %s -@ RUN: llvm-mc < %s -triple armv7r -mattr=+hwdiv-arm -filetype=obj | llvm-objdump -triple=arm -d - | FileCheck %s --check-prefix=CHECK-ARM +@ RUN: llvm-mc < %s -triple armv7r -mattr=+hwdiv-arm -filetype=obj | llvm-objdump -d - | FileCheck %s +@ v7r implies Thumb hwdiv, but ARM hwdiv is optional +@ FIXME: Does that imply we should actually refuse to disassemble it? .eabi_attribute Tag_CPU_arch, 10 // v7 .eabi_attribute Tag_CPU_arch_profile, 0x52 // 'R' profile @@ -9,8 +10,7 @@ div_arm: udiv r0, r1, r2 @CHECK-LABEL: div_arm -@CHECK-NOT: udiv r0, r1, r2 -@CHECK-ARM-NOT: udiv r0, r1, r2 +@CHECK: 11 f2 30 e7 .thumb div_thumb: -- cgit v1.2.3