aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp2
-rw-r--r--test/MC/ARM/basic-thumb-instructions.s8
2 files changed, 9 insertions, 1 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 258d692b12..6a14387640 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 0e4c580740..5e45c3c7dc 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]