diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:15 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:15 -0700 |
commit | c40698e31514fae76d046b3ef94f67dbb61cf688 (patch) | |
tree | 1cc10c834e8d74601cc634b7931fc3ba7fe8a108 /src/arch/x86/isa/insts/simd128 | |
parent | 3424de2861756714a85eeafa22b485f6673aaf70 (diff) | |
download | gem5-c40698e31514fae76d046b3ef94f67dbb61cf688.tar.xz |
X86: Implement the integer media multiply instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py | 83 |
1 files changed, 79 insertions, 4 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py b/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py index 3e7345a9f..a5d90c6b2 100644 --- a/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py +++ b/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiplication.py @@ -54,8 +54,83 @@ # Authors: Gabe Black microcode = ''' -# PMULHW -# PMULLW -# PMULHUW -# PMULUDQ +def macroop PMULHW_XMM_XMM { + mmuli xmml, xmml, xmmlm, size=2, ext=(0x2 | 0x8) + mmuli xmmh, xmmh, xmmhm, size=2, ext=(0x2 | 0x8) +}; + +def macroop PMULHW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=(0x2 | 0x8) + mmuli xmmh, xmmh, ufp2, size=2, ext=(0x2 | 0x8) +}; + +def macroop PMULHW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=(0x2 | 0x8) + mmuli xmmh, xmmh, ufp2, size=2, ext=(0x2 | 0x8) +}; + +def macroop PMULLW_XMM_XMM { + mmuli xmml, xmml, xmmlm, size=2, ext=2 + mmuli xmmh, xmmh, xmmhm, size=2, ext=2 +}; + +def macroop PMULLW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=2 + mmuli xmmh, xmmh, ufp2, size=2, ext=2 +}; + +def macroop PMULLW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=2 + mmuli xmmh, xmmh, ufp2, size=2, ext=2 +}; + +def macroop PMULHUW_XMM_XMM { + mmuli xmml, xmml, xmmlm, size=2, ext=8 + mmuli xmmh, xmmh, xmmhm, size=2, ext=8 +}; + +def macroop PMULHUW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=8 + mmuli xmmh, xmmh, ufp2, size=2, ext=8 +}; + +def macroop PMULHUW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, size=2, ext=8 + mmuli xmmh, xmmh, ufp2, size=2, ext=8 +}; + +def macroop PMULUDQ_XMM_XMM { + mmuli xmml, xmml, xmmlm, srcSize=4, destSize=8, ext=1 + mmuli xmmh, xmmh, xmmhm, srcSize=4, destSize=8, ext=1 +}; + +def macroop PMULUDQ_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, srcSize=4, destSize=8, ext=1 + mmuli xmmh, xmmh, ufp2, srcSize=4, destSize=8, ext=1 +}; + +def macroop PMULUDQ_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mmuli xmml, xmml, ufp1, srcSize=4, destSize=8, ext=1 + mmuli xmmh, xmmh, ufp2, srcSize=4, destSize=8, ext=1 +}; ''' |