[llvm-commits] CVS: llvm/lib/Target/PowerPC/PPCInstrFormats.td PPCInstrInfo.td

Chris Lattner lattner at cs.uiuc.edu
Sun Dec 4 10:43:05 PST 2005



Changes in directory llvm/lib/Target/PowerPC:

PPCInstrFormats.td updated: 1.59 -> 1.60
PPCInstrInfo.td updated: 1.147 -> 1.148
---
Log message:

Define BR in the .td file now that Evan made tblgen smarter.


---
Diffs of the changes:  (+10 -5)

 PPCInstrFormats.td |    3 ++-
 PPCInstrInfo.td    |   12 ++++++++----
 2 files changed, 10 insertions(+), 5 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCInstrFormats.td
diff -u llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.59 llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.60
--- llvm/lib/Target/PowerPC/PPCInstrFormats.td:1.59	Tue Nov 29 16:42:50 2005
+++ llvm/lib/Target/PowerPC/PPCInstrFormats.td	Sun Dec  4 12:42:54 2005
@@ -31,8 +31,9 @@
 
 // 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;


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.147 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.148
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.147	Tue Nov 29 16:42:50 2005
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td	Sun Dec  4 12:42:54 2005
@@ -128,7 +128,7 @@
 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 @@
   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 @@
           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>;
 }
 






More information about the llvm-commits mailing list