Thumb .n mnemonic qualifiers can be ignored for now.
authorJim Grosbach <grosbach@apple.com>
Wed, 24 Aug 2011 22:19:48 +0000 (22:19 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 24 Aug 2011 22:19:48 +0000 (22:19 +0000)
We'll need to pay attention to them when we start getting more serious about
the details of parsing thumb2 assembly.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138500 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index 50fa8eaa2df18d07ec4b0f927356ac81d7616c92..f5d2a0ea3d655f8876666f68556dda89ad7318b5 100644 (file)
@@ -3015,7 +3015,11 @@ bool ARMAsmParser::ParseInstruction(StringRef Name, SMLoc NameLoc,
     Next = Name.find('.', Start + 1);
     StringRef ExtraToken = Name.slice(Start, Next);
 
-    Operands.push_back(ARMOperand::CreateToken(ExtraToken, NameLoc));
+    // For now, we're only parsing Thumb1 (for the most part), so
+    // just ignore ".n" qualifiers. We'll use them to restrict
+    // matching when we do Thumb2.
+    if (ExtraToken != ".n")
+      Operands.push_back(ARMOperand::CreateToken(ExtraToken, NameLoc));
   }
 
   // Read the remaining operands.