diff options
author | Chris Lattner <sabre@nondot.org> | 2006-06-27 18:36:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-06-27 18:36:44 +0000 |
commit | 2e6b77d8035459c17d7f0b7055e579a0d9090bdd (patch) | |
tree | 7e452c26e6234eab86d9ddee6a0ee2f02a4cd84e /lib/Target | |
parent | 1fd81107f3b0d8c5cea1c4f66f7bddbc61e76a19 (diff) | |
download | external_llvm-2e6b77d8035459c17d7f0b7055e579a0d9090bdd.zip external_llvm-2e6b77d8035459c17d7f0b7055e579a0d9090bdd.tar.gz external_llvm-2e6b77d8035459c17d7f0b7055e579a0d9090bdd.tar.bz2 |
Add 64-bit MTCTR so that indirect calls work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28931 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/PowerPC/PPCInstr64Bit.td | 4 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCInstr64Bit.td b/lib/Target/PowerPC/PPCInstr64Bit.td index 42b0029..bfb6a08 100644 --- a/lib/Target/PowerPC/PPCInstr64Bit.td +++ b/lib/Target/PowerPC/PPCInstr64Bit.td @@ -60,6 +60,10 @@ def HI48_64 : SDNodeXForm<imm, [{ def IMPLICIT_DEF_G8RC : Pseudo<(ops G8RC:$rD), "; $rD = IMPLICIT_DEF_G8RC", [(set G8RC:$rD, (undef))]>; +let Pattern = [(PPCmtctr G8RC:$rS)] in { +def MTCTR8 : XFXForm_7_ext<31, 467, 9, (ops G8RC:$rS), "mtctr $rS", SprMTSPR>, + PPC970_DGroup_First, PPC970_Unit_FXU; +} //===----------------------------------------------------------------------===// // Fixed point instructions. diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 4fd4533..911d966 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -71,7 +71,7 @@ def PPCstd_32 : SDNode<"PPCISD::STD_32" , SDTStore, [SDNPHasChain]>; def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeq,[SDNPHasChain]>; def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_PPCCallSeq,[SDNPHasChain]>; -def SDT_PPCCall : SDTypeProfile<0, -1, [SDTCisVT<0, i32>]>; +def SDT_PPCCall : SDTypeProfile<0, -1, [SDTCisInt<0>]>; def PPCcall : SDNode<"PPCISD::CALL", SDT_PPCCall, [SDNPHasChain, SDNPOptInFlag, SDNPOutFlag]>; def PPCmtctr : SDNode<"PPCISD::MTCTR", SDT_PPCCall, @@ -323,7 +323,7 @@ let isCall = 1, noResults = 1, PPC970_Unit = 7, def BL : IForm<18, 0, 1, (ops calltarget:$func, variable_ops), "bl $func", BrB, []>; // See Pat patterns below. def BLA : IForm<18, 1, 1, (ops aaddr:$func, variable_ops), - "bla $func", BrB, [(PPCcall imm:$func)]>; + "bla $func", BrB, [(PPCcall (i32 imm:$func))]>; def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops variable_ops), "bctrl", BrB, [(PPCbctrl)]>; } |