ARM asm parser wasn't able to parse a "mov" instruction while in Thumb

mode (only the "mov.w" variant). Now, when parsing "mov" in thumb mode,
default to the Thumb 1 versions/encodings.

llvm-svn: 132233
This commit is contained in:
Bruno Cardoso Lopes 2011-05-27 23:46:09 +00:00
parent 8ed6285c8d
commit 93eae0fd19
2 changed files with 8 additions and 3 deletions

View File

@ -1830,10 +1830,11 @@ GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
Mnemonic == "rrx" || Mnemonic == "ror" || Mnemonic == "sub" ||
Mnemonic == "smull" || Mnemonic == "add" || Mnemonic == "adc" ||
Mnemonic == "mul" || Mnemonic == "bic" || Mnemonic == "asr" ||
Mnemonic == "umlal" || Mnemonic == "orr" || Mnemonic == "mov" ||
Mnemonic == "umlal" || Mnemonic == "orr" || Mnemonic == "mvn" ||
Mnemonic == "rsb" || Mnemonic == "rsc" || Mnemonic == "orn" ||
Mnemonic == "sbc" || Mnemonic == "mla" || Mnemonic == "umull" ||
Mnemonic == "eor" || Mnemonic == "smlal" || Mnemonic == "mvn") {
Mnemonic == "eor" || Mnemonic == "smlal" ||
(Mnemonic == "mov" && !isThumb)) {
CanAcceptCarrySet = true;
} else {
CanAcceptCarrySet = false;
@ -1852,7 +1853,8 @@ GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
if (isThumb)
if (Mnemonic == "bkpt" || Mnemonic == "mcr" || Mnemonic == "mcrr" ||
Mnemonic == "mrc" || Mnemonic == "mrrc" || Mnemonic == "cdp")
Mnemonic == "mrc" || Mnemonic == "mrrc" || Mnemonic == "cdp" ||
Mnemonic == "mov")
CanAcceptPredicationCode = false;
}

View File

@ -70,3 +70,6 @@
@ CHECK: cpsie aif @ encoding: [0x67,0xb6]
cpsie aif
@ CHECK: mov r0, pc @ encoding: [0x78,0x46]
mov r0, pc