[Thumb] Set correct initial mapping symbol for big-endian thumb

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.

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

llvm-svn: 281894
This commit is contained in:
Oliver Stannard 2016-09-19 09:21:45 +00:00
parent eaee28b5ca
commit e1f6dc59ce
2 changed files with 11 additions and 1 deletions

View File

@ -204,7 +204,8 @@ static MCStreamer *createELFStreamer(const Triple &T, MCContext &Ctx,
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,

View File

@ -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