From 6225a96bf5b1ba9483960f67bb2da35148a4f705 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Fri, 9 Sep 2011 20:24:45 +0000 Subject: [PATCH] Thumb2 assembly parsing and encoding for MLA and MLS. llvm-svn: 139399 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 4 ++-- test/MC/ARM/basic-thumb2-instructions.s | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index b994d0fa758..882c4fe3d20 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3184,9 +3184,9 @@ getMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, Mnemonic == "mul" || Mnemonic == "bic" || Mnemonic == "asr" || Mnemonic == "umlal" || Mnemonic == "orr" || Mnemonic == "mvn" || Mnemonic == "rsb" || Mnemonic == "rsc" || Mnemonic == "orn" || - Mnemonic == "sbc" || Mnemonic == "mla" || Mnemonic == "umull" || + Mnemonic == "sbc" || Mnemonic == "umull" || Mnemonic == "eor" || Mnemonic == "smlal" || Mnemonic == "neg" || - (Mnemonic == "mov" && !isThumb())) { + ((Mnemonic == "mov" || Mnemonic == "mla") && !isThumb())) { CanAcceptCarrySet = true; } else { CanAcceptCarrySet = false; diff --git a/test/MC/ARM/basic-thumb2-instructions.s b/test/MC/ARM/basic-thumb2-instructions.s index 83e5391ef21..4e0f4f5c78d 100644 --- a/test/MC/ARM/basic-thumb2-instructions.s +++ b/test/MC/ARM/basic-thumb2-instructions.s @@ -972,6 +972,16 @@ _func: @ CHECK: mcrr2 p7, #15, r5, r4, c1 @ encoding: [0x44,0xfc,0xf1,0x57] +@------------------------------------------------------------------------------ +@ MLA/MLS +@------------------------------------------------------------------------------ + mla r1,r2,r3,r4 + mls r1,r2,r3,r4 + +@ CHECK: mla r1, r2, r3, r4 @ encoding: [0x02,0xfb,0x03,0x41] +@ CHECK: mls r1, r2, r3, r4 @ encoding: [0x02,0xfb,0x13,0x41] + + @------------------------------------------------------------------------------ @ IT @------------------------------------------------------------------------------