aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-25 19:20:53 +0000
committerChris Lattner <sabre@nondot.org>2007-02-25 19:20:53 +0000
commit1fa3d9ef93578970b2e0506104b96c3ffaa42bcf (patch)
tree3bf1efcf1fcf6ee204911553487c99a1718852ff
parentc25904f23a361d6550b7a2f5446707a6df31c3fb (diff)
downloadexternal_llvm-1fa3d9ef93578970b2e0506104b96c3ffaa42bcf.zip
external_llvm-1fa3d9ef93578970b2e0506104b96c3ffaa42bcf.tar.gz
external_llvm-1fa3d9ef93578970b2e0506104b96c3ffaa42bcf.tar.bz2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34601 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Target/PowerPC/PPCInstr64Bit.td6
-rw-r--r--lib/Target/PowerPC/PPCInstrInfo.td10
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/Target/PowerPC/PPCInstr64Bit.td b/lib/Target/PowerPC/PPCInstr64Bit.td
index 89e883a..57bb9da 100644
--- a/lib/Target/PowerPC/PPCInstr64Bit.td
+++ b/lib/Target/PowerPC/PPCInstr64Bit.td
@@ -102,7 +102,7 @@ let isCall = 1, noResults = 1, PPC970_Unit = 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 @@ def : Pat<(PPCcall_Macho (i64 tglobaladdr:$dst)),
(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.
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td
index 0f9e9bd..1b96116 100644
--- a/lib/Target/PowerPC/PPCInstrInfo.td
+++ b/lib/Target/PowerPC/PPCInstrInfo.td
@@ -407,11 +407,11 @@ let isCall = 1, noResults = 1, PPC970_Unit = 7,
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 @@ def : Pat<(and (rotl GPRC:$in, GPRC:$sh), maskimm32:$imm),
// 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)>;