diff options
author | Chris Lattner <sabre@nondot.org> | 2006-11-16 00:57:19 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-11-16 00:57:19 +0000 |
commit | 80df01d2cf68b680b1c90eb0d3b0f2defcdf202b (patch) | |
tree | 59d08e7735f9f88c3d23715a3646d4d8fdeecb99 /lib/Target | |
parent | 74531e49ef97cc2bef8fc9c35963368fc63153cf (diff) | |
download | external_llvm-80df01d2cf68b680b1c90eb0d3b0f2defcdf202b.zip external_llvm-80df01d2cf68b680b1c90eb0d3b0f2defcdf202b.tar.gz external_llvm-80df01d2cf68b680b1c90eb0d3b0f2defcdf202b.tar.bz2 |
add ppc64 r+i stores with update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target')
-rw-r--r-- | lib/Target/PowerPC/PPCHazardRecognizers.cpp | 27 | ||||
-rw-r--r-- | lib/Target/PowerPC/PPCInstr64Bit.td | 85 |
2 files changed, 72 insertions, 40 deletions
diff --git a/lib/Target/PowerPC/PPCHazardRecognizers.cpp b/lib/Target/PowerPC/PPCHazardRecognizers.cpp index cdecc03..3ca6e4e 100644 --- a/lib/Target/PowerPC/PPCHazardRecognizers.cpp +++ b/lib/Target/PowerPC/PPCHazardRecognizers.cpp @@ -234,28 +234,26 @@ void PPCHazardRecognizer970::EmitInstruction(SDNode *Node) { unsigned ThisStoreSize; switch (Opcode) { default: assert(0 && "Unknown store instruction!"); - case PPC::STB: case PPC::STBU: - case PPC::STBX: - case PPC::STB8: - case PPC::STBX8: + case PPC::STB: case PPC::STB8: + case PPC::STBU: case PPC::STBU8: + case PPC::STBX: case PPC::STBX8: case PPC::STVEBX: ThisStoreSize = 1; break; - case PPC::STH: case PPC::STHU: - case PPC::STHX: - case PPC::STH8: - case PPC::STHX8: + case PPC::STH: case PPC::STH8: + case PPC::STHU: case PPC::STHU8: + case PPC::STHX: case PPC::STHX8: case PPC::STVEHX: case PPC::STHBRX: ThisStoreSize = 2; break; - case PPC::STFS: case PPC::STFSU: + case PPC::STFS: + case PPC::STFSU: case PPC::STFSX: - case PPC::STWX: + case PPC::STWX: case PPC::STWX8: case PPC::STWUX: - case PPC::STW: case PPC::STWU: - case PPC::STW8: - case PPC::STWX8: + case PPC::STW: case PPC::STW8: + case PPC::STWU: case PPC::STWU8: case PPC::STVEWX: case PPC::STFIWX: case PPC::STWBRX: @@ -263,7 +261,8 @@ void PPCHazardRecognizer970::EmitInstruction(SDNode *Node) { break; case PPC::STD_32: case PPC::STDX_32: - case PPC::STD: case PPC::STDU: + case PPC::STD: + case PPC::STDU: case PPC::STFD: case PPC::STFDX: case PPC::STDX: diff --git a/lib/Target/PowerPC/PPCInstr64Bit.td b/lib/Target/PowerPC/PPCInstr64Bit.td index e5578a8..1a1b8ac 100644 --- a/lib/Target/PowerPC/PPCInstr64Bit.td +++ b/lib/Target/PowerPC/PPCInstr64Bit.td @@ -356,32 +356,6 @@ def LDU : DSForm_1<58, 1, (ops G8RC:$rD, ptr_rc:$ea_result, memrix:$addr), } let isStore = 1, noResults = 1, PPC970_Unit = 2 in { -// Normal stores. -def STD : DSForm_1<62, 0, (ops G8RC:$rS, memrix:$dst), - "std $rS, $dst", LdStSTD, - [(store G8RC:$rS, ixaddr:$dst)]>, isPPC64; -def STDX : XForm_8<31, 149, (ops G8RC:$rS, memrr:$dst), - "stdx $rS, $dst", LdStSTD, - [(store G8RC:$rS, xaddr:$dst)]>, isPPC64, - PPC970_DGroup_Cracked; - -def STDU : DSForm_1<62, 1, (ops G8RC:$ea_res, G8RC:$rS, memrix:$dst), - "stdu $rS, $dst", LdStSTD, - []>, isPPC64; -def STDUX : XForm_8<31, 181, (ops G8RC:$rS, memrr:$dst), - "stdux $rS, $dst", LdStSTD, - []>, isPPC64; - -// STD_32/STDX_32 - Just like STD/STDX, but uses a '32-bit' input register. -def STD_32 : DSForm_1<62, 0, (ops GPRC:$rT, memrix:$dst), - "std $rT, $dst", LdStSTD, - [(PPCstd_32 GPRC:$rT, ixaddr:$dst)]>, isPPC64; -def STDX_32 : XForm_8<31, 149, (ops GPRC:$rT, memrr:$dst), - "stdx $rT, $dst", LdStSTD, - [(PPCstd_32 GPRC:$rT, xaddr:$dst)]>, isPPC64, - PPC970_DGroup_Cracked; - - // Truncating stores. def STB8 : DForm_1<38, (ops G8RC:$rS, memri:$src), "stb $rS, $src", LdStGeneral, @@ -404,6 +378,65 @@ def STWX8 : XForm_8<31, 151, (ops G8RC:$rS, memrr:$dst), "stwx $rS, $dst", LdStGeneral, [(truncstorei32 G8RC:$rS, xaddr:$dst)]>, PPC970_DGroup_Cracked; +// Normal 8-byte stores. +def STD : DSForm_1<62, 0, (ops G8RC:$rS, memrix:$dst), + "std $rS, $dst", LdStSTD, + [(store G8RC:$rS, ixaddr:$dst)]>, isPPC64; +def STDX : XForm_8<31, 149, (ops G8RC:$rS, memrr:$dst), + "stdx $rS, $dst", LdStSTD, + [(store G8RC:$rS, xaddr:$dst)]>, isPPC64, + PPC970_DGroup_Cracked; +} + +let isStore = 1, PPC970_Unit = 2 in { + +def STBU8 : DForm_1<38, (ops ptr_rc:$ea_res, G8RC:$rS, + symbolLo:$ptroff, ptr_rc:$ptrreg), + "stbu $rS, $ptroff($ptrreg)", LdStGeneral, + [(set ptr_rc:$ea_res, + (pre_truncsti8 G8RC:$rS, ptr_rc:$ptrreg, + iaddroff:$ptroff))]>, + RegConstraint<"$ptrreg = $ea_res">, NoEncode<"$ea_res">; +def STHU8 : DForm_1<45, (ops ptr_rc:$ea_res, G8RC:$rS, + symbolLo:$ptroff, ptr_rc:$ptrreg), + "sthu $rS, $ptroff($ptrreg)", LdStGeneral, + [(set ptr_rc:$ea_res, + (pre_truncsti16 G8RC:$rS, ptr_rc:$ptrreg, + iaddroff:$ptroff))]>, + RegConstraint<"$ptrreg = $ea_res">, NoEncode<"$ea_res">; +def STWU8 : DForm_1<37, (ops ptr_rc:$ea_res, G8RC:$rS, + symbolLo:$ptroff, ptr_rc:$ptrreg), + "stwu $rS, $ptroff($ptrreg)", LdStGeneral, + [(set ptr_rc:$ea_res, (pre_store G8RC:$rS, ptr_rc:$ptrreg, + iaddroff:$ptroff))]>, + RegConstraint<"$ptrreg = $ea_res">, NoEncode<"$ea_res">; + + +def STDU : DSForm_1<62, 1, (ops ptr_rc:$ea_res, G8RC:$rS, + symbolLo:$ptroff, ptr_rc:$ptrreg), + "stdu $rS, $ptroff($ptrreg)", LdStSTD, + [(set ptr_rc:$ea_res, (pre_store G8RC:$rS, ptr_rc:$ptrreg, + iaddroff:$ptroff))]>, + RegConstraint<"$ptrreg = $ea_res">, NoEncode<"$ea_res">, + isPPC64; + +} + +let isStore = 1, noResults = 1, PPC970_Unit = 2 in { + +def STDUX : XForm_8<31, 181, (ops G8RC:$rS, memrr:$dst), + "stdux $rS, $dst", LdStSTD, + []>, isPPC64; + + +// STD_32/STDX_32 - Just like STD/STDX, but uses a '32-bit' input register. +def STD_32 : DSForm_1<62, 0, (ops GPRC:$rT, memrix:$dst), + "std $rT, $dst", LdStSTD, + [(PPCstd_32 GPRC:$rT, ixaddr:$dst)]>, isPPC64; +def STDX_32 : XForm_8<31, 149, (ops GPRC:$rT, memrr:$dst), + "stdx $rT, $dst", LdStSTD, + [(PPCstd_32 GPRC:$rT, xaddr:$dst)]>, isPPC64, + PPC970_DGroup_Cracked; } |