llvm.org GIT mirror llvm / fdcee77
Follow the current hack set and enable the correct parsing of bkpt while in thumb mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123772 91177308-0d34-0410-b5e6-96231b3b80d8 Bruno Cardoso Lopes 9 years ago
3 changed file(s) with 15 addition(s) and 3 deletion(s). Raw diff Collapse all Expand all
8080 bool MatchAndEmitInstruction(SMLoc IDLoc,
8181 SmallVectorImpl &Operands,
8282 MCStreamer &Out);
83 void GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
84 bool &CanAcceptPredicationCode);
8385
8486 /// @name Auto-generated Match Functions
8587 /// {
11681170 /// inclusion of carry set or predication code operands.
11691171 //
11701172 // FIXME: It would be nice to autogen this.
1171 static void GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
1172 bool &CanAcceptPredicationCode) {
1173 void ARMAsmParser::
1174 GetMnemonicAcceptInfo(StringRef Mnemonic, bool &CanAcceptCarrySet,
1175 bool &CanAcceptPredicationCode) {
1176 bool isThumb = TM.getSubtarget().isThumb();
1177
11731178 if (Mnemonic == "and" || Mnemonic == "lsl" || Mnemonic == "lsr" ||
11741179 Mnemonic == "rrx" || Mnemonic == "ror" || Mnemonic == "sub" ||
11751180 Mnemonic == "smull" || Mnemonic == "add" || Mnemonic == "adc" ||
11871192 Mnemonic == "cps" || Mnemonic == "mcr2" || Mnemonic == "it" ||
11881193 Mnemonic == "mcrr2" || Mnemonic == "cbz" || Mnemonic == "cdp2" ||
11891194 Mnemonic == "trap" || Mnemonic == "mrc2" || Mnemonic == "mrrc2" ||
1190 Mnemonic == "dsb" || Mnemonic == "movs") {
1195 Mnemonic == "dsb" || Mnemonic == "movs" ||
1196 (isThumb && Mnemonic == "bkpt")) {
11911197 CanAcceptPredicationCode = false;
11921198 } else {
11931199 CanAcceptPredicationCode = true;
126126
127127 @ CHECK: bfi r0, r0, #5, #7 @ encoding: [0x90,0x02,0xcb,0xe7]
128128 bfi r0, r0, #5, #7
129
130 @ CHECK: bkpt #10 @ encoding: [0x7a,0x00,0x20,0xe1]
131 bkpt #10
3434
3535 @ CHECK: ldr r3, [r1, r2] @ encoding: [0x8b,0x58]
3636 ldr r3, [r1, r2]
37
38 @ CHECK: bkpt #2 @ encoding: [0x02,0xbe]
39 bkpt #2