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

Chris Lattner sabre at nondot.org
Sun Feb 25 11:21:10 PST 2007



Changes in directory llvm/lib/Target/PowerPC:

PPCInstr64Bit.td updated: 1.39 -> 1.40
PPCInstrInfo.td updated: 1.273 -> 1.274
---
Log message:

one important bugfix: PPC32 didn't have both elf and macho support for
external symbols and global addresses.  Add the missing ones.

one important workaround: PPCISD::CALL is matched by both PPCcall_ELF
and PPCcall_Macho, disable the _ELF patterns for now.


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

 PPCInstr64Bit.td |    6 +++---
 PPCInstrInfo.td  |   10 +++++++---
 2 files changed, 10 insertions(+), 6 deletions(-)


Index: llvm/lib/Target/PowerPC/PPCInstr64Bit.td
diff -u llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.39 llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.40
--- llvm/lib/Target/PowerPC/PPCInstr64Bit.td:1.39	Sat Feb 24 23:34:32 2007
+++ llvm/lib/Target/PowerPC/PPCInstr64Bit.td	Sun Feb 25 13:20:53 2007
@@ -102,7 +102,7 @@
                             
   def BLA8_ELF : IForm<18, 1, 1,
                        (ops aaddr:$func, variable_ops),
-                       "bla $func", BrB, [(PPCcall_ELF (i64 imm:$func))]>;
+                       "bla $func", BrB, [/*(PPCcall_ELF (i64 imm:$func))*/]>;
 }
 
 
@@ -111,12 +111,12 @@
           (BL8_Macho tglobaladdr:$dst)>;
 def : Pat<(PPCcall_Macho (i64 texternalsym:$dst)),
           (BL8_Macho texternalsym:$dst)>;
-
+/*
 def : Pat<(PPCcall_ELF (i64 tglobaladdr:$dst)),
           (BL8_ELF tglobaladdr:$dst)>;
 def : Pat<(PPCcall_ELF (i64 texternalsym:$dst)),
           (BL8_ELF texternalsym:$dst)>;
-
+*/
 
 //===----------------------------------------------------------------------===//
 // 64-bit SPR manipulation instrs.


Index: llvm/lib/Target/PowerPC/PPCInstrInfo.td
diff -u llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.273 llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.274
--- llvm/lib/Target/PowerPC/PPCInstrInfo.td:1.273	Sat Feb 24 23:34:32 2007
+++ llvm/lib/Target/PowerPC/PPCInstrInfo.td	Sun Feb 25 13:20:53 2007
@@ -407,11 +407,11 @@
   def BLA_ELF : IForm<18, 1, 1,
                       (ops aaddr:$func, variable_ops),
                       "bla $func", BrB,
-                      [(PPCcall_ELF (i32 imm:$func))]>;
+                      [/*(PPCcall_ELF (i32 imm:$func))*/]>;
   def BCTRL_ELF : XLForm_2_ext<19, 528, 20, 0, 1,
                                (ops variable_ops),
                                "bctrl", BrB,
-                               [(PPCbctrl_ELF)]>;
+                               [/*(PPCbctrl_ELF)*/]>;
 }
 
 // DCB* instructions.
@@ -1102,8 +1102,12 @@
 // Calls
 def : Pat<(PPCcall_Macho (i32 tglobaladdr:$dst)),
           (BL_Macho tglobaladdr:$dst)>;
+def : Pat<(PPCcall_Macho (i32 texternalsym:$dst)),
+          (BL_Macho texternalsym:$dst)>;
+/*def : Pat<(PPCcall_ELF (i32 tglobaladdr:$dst)),
+          (BL_ELF tglobaladdr:$dst)>;
 def : Pat<(PPCcall_ELF (i32 texternalsym:$dst)),
-          (BL_ELF texternalsym:$dst)>;
+          (BL_ELF texternalsym:$dst)>;*/
 
 // Hi and Lo for Darwin Global Addresses.
 def : Pat<(PPChi tglobaladdr:$in, 0), (LIS tglobaladdr:$in)>;






More information about the llvm-commits mailing list