[ARM] In ARMAsmParser, MatchCoprocessorOperandName() permitted p10 and p11 as operand...
[oota-llvm.git] / lib / Target / ARM / AsmParser / ARMAsmParser.cpp
index ba6075e91df0bcdf4110574c9a392e9124976d73..c56fc9cfb71f7dca413cad38ada2ce2b6238fb88 100644 (file)
@@ -2872,8 +2872,9 @@ static int MatchCoprocessorOperandName(StringRef Name, char CoprocOp) {
       return -1;
     switch (Name[2]) {
     default:  return -1;
-    case '0': return 10;
-    case '1': return 11;
+    // p10 and p11 are invalid for coproc instructions (reserved for FP/NEON)
+    case '0': return CoprocOp == 'p'? -1: 10;
+    case '1': return CoprocOp == 'p'? -1: 11;
     case '2': return 12;
     case '3': return 13;
     case '4': return 14;