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