llvm.org GIT mirror llvm / d4d188e
Move newlines before inline jumptables from the asm strings in .td files to the jtblock_operand print methods. This avoids extra newlines in the disassembler's output. PR7757. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@109948 91177308-0d34-0410-b5e6-96231b3b80d8 Bob Wilson 10 years ago
4 changed file(s) with 9 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
937937 MCSymbol *JTISymbol = GetARMJTIPICJumpTableLabel2(JTI, MO2.getImm());
938938 // Can't use EmitLabel until instprinter happens, label comes out in the wrong
939939 // order.
940 O << *JTISymbol << ":\n";
940 O << "\n" << *JTISymbol << ":\n";
941941
942942 const char *JTEntryDirective = MAI->getData32bitsDirective();
943943
979979
980980 // Can't use EmitLabel until instprinter happens, label comes out in the wrong
981981 // order.
982 O << *JTISymbol << ":\n";
982 O << "\n" << *JTISymbol << ":\n";
983983
984984 const MachineJumpTableInfo *MJTI = MF->getJumpTableInfo();
985985 const std::vector &JT = MJTI->getJumpTables();
11101110
11111111 let isNotDuplicable = 1, isIndirectBranch = 1 in {
11121112 def BR_JTr : JTI<(outs), (ins GPR:$target, jtblock_operand:$jt, i32imm:$id),
1113 IIC_Br, "mov\tpc, $target \n$jt",
1113 IIC_Br, "mov\tpc, $target$jt",
11141114 [(ARMbrjt GPR:$target, tjumptable:$jt, imm:$id)]> {
11151115 let Inst{11-4} = 0b00000000;
11161116 let Inst{15-12} = 0b1111;
11201120 }
11211121 def BR_JTm : JTI<(outs),
11221122 (ins addrmode2:$target, jtblock_operand:$jt, i32imm:$id),
1123 IIC_Br, "ldr\tpc, $target \n$jt",
1123 IIC_Br, "ldr\tpc, $target$jt",
11241124 [(ARMbrjt (i32 (load addrmode2:$target)), tjumptable:$jt,
11251125 imm:$id)]> {
11261126 let Inst{15-12} = 0b1111;
11321132 }
11331133 def BR_JTadd : JTI<(outs),
11341134 (ins GPR:$target, GPR:$idx, jtblock_operand:$jt, i32imm:$id),
1135 IIC_Br, "add\tpc, $target, $idx \n$jt",
1135 IIC_Br, "add\tpc, $target, $idx$jt",
11361136 [(ARMbrjt (add GPR:$target, GPR:$idx), tjumptable:$jt,
11371137 imm:$id)]> {
11381138 let Inst{15-12} = 0b1111;
377377
378378 def tBR_JTr : T1JTI<(outs),
379379 (ins tGPR:$target, jtblock_operand:$jt, i32imm:$id),
380 IIC_Br, "mov\tpc, $target\n\t.align\t2\n$jt",
380 IIC_Br, "mov\tpc, $target\n\t.align\t2$jt",
381381 [(ARMbrjt tGPR:$target, tjumptable:$jt, imm:$id)]>,
382382 Encoding16 {
383383 let Inst{15-7} = 0b010001101;
25032503 def t2BR_JT :
25042504 T2JTI<(outs),
25052505 (ins GPR:$target, GPR:$index, jt2block_operand:$jt, i32imm:$id),
2506 IIC_Br, "mov\tpc, $target\n$jt",
2506 IIC_Br, "mov\tpc, $target$jt",
25072507 [(ARMbr2jt GPR:$target, GPR:$index, tjumptable:$jt, imm:$id)]> {
25082508 let Inst{31-27} = 0b11101;
25092509 let Inst{26-20} = 0b0100100;
25172517 def t2TBB :
25182518 T2JTI<(outs),
25192519 (ins tb_addrmode:$index, jt2block_operand:$jt, i32imm:$id),
2520 IIC_Br, "tbb\t$index\n$jt", []> {
2520 IIC_Br, "tbb\t$index$jt", []> {
25212521 let Inst{31-27} = 0b11101;
25222522 let Inst{26-20} = 0b0001101;
25232523 let Inst{19-16} = 0b1111; // Rn = pc (table follows this instruction)
25282528 def t2TBH :
25292529 T2JTI<(outs),
25302530 (ins tb_addrmode:$index, jt2block_operand:$jt, i32imm:$id),
2531 IIC_Br, "tbh\t$index\n$jt", []> {
2531 IIC_Br, "tbh\t$index$jt", []> {
25322532 let Inst{31-27} = 0b11101;
25332533 let Inst{26-20} = 0b0001101;
25342534 let Inst{19-16} = 0b1111; // Rn = pc (table follows this instruction)