From dd55e1de020f61ba3bdf56de58a4259e80bee55d Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 27 Jul 2011 21:58:11 +0000 Subject: [PATCH] ARM assembly parsing and encoding for UMLAL. Fix parsing of the 's' suffix for the mnemonic. Add tests. llvm-svn: 136274 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 ++- test/MC/ARM/basic-arm-instructions.s | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 352e9020098..6af52812944 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2359,7 +2359,8 @@ StringRef ARMAsmParser::splitMnemonic(StringRef Mnemonic, // 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. if (Mnemonic != "adcs" && Mnemonic != "bics" && Mnemonic != "movs" && - Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls") { + Mnemonic != "muls" && Mnemonic != "smlals" && Mnemonic != "smulls" && + Mnemonic != "umlals") { unsigned CC = StringSwitch(Mnemonic.substr(Mnemonic.size()-2)) .Case("eq", ARMCC::EQ) .Case("ne", ARMCC::NE) diff --git a/test/MC/ARM/basic-arm-instructions.s b/test/MC/ARM/basic-arm-instructions.s index c5d27debc22..f09bfd92dc2 100644 --- a/test/MC/ARM/basic-arm-instructions.s +++ b/test/MC/ARM/basic-arm-instructions.s @@ -2068,3 +2068,16 @@ _func: @ CHECK: umaal r3, r4, r5, r6 @ encoding: [0x95,0x46,0x43,0xe0] @ 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]