forked from OSchip/llvm-project
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. llvm-svn: 133945
This commit is contained in:
parent
8d71a75777
commit
1a13cd77f1
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue