ARM can only use narrow encoding for low regs.
authorJim Grosbach <grosbach@apple.com>
Fri, 30 Mar 2012 18:39:43 +0000 (18:39 +0000)
committerJim Grosbach <grosbach@apple.com>
Fri, 30 Mar 2012 18:39:43 +0000 (18:39 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153765 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index 10e3885406b48558aacdd0e74ed6e5d1b5d6da14..f8edced2085771f943192d6bc5e0f5047aefa567 100644 (file)
@@ -6857,6 +6857,7 @@ processInstruction(MCInst &Inst,
     // instead of T3. For compatibility with the system 'as'. Make sure the
     // wide encoding wasn't explicit.
     if (Inst.getOperand(0).getReg() != Inst.getOperand(1).getReg() ||
+        !isARMLowRegister(Inst.getOperand(0).getReg()) ||
         (unsigned)Inst.getOperand(2).getImm() > 255 ||
         ((!inITBlock() && Inst.getOperand(5).getReg() != ARM::CPSR) ||
         (inITBlock() && Inst.getOperand(5).getReg() != 0)) ||