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/floating_point/data_reordering | |
parent | 1fed0161d94dc0bd89e1c682f1f5d8757bd252a2 (diff) | |
download | gem5-7fbd9e12961aaee1c81e723c4d40b70d5108845e.tar.xz |
X86: Implement the shuffle media instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/floating_point/data_reordering')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py b/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py index 868d72b06..7b09e796a 100644 --- a/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py +++ b/src/arch/x86/isa/insts/simd128/floating_point/data_reordering/shuffle.py @@ -54,6 +54,45 @@ # Authors: Gabe Black microcode = ''' -# SHUFPS -# SHUFPD +def macroop SHUFPS_XMM_XMM_I { + shuffle ufp1, xmml, xmmh, size=4, ext="IMMEDIATE" + shuffle xmmh, xmmlm, xmmhm, size=4, ext="IMMEDIATE >> 4" + movfp xmml, ufp1, dataSize=8 +}; + +def macroop SHUFPS_XMM_M_I { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" +}; + +def macroop SHUFPS_XMM_P_I { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, xmml, xmmh, size=4, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=4, ext="IMMEDIATE >> 4" +}; + +def macroop SHUFPD_XMM_XMM_I { + shuffle ufp1, xmml, xmmh, size=8, ext="IMMEDIATE" + shuffle xmmh, xmmlm, xmmhm, size=8, ext="IMMEDIATE >> 1" + movfp xmml, ufp1, dataSize=8 +}; + +def macroop SHUFPD_XMM_M_I { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1" +}; + +def macroop SHUFPD_XMM_P_I { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + shuffle xmml, xmml, xmmh, size=8, ext="IMMEDIATE" + shuffle xmmh, ufp1, ufp2, size=8, ext="IMMEDIATE >> 1" +}; ''' |