From df4da14948dfbc567831f3af4f6ef913c4dd12ad Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Fri, 1 Jun 2007 00:56:15 +0000 Subject: [PATCH] Make jumptable non-predicable for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37381 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/ARMInstrInfo.td | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/lib/Target/ARM/ARMInstrInfo.td b/lib/Target/ARM/ARMInstrInfo.td index 821e536f801..3f117bc6128 100644 --- a/lib/Target/ARM/ARMInstrInfo.td +++ b/lib/Target/ARM/ARMInstrInfo.td @@ -400,14 +400,6 @@ class AI2po pattern> class AI3po pattern> : I; -// BR_JT instructions -class JTI pattern> - : I; -class JTI1 pattern> - : I; -class JTI2 pattern> - : I; - class BinOpFrag : PatFrag<(ops node:$LHS, node:$RHS), res>; class UnOpFrag : PatFrag<(ops node:$Src), res>; @@ -516,6 +508,13 @@ class AXI4 pattern> class AXIx2 pattern> : XI; +// BR_JT instructions +class JTI pattern> + : XI; +class JTI1 pattern> + : XI; +class JTI2 pattern> + : XI; //===----------------------------------------------------------------------===// // Instructions @@ -639,14 +638,14 @@ let isBranch = 1, isTerminator = 1, noResults = 1 in { [(br bb:$dst)]>; def BR_JTr : JTI<(ops GPR:$dst, jtblock_operand:$jt, i32imm:$id), - "mov", " pc, $dst \n$jt", + "mov pc, $dst \n$jt", [(ARMbrjt GPR:$dst, tjumptable:$jt, imm:$id)]>; def BR_JTm : JTI2<(ops addrmode2:$dst, jtblock_operand:$jt, i32imm:$id), - "ldr", " pc, $dst \n$jt", + "ldr pc, $dst \n$jt", [(ARMbrjt (i32 (load addrmode2:$dst)), tjumptable:$jt, imm:$id)]>; def BR_JTadd : JTI1<(ops GPR:$dst, GPR:$idx, jtblock_operand:$jt, i32imm:$id), - "add", " pc, $dst, $idx \n$jt", + "add pc, $dst, $idx \n$jt", [(ARMbrjt (add GPR:$dst, GPR:$idx), tjumptable:$jt, imm:$id)]>; }