aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2011-06-27 21:38:03 +0000
committerJim Grosbach <grosbach@apple.com>2011-06-27 21:38:03 +0000
commitdf8fe9901df829a02d1257121f35a78a434aca0d (patch)
treead0eab7b9dde93ba5c006473c48919b7c08d1e9c
parent15993f83a419950f06d2879d6701530ae6449317 (diff)
downloadexternal_llvm-df8fe9901df829a02d1257121f35a78a434aca0d.zip
external_llvm-df8fe9901df829a02d1257121f35a78a434aca0d.tar.gz
external_llvm-df8fe9901df829a02d1257121f35a78a434aca0d.tar.bz2
ARM Asm parsing of Thumb2 move immediate.
Thumb2 MOV mnemonic can accept both cc_out and predication. We don't (yet) encode the instruction properly, but this gets the parsing part. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133945 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 48daad0..8fe504f 100644
--- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
@@ -1826,6 +1826,7 @@ static StringRef SplitMnemonic(StringRef Mnemonic,
void ARMAsmParser::
GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
bool &CanAcceptPredicationCode) {
+ bool isThumbOne = TM.getSubtarget<ARMSubtarget>().isThumb1Only();
bool isThumb = TM.getSubtarget<ARMSubtarget>().isThumb();
if (Mnemonic == "and" || Mnemonic == "lsl" || Mnemonic == "lsr" ||
@@ -1836,7 +1837,7 @@ GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
Mnemonic == "rsb" || Mnemonic == "rsc" || Mnemonic == "orn" ||
Mnemonic == "sbc" || Mnemonic == "mla" || Mnemonic == "umull" ||
Mnemonic == "eor" || Mnemonic == "smlal" ||
- (Mnemonic == "mov" && !isThumb)) {
+ (Mnemonic == "mov" && !isThumbOne)) {
CanAcceptCarrySet = true;
} else {
CanAcceptCarrySet = false;
@@ -1856,7 +1857,7 @@ GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
if (isThumb)
if (Mnemonic == "bkpt" || Mnemonic == "mcr" || Mnemonic == "mcrr" ||
Mnemonic == "mrc" || Mnemonic == "mrrc" || Mnemonic == "cdp" ||
- Mnemonic == "mov")
+ (Mnemonic == "mov" && isThumbOne))
CanAcceptPredicationCode = false;
}