diff options
author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-01-18 20:55:11 +0000 |
---|---|---|
committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2011-01-18 20:55:11 +0000 |
commit | e6290ccf9b56dec24e3821eec1a3fb034b1bc0a8 (patch) | |
tree | bacdbb2d053eea64dd6a51f971fd72ac0a65a017 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
parent | 86d56c651d3419d02532f5fbee843990b6ed517a (diff) | |
download | bcm5719-llvm-e6290ccf9b56dec24e3821eec1a3fb034b1bc0a8.tar.gz bcm5719-llvm-e6290ccf9b56dec24e3821eec1a3fb034b1bc0a8.zip |
Follow the current hack set and enable the correct parsing of bkpt while in thumb mode.
llvm-svn: 123772
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 6482087be26..4948ad5e625 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -81,6 +81,8 @@ class ARMAsmParser : public TargetAsmParser { bool MatchAndEmitInstruction(SMLoc IDLoc, SmallVectorImpl<MCParsedAsmOperand*> &Operands, MCStreamer &Out); + void GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, + bool &CanAcceptPredicationCode); /// @name Auto-generated Match Functions /// { @@ -1169,8 +1171,11 @@ static StringRef SplitMnemonicAndCC(StringRef Mnemonic, /// inclusion of carry set or predication code operands. // // FIXME: It would be nice to autogen this. -static void GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, - bool &CanAcceptPredicationCode) { +void ARMAsmParser:: +GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, + bool &CanAcceptPredicationCode) { + bool isThumb = TM.getSubtarget<ARMSubtarget>().isThumb(); + if (Mnemonic == "and" || Mnemonic == "lsl" || Mnemonic == "lsr" || Mnemonic == "rrx" || Mnemonic == "ror" || Mnemonic == "sub" || Mnemonic == "smull" || Mnemonic == "add" || Mnemonic == "adc" || @@ -1188,7 +1193,8 @@ static void GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet, Mnemonic == "cps" || Mnemonic == "mcr2" || Mnemonic == "it" || Mnemonic == "mcrr2" || Mnemonic == "cbz" || Mnemonic == "cdp2" || Mnemonic == "trap" || Mnemonic == "mrc2" || Mnemonic == "mrrc2" || - Mnemonic == "dsb" || Mnemonic == "movs") { + Mnemonic == "dsb" || Mnemonic == "movs" || + (isThumb && Mnemonic == "bkpt")) { CanAcceptPredicationCode = false; } else { CanAcceptPredicationCode = true; |