From 04d55f1905748b0d66655e2332e1a232a3f665f4 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Mon, 22 Aug 2011 23:55:58 +0000 Subject: [PATCH] Thumb parsing and encoding for SBC. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138311 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 3 ++- test/MC/ARM/basic-thumb-instructions.s | 10 +++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 6bb59d4fa9e..953e3d95697 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -2755,7 +2755,8 @@ StringRef ARMAsmParser::splitMnemonic(StringRef Mnemonic, // 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 != "umlals" && Mnemonic != "umulls" && Mnemonic != "lsls") { + Mnemonic != "umlals" && Mnemonic != "umulls" && Mnemonic != "lsls" && + Mnemonic != "sbcs") { unsigned CC = StringSwitch(Mnemonic.substr(Mnemonic.size()-2)) .Case("eq", ARMCC::EQ) .Case("ne", ARMCC::NE) diff --git a/test/MC/ARM/basic-thumb-instructions.s b/test/MC/ARM/basic-thumb-instructions.s index d7b902bcda0..197094df490 100644 --- a/test/MC/ARM/basic-thumb-instructions.s +++ b/test/MC/ARM/basic-thumb-instructions.s @@ -406,4 +406,12 @@ _func: @------------------------------------------------------------------------------ rsbs r1, r3, #0 - rsbs r1, r3, #0 @ encoding: [0x59,0x42] +@ CHECK: rsbs r1, r3, #0 @ encoding: [0x59,0x42] + + +@------------------------------------------------------------------------------ +@ SBC +@------------------------------------------------------------------------------ + sbcs r4, r3 + +@ CHECK: sbcs r4, r3 @ encoding: [0x9c,0x41]