ARM assembly parsing for 'msr' plain 'cpsr' operand.

Plain 'cpsr' is an alias for 'cpsr_fc'.

rdar://11153753

llvm-svn: 154080
This commit is contained in:
Jim Grosbach 2012-04-05 03:17:53 +00:00
parent f2390e8303
commit 3d00eecc53
2 changed files with 4 additions and 1 deletions

View File

@ -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))

View File

@ -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]
@------------------------------------------------------------------------------