diff options
author | Nate Begeman <natebegeman@mac.com> | 2005-12-20 00:26:01 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2005-12-20 00:26:01 +0000 |
commit | 9e4dd9dfc97f3930f58ca6e47bebbd8eb5cdd8a1 (patch) | |
tree | a7f50adb4278d63b7be1c305f2caaa7540903032 /lib/Target/PowerPC/PPCInstrInfo.td | |
parent | e08705134f133bd9c9f0c3976174b692a912f69e (diff) | |
download | external_llvm-9e4dd9dfc97f3930f58ca6e47bebbd8eb5cdd8a1.zip external_llvm-9e4dd9dfc97f3930f58ca6e47bebbd8eb5cdd8a1.tar.gz external_llvm-9e4dd9dfc97f3930f58ca6e47bebbd8eb5cdd8a1.tar.bz2 |
Pattern-match return. Includes gross hack!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24874 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/PowerPC/PPCInstrInfo.td')
-rw-r--r-- | lib/Target/PowerPC/PPCInstrInfo.td | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 12a6cfb..a0356a6 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -46,6 +46,9 @@ def SDT_PPCCallSeq : SDTypeProfile<0, 1, [ SDTCisVT<0, i32> ]>; def callseq_start : SDNode<"ISD::CALLSEQ_START", SDT_PPCCallSeq,[SDNPHasChain]>; def callseq_end : SDNode<"ISD::CALLSEQ_END", SDT_PPCCallSeq,[SDNPHasChain]>; +def SDT_PPCRetFlag : SDTypeProfile<0, 1, [ SDTCisVT<0, FlagVT>]>; +def retflag : SDNode<"PPCISD::RET_FLAG", SDT_PPCRetFlag, [SDNPHasChain]>; + //===----------------------------------------------------------------------===// // PowerPC specific transformation functions and pattern fragments. // @@ -221,8 +224,8 @@ let usesCustomDAGSchedInserter = 1 in { // Expanded by the scheduler. let isTerminator = 1 in { let isReturn = 1 in - def BLR : XLForm_2_ext<19, 16, 20, 0, 0, (ops), "blr", BrB>; - def BCTR : XLForm_2_ext<19, 528, 20, 0, 0, (ops), "bctr", BrB>; + def BLR : XLForm_2_ext<19, 16, 20, 0, 0, (ops), "blr", BrB, [(ret)]>; + def BCTR : XLForm_2_ext<19, 528, 20, 0, 0, (ops), "bctr", BrB, []>; } let Defs = [LR] in @@ -267,7 +270,8 @@ let isCall = 1, "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>; + def BCTRL : XLForm_2_ext<19, 528, 20, 0, 1, (ops variable_ops), "bctrl", BrB, + []>; } // D-Form instructions. Most instructions that perform an operation on a @@ -1052,6 +1056,8 @@ def : Pat<(f64 (extload iaddr:$src, f32)), def : Pat<(f64 (extload xaddr:$src, f32)), (FMRSD (LFSX xaddr:$src))>; +def : Pat<(retflag FLAG), (BLR)>; + // Same as above, but using a temporary. FIXME: implement temporaries :) /* def : Pattern<(xor GPRC:$in, imm:$imm), |