diff options
| author | Chris Lattner <sabre@nondot.org> | 2006-06-06 21:29:23 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2006-06-06 21:29:23 +0000 |
| commit | c8587d4b81b6deff8ed55886ab9896dbde289e74 (patch) | |
| tree | ece7054199b8750cfce599d2d1a0ce12082a927c /llvm/lib | |
| parent | 54a417be0087cddafa6bf131d8f888ad34fff4bb (diff) | |
| download | bcm5719-llvm-c8587d4b81b6deff8ed55886ab9896dbde289e74.tar.gz bcm5719-llvm-c8587d4b81b6deff8ed55886ab9896dbde289e74.zip | |
Add PowerPC intrinsics to support dcbz[l]
llvm-svn: 28696
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrFormats.td | 17 | ||||
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCInstrInfo.td | 8 |
2 files changed, 25 insertions, 0 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCInstrFormats.td b/llvm/lib/Target/PowerPC/PPCInstrFormats.td index 10ac79b1c2e..bb0ccf89b00 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrFormats.td +++ b/llvm/lib/Target/PowerPC/PPCInstrFormats.td @@ -325,6 +325,23 @@ class XForm_28<bits<6> opcode, bits<10> xo, dag OL, string asmstr, : XForm_base_r3xo<opcode, xo, OL, asmstr, itin, pattern> { } +// DCB_Form - Form X instruction, used for dcb* instructions. +class DCB_Form<bits<10> xo, bits<5> immfield, dag OL, string asmstr, + InstrItinClass itin, list<dag> pattern> + : I<31, OL, asmstr, itin> { + bits<5> A; + bits<5> B; + + let Pattern = pattern; + + let Inst{6-10} = immfield; + let Inst{11-15} = A; + let Inst{16-20} = B; + let Inst{21-30} = xo; + let Inst{31} = 0; +} + + // DSS_Form - Form X instruction, used for altivec dss* instructions. class DSS_Form<bits<10> xo, dag OL, string asmstr, InstrItinClass itin, list<dag> pattern> diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.td b/llvm/lib/Target/PowerPC/PPCInstrInfo.td index d75c7940795..c93e0d4d835 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.td +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.td @@ -318,6 +318,14 @@ let isCall = 1, noResults = 1, PPC970_Unit = 7, [(PPCbctrl)]>; } +// DCB* instructions. +def DCBZ : DCB_Form<1014, 0, (ops memrr:$dst), + "dcbz $dst", LdStDCBF, [(int_ppc_dcbz xoaddr:$dst)]>, + PPC970_DGroup_Single; +def DCBZL : DCB_Form<1014, 1, (ops memrr:$dst), + "dcbzl $dst", LdStDCBF, [(int_ppc_dcbzl xoaddr:$dst)]>, + PPC970_DGroup_Single; + // D-Form instructions. Most instructions that perform an operation on a // register and an immediate are of this type. // |

