llvm can't correctly support 'H', 'Q' and 'R' modifiers. Just mark it an error.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 27 May 2010 22:08:38 +0000 (22:08 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 27 May 2010 22:08:38 +0000 (22:08 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104891 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
test/CodeGen/ARM/inlineasm.ll

index 093f599a2b99d0d5245e9aedfe029f781136648d..fc73938002d0d23e8b2b85b27129e2b273f305d9 100644 (file)
@@ -1064,27 +1064,11 @@ bool ARMAsmPrinter::PrintAsmOperand(const MachineInstr *MI, unsigned OpNum,
       printOperand(MI, OpNum, O);
       return false;
     case 'Q':
-      // Print the least significant half of a register pair.
-      if (TM.getTargetData()->isBigEndian())
-        break;
-      printOperand(MI, OpNum, O);
-      return false;
     case 'R':
-      // Print the most significant half of a register pair.
-      if (TM.getTargetData()->isLittleEndian())
-        break;
-      printOperand(MI, OpNum, O);
-      return false;
     case 'H':
-      break;
-    }
-    // Print the second half of a register pair (for 'Q', 'R' or 'H').
-    // Verify that this operand has two consecutive registers.
-    if (!MI->getOperand(OpNum).isReg() ||
-        OpNum+1 == MI->getNumOperands() ||
-        !MI->getOperand(OpNum+1).isReg())
+      llvm_unreachable("llvm does not support 'Q', 'R', and 'H' modifiers!");
       return true;
-    ++OpNum;
+    }
   }
 
   printOperand(MI, OpNum, O);
index d522348ba9993c69c797a5fd4bd53ffd076dd3de..cca3c696b4a8bf91426270abcb11412188682b37 100644 (file)
@@ -6,14 +6,6 @@ define i32 @test1(i32 %tmp54) {
 }
 
 define void @test2() {
-       %tmp1 = call i64 asm "ldmia $1!, {$0, ${0:H}}", "=r,=*r,1"( i32** null, i32* null )             ; <i64> [#uses=2]
-       %tmp2 = lshr i64 %tmp1, 32              ; <i64> [#uses=1]
-       %tmp3 = trunc i64 %tmp2 to i32          ; <i32> [#uses=1]
-       %tmp4 = call i32 asm "pkhbt $0, $1, $2, lsl #16", "=r,r,r"( i32 0, i32 %tmp3 )          ; <i32> [#uses=0]
-       ret void
-}
-
-define void @test3() {
        tail call void asm sideeffect "/* number: ${0:c} */", "i"( i32 1 )
        ret void
 }