summaryrefslogtreecommitdiff
path: root/lib/Target
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-04 18:42:54 +0000
committerChris Lattner <sabre@nondot.org>2005-12-04 18:42:54 +0000
commit1e48478557587d3931d5e8277fe79719d78ab245 (patch)
treef5f0d50655732f5cf3adea4848c967ef00f372fc /lib/Target
parentd35b8c1adb27f5f7c4af8585bfd78605799a457f (diff)
downloadllvm-1e48478557587d3931d5e8277fe79719d78ab245.tar.gz
llvm-1e48478557587d3931d5e8277fe79719d78ab245.tar.bz2
llvm-1e48478557587d3931d5e8277fe79719d78ab245.tar.xz
Define BR in the .td file now that Evan made tblgen smarter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24589 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r--lib/Target/PowerPC/PPCInstrFormats.td3
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td12
2 files changed, 10 insertions, 5 deletions
diff --git a/lib/Target/PowerPC/PPCInstrFormats.td b/lib/Target/PowerPC/PPCInstrFormats.td
index ef3cf1a7ab..4d69c7700b 100644
--- a/lib/Target/PowerPC/PPCInstrFormats.td
+++ b/lib/Target/PowerPC/PPCInstrFormats.td
@@ -31,8 +31,9 @@ class I<bits<6> opcode, dag OL, string asmstr, InstrItinClass itin>
// 1.7.1 I-Form
class IForm<bits<6> opcode, bit aa, bit lk, dag OL, string asmstr,
- InstrItinClass itin>
+ InstrItinClass itin, list<dag> pattern>
: I<opcode, OL, asmstr, itin> {
+ let Pattern = pattern;
bits<24> LI;
let Inst{6-29} = LI;
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 38f4ba830e..48ac98176b 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -128,7 +128,7 @@ def u16imm : Operand<i32> {
def s16immX4 : Operand<i32> { // Multiply imm by 4 before printing.
let PrintMethod = "printS16X4ImmOperand";
}
-def target : Operand<i32> {
+def target : Operand<OtherVT> {
let PrintMethod = "printBranchOperand";
}
def calltarget : Operand<i32> {
@@ -194,7 +194,9 @@ let isBranch = 1, isTerminator = 1 in {
def COND_BRANCH : Pseudo<(ops CRRC:$crS, u16imm:$opc,
target:$true, target:$false),
"; COND_BRANCH", []>;
- def B : IForm<18, 0, 0, (ops target:$func), "b $func", BrB>;
+ def B : IForm<18, 0, 0, (ops target:$dst),
+ "b $dst", BrB,
+ [(br bb:$dst)]>;
// FIXME: 4*CR# needs to be added to the BI field!
// This will only work for CR0 as it stands now
@@ -223,8 +225,10 @@ let isCall = 1,
LR,CTR,
CR0,CR1,CR5,CR6,CR7] in {
// Convenient aliases for call instructions
- def BL : IForm<18, 0, 1, (ops calltarget:$func, variable_ops), "bl $func", BrB>;
- def BLA : IForm<18, 1, 1, (ops aaddr:$func, variable_ops), "bla $func", BrB>;
+ def BL : IForm<18, 0, 1, (ops calltarget:$func, variable_ops),
+ "bl $func", BrB, []>;
+ def BLA : IForm<18, 1, 1, (ops aaddr:$func, variable_ops),
+ "bla $func", BrB, []>;
def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops variable_ops), "bctrl", BrB>;
}