[PATCH] D24553: [Thumb] Set correct initial mapping symbol for big-endian thumb
Oliver Stannard via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 14 05:54:12 PDT 2016
olista01 created this revision.
olista01 added reviewers: rengolin, t.p.northover.
olista01 added a subscriber: llvm-commits.
olista01 set the repository for this revision to rL LLVM.
Herald added subscribers: rengolin, aemerson.
The initial mapping symbol state is set from the triple, but we only checked for the little-endian thumb triple, so could end up with an ARM mapping symbol for big-endian thumb.
Repository:
rL LLVM
https://reviews.llvm.org/D24553
Files:
lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
test/MC/ARM/mapping-initial.s
Index: test/MC/ARM/mapping-initial.s
===================================================================
--- /dev/null
+++ test/MC/ARM/mapping-initial.s
@@ -0,0 +1,9 @@
+@ RUN: llvm-mc -triple=armv7a-none-eabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s --check-prefix=ARM
+@ RUN: llvm-mc -triple=armebv7a-none-eabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s --check-prefix=ARM
+@ RUN: llvm-mc -triple=thumbv7a-none-eabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s --check-prefix=THUMB
+@ RUN: llvm-mc -triple=thumbebv7a-none-eabi -filetype=obj < %s | llvm-objdump -t - | FileCheck %s --check-prefix=THUMB
+
+ add r0, r0, r0
+
+@ ARM: 00000000 .text 00000000 $a
+@ THUMB: 00000000 .text 00000000 $t
Index: lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
===================================================================
--- lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
+++ lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp
@@ -204,7 +204,8 @@
MCAsmBackend &MAB, raw_pwrite_stream &OS,
MCCodeEmitter *Emitter, bool RelaxAll) {
return createARMELFStreamer(Ctx, MAB, OS, Emitter, false,
- T.getArch() == Triple::thumb);
+ (T.getArch() == Triple::thumb ||
+ T.getArch() == Triple::thumbeb));
}
static MCStreamer *createARMMachOStreamer(MCContext &Ctx, MCAsmBackend &MAB,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24553.71327.patch
Type: text/x-patch
Size: 1507 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160914/e9942ab6/attachment.bin>
More information about the llvm-commits
mailing list