From d73c6458dec34059d0692d8d22184f414352de80 Mon Sep 17 00:00:00 2001 From: Jim Grosbach <grosbach@apple.com> Date: Fri, 16 Sep 2011 18:05:48 +0000 Subject: [PATCH] Thumb2 assembly parsing and encoding for SMMULL. llvm-svn: 139921 --- llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 6 +++--- llvm/test/MC/ARM/basic-thumb2-instructions.s | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 66c6e48ee13e..51651e4b2644 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3168,14 +3168,14 @@ getMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, bool &CanAcceptPredicationCode) { if (Mnemonic == "and" || Mnemonic == "lsl" || Mnemonic == "lsr" || Mnemonic == "rrx" || Mnemonic == "ror" || Mnemonic == "sub" || - Mnemonic == "smull" || Mnemonic == "add" || Mnemonic == "adc" || + Mnemonic == "add" || Mnemonic == "adc" || Mnemonic == "mul" || Mnemonic == "bic" || Mnemonic == "asr" || Mnemonic == "umlal" || Mnemonic == "orr" || Mnemonic == "mvn" || Mnemonic == "rsb" || Mnemonic == "rsc" || Mnemonic == "orn" || Mnemonic == "sbc" || Mnemonic == "umull" || Mnemonic == "eor" || Mnemonic == "neg" || - (!isThumb() && (Mnemonic == "mov" || Mnemonic == "mla" || - Mnemonic == "smlal"))) { + (!isThumb() && (Mnemonic == "smull" || Mnemonic == "mov" || + Mnemonic == "mla" || Mnemonic == "smlal"))) { CanAcceptCarrySet = true; } else CanAcceptCarrySet = false; diff --git a/llvm/test/MC/ARM/basic-thumb2-instructions.s b/llvm/test/MC/ARM/basic-thumb2-instructions.s index 625671b8958c..f5f65cb0446f 100644 --- a/llvm/test/MC/ARM/basic-thumb2-instructions.s +++ b/llvm/test/MC/ARM/basic-thumb2-instructions.s @@ -1974,6 +1974,18 @@ _func: @ CHECK: smulttlt r8, r3, r4 @ encoding: [0x13,0xfb,0x34,0xf8] +@------------------------------------------------------------------------------ +@ SMULL +@------------------------------------------------------------------------------ + smull r3, r9, r0, r1 + it eq + smulleq r8, r3, r4, r5 + +@ CHECK: smull r3, r9, r0, r1 @ encoding: [0x80,0xfb,0x01,0x39] +@ CHECK: it eq @ encoding: [0x08,0xbf] +@ CHECK: smulleq r8, r3, r4, r5 @ encoding: [0x84,0xfb,0x05,0x83] + + @------------------------------------------------------------------------------ @ SUB (register) @------------------------------------------------------------------------------