diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:25:13 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:25:13 -0700 |
commit | 7fbd9e12961aaee1c81e723c4d40b70d5108845e (patch) | |
tree | f11b2f608a40900aad9ab2f27e46d866e203daff /src/arch/x86/isa/insts/simd128/integer | |
parent | 1fed0161d94dc0bd89e1c682f1f5d8757bd252a2 (diff) | |
download | gem5-7fbd9e12961aaee1c81e723c4d40b70d5108845e.tar.xz |
X86: Implement the shuffle media instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/integer')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py | 53 |
1 files changed, 50 insertions, 3 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py b/src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py index 9f66c3f05..46cfbce82 100644 --- a/src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py +++ b/src/arch/x86/isa/insts/simd128/integer/data_reordering/shuffle.py @@ -54,7 +54,54 @@ # Authors: Gabe Black microcode = ''' -# PSHUFD -# PSHUFHW -# PSHUFLW +def macroop PSHUFD_XMM_XMM_I { + shuffle ufp1, xmmlm, xmmhm, size=4, ext="IMMEDIATE" + shuffle xmmh, xmmlm, xmmhm, size=4, ext="IMMEDIATE >> 4" + movfp xmml, ufp1, dataSize=8 +}; + +def macroop PSHUFD_XMM_M_I { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, ufp1, ufp2, size=4, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" +}; + +def macroop PSHUFD_XMM_P_I { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, ufp1, ufp2, size=4, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" +}; + +def macroop PSHUFHW_XMM_XMM_I { + shuffle xmmh, xmmhm, xmmhm, size=2, ext=imm +}; + +def macroop PSHUFHW_XMM_M_I { + ldfp ufp1, seg, sib, "DISPLACEMENT + 8", dataSize=8 + shuffle xmmh, ufp1, ufp1, size=2, ext=imm +}; + +def macroop PSHUFHW_XMM_P_I { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + shuffle xmmh, ufp1, ufp1, size=2, ext=imm +}; + +def macroop PSHUFLW_XMM_XMM_I { + shuffle xmml, xmmlm, xmmlm, size=2, ext=imm +}; + +def macroop PSHUFLW_XMM_M_I { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + shuffle xmml, ufp1, ufp1, size=2, ext=imm +}; + +def macroop PSHUFLW_XMM_P_I { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + shuffle xmml, ufp1, ufp1, size=2, ext=imm +}; ''' |