From: Jim Grosbach Date: Fri, 19 Aug 2011 22:51:03 +0000 (+0000) Subject: Thumb assembly parsing and encoding for NEG. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=2c3f70e5d4b4f179f21ed1b2ba14674f9d65c9b0;p=oota-llvm.git Thumb assembly parsing and encoding for NEG. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138131 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 258d692b126..6a14387640e 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2831,7 +2831,7 @@ getMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, Mnemonic == "umlal" || Mnemonic == "orr" || Mnemonic == "mvn" || Mnemonic == "rsb" || Mnemonic == "rsc" || Mnemonic == "orn" || Mnemonic == "sbc" || Mnemonic == "mla" || Mnemonic == "umull" || - Mnemonic == "eor" || Mnemonic == "smlal" || + Mnemonic == "eor" || Mnemonic == "smlal" || Mnemonic == "neg" || // FIXME: We need a better way. This really confused Thumb2 // parsing for 'mov'. (Mnemonic == "mov" && !isThumbOne())) { diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index 0e4c5807402..5e45c3c7dc2 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -339,3 +339,11 @@ _func: mvns r6, r3 @ CHECK: mvns r6, r3 @ encoding: [0xde,0x43] + + +@------------------------------------------------------------------------------ +@ NEG +@------------------------------------------------------------------------------ + negs r3, r4 + +@ CHECK: rsbs r3, r4, #0 @ encoding: [0x63,0x42]