diff options
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/basic-thumb2-instructions.s | 2 | 
2 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 0729da1a8ea..a558a61592f 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3328,7 +3328,8 @@ parseMSRMaskOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands) {          FlagsVal = 8; // No flag      }    } else if (SpecReg == "cpsr" || SpecReg == "spsr") { -    if (Flags == "all") // cpsr_all is an alias for cpsr_fc +    // cpsr_all is an alias for cpsr_fc, as is plain cpsr. +    if (Flags == "all" || Flags == "")        Flags = "fc";      for (int i = 0, e = Flags.size(); i != e; ++i) {        unsigned Flag = StringSwitch<unsigned>(Flags.substr(i, 1)) diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s index 0b8257fdb95..c6ef8aff0b1 100644 --- a/llvm/test/MC/ARM/basic-thumb2-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s @@ -1268,6 +1268,7 @@ _func:          msr  spsr_fc, r0          msr  SPSR_fsxc, r5          msr  cpsr_fsxc, r8 +        msr  cpsr, r3  @ CHECK: msr	APSR_nzcvq, r1          @ encoding: [0x81,0xf3,0x00,0x88]  @ CHECK: msr	APSR_g, r2              @ encoding: [0x82,0xf3,0x00,0x84] @@ -1283,6 +1284,7 @@ _func:  @ CHECK: msr	SPSR_fc, r0             @ encoding: [0x90,0xf3,0x00,0x89]  @ CHECK: msr	SPSR_fsxc, r5           @ encoding: [0x95,0xf3,0x00,0x8f]  @ CHECK: msr	CPSR_fsxc, r8           @ encoding: [0x88,0xf3,0x00,0x8f] +@ CHECK: msr	CPSR_fc, r3             @ encoding: [0x83,0xf3,0x00,0x89]  @------------------------------------------------------------------------------  | 

