needed two predicate operands before the imm operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126662
91177308-0d34-0410-b5e6-
96231b3b80d8
+ // Some instructions have predicate operands first before the immediate.
+ if(Opcode == ARM::tBLXi_r9 || Opcode == ARM::tBLr9) {
+ // Handling the two predicate operands before the imm operand.
+ if (B->DoPredicateOperands(MI, Opcode, insn, NumOps))
+ NumOpsAdded += 2;
+ else {
+ DEBUG(errs() << "Expected predicate operands not found.\n");
+ return false;
+ }
+ }
+
// Add the imm operand.
int Offset = 0;
// Add the imm operand.
int Offset = 0;
// to compensate.
MI.addOperand(MCOperand::CreateImm(Offset + 4));
// to compensate.
MI.addOperand(MCOperand::CreateImm(Offset + 4));
+ // This is an increment as some predicate operands may have been added first.
+ NumOpsAdded += 1;
# CHECK: msr cpsr_fc, r0
0x80 0xf3 0x00 0x89
# CHECK: msr cpsr_fc, r0
0x80 0xf3 0x00 0x89
+
+# CHECK: blx #0
+0xff 0xf7 0xfe 0xef