1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00

ARM assembly parsing and encoding for UMLAL.

Fix parsing of the 's' suffix for the mnemonic. Add tests.

llvm-svn: 136274
This commit is contained in:
Jim Grosbach 2011-07-27 21:58:11 +00:00
parent f48e465aa5
commit dd55e1de02
2 changed files with 15 additions and 1 deletions

View File

@ -2359,7 +2359,8 @@ StringRef ARMAsmParser::splitMnemonic(StringRef Mnemonic,
// First, split out any predication code. Ignore mnemonics we know aren't // First, split out any predication code. Ignore mnemonics we know aren't
// predicated but do have a carry-set and so weren't caught above. // predicated but do have a carry-set and so weren't caught above.
if (Mnemonic != "adcs" && Mnemonic != "bics" && Mnemonic != "movs" && if (Mnemonic != "adcs" && Mnemonic != "bics" && Mnemonic != "movs" &&
Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls") { Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls" &&
Mnemonic != "umlals") {
unsigned CC = StringSwitch<unsigned>(Mnemonic.substr(Mnemonic.size()-2)) unsigned CC = StringSwitch<unsigned>(Mnemonic.substr(Mnemonic.size()-2))
.Case("eq", ARMCC::EQ) .Case("eq", ARMCC::EQ)
.Case("ne", ARMCC::NE) .Case("ne", ARMCC::NE)

View File

@ -2068,3 +2068,16 @@ _func:
@ CHECK: umaal r3, r4, r5, r6 @ encoding: [0x95,0x46,0x43,0xe0] @ CHECK: umaal r3, r4, r5, r6 @ encoding: [0x95,0x46,0x43,0xe0]
@ CHECK: umaallt r3, r4, r5, r6 @ encoding: [0x95,0x46,0x43,0xb0] @ CHECK: umaallt r3, r4, r5, r6 @ encoding: [0x95,0x46,0x43,0xb0]
@------------------------------------------------------------------------------
@ UMLAL
@------------------------------------------------------------------------------
umlal r2, r4, r6, r8
umlalgt r6, r1, r2, r6
umlals r2, r9, r2, r3
umlalseq r3, r5, r1, r2
@ CHECK: umlal r2, r4, r6, r8 @ encoding: [0x96,0x28,0xa4,0xe0]
@ CHECK: umlalgt r6, r1, r2, r6 @ encoding: [0x92,0x66,0xa1,0xc0]
@ CHECK: umlals r2, r9, r2, r3 @ encoding: [0x92,0x23,0xb9,0xe0]
@ CHECK: umlalseq r3, r5, r1, r2 @ encoding: [0x91,0x32,0xb5,0x00]