aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/PowerPC/PPCInstrFormats.td
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-11-17 23:53:28 +0000
committerChris Lattner <sabre@nondot.org>2006-11-17 23:53:28 +0000
commitd5275157b540f53fe3795489229c021390e90b3f (patch)
tree976cc9dee101c127aac5e3cbaa2eb59caa96c897 /lib/Target/PowerPC/PPCInstrFormats.td
parent18258c640466274c26e89016e361ec411ff78520 (diff)
add encoding for BCC, after finally wrestling strange ppc/tblgen endianness
issues to the ground. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrFormats.td')
-rw-r--r--lib/Target/PowerPC/PPCInstrFormats.td18
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/Target/PowerPC/PPCInstrFormats.td b/lib/Target/PowerPC/PPCInstrFormats.td
index ce86d8f358..abf2267f06 100644
--- a/lib/Target/PowerPC/PPCInstrFormats.td
+++ b/lib/Target/PowerPC/PPCInstrFormats.td
@@ -74,6 +74,24 @@ class BForm<bits<6> opcode, bit aa, bit lk, bits<5> bo, bits<2> bicode, dag OL,
let Inst{31} = lk;
}
+class CBForm<bits<6> opcode, bit aa, bit lk, dag OL,
+ string asmstr> : I<opcode, OL, asmstr, BrB> {
+ bits<7> BIBO; // 2 bits of BI and 5 bits of BO.
+ bits<3> CR;
+ bits<14> BD;
+
+ bits<5> BI;
+ let BI{0-1} = BIBO{5-6};
+ let BI{2-4} = CR{0-2};
+
+ let Inst{6-10} = BIBO{4-0};
+ let Inst{11-15} = BI;
+ let Inst{16-29} = BD;
+ let Inst{30} = aa;
+ let Inst{31} = lk;
+}
+
+
// 1.7.4 D-Form
class DForm_base<bits<6> opcode, dag OL, string asmstr, InstrItinClass itin,
list<dag> pattern>