Don't automatically set the "fc" bits on MSR instructions if the user didn't ask...
authorOwen Anderson <resistor@mac.com>
Fri, 21 Oct 2011 18:43:28 +0000 (18:43 +0000)
committerOwen Anderson <resistor@mac.com>
Fri, 21 Oct 2011 18:43:28 +0000 (18:43 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142669 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index 67a464fa8a991f99e98cc1de7f0ab75a628ce200..0b585c1dad0dc84755af8524cfec862f858bb43e 100644 (file)
@@ -2588,9 +2588,13 @@ parseMSRMaskOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {
   } else // No match for special register.
     return MatchOperand_NoMatch;
 
-  // Special register without flags are equivalent to "fc" flags.
-  if (!FlagsVal)
-    FlagsVal = 0x9;
+  // Special register without flags is NOT equivalent to "fc" flags.
+  // NOTE: This is a divergence from gas' behavior.  Uncommenting the following
+  // two lines would enable gas compatibility at the expense of breaking
+  // round-tripping.
+  //
+  // if (!FlagsVal)
+  //  FlagsVal = 0x9;
 
   // Bit 4: Special Reg (cpsr, apsr => 0; spsr => 1)
   if (SpecReg == "spsr")