diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:16 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:15:16 -0700 |
commit | 2beab367d75e5f6cc30a194ac4d8160b50fb29a7 (patch) | |
tree | f6cba30f4525f1a9bd950c97878f6c0dc723774e /src/arch/x86/isa/insts/simd128/integer | |
parent | f6b12bfa8dd9e3a0d7e84d59db2142cdda99e086 (diff) | |
download | gem5-2beab367d75e5f6cc30a194ac4d8160b50fb29a7.tar.xz |
X86: Implement the media average instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/integer')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py | 61 |
1 files changed, 59 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py b/src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py index 9bda3371f..017443e55 100644 --- a/src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py +++ b/src/arch/x86/isa/insts/simd128/integer/arithmetic/average.py @@ -54,6 +54,63 @@ # Authors: Gabe Black microcode = ''' -# PAVGB -# PAVGW +def macroop PAVGB_XMM_XMM { + mavg xmml, xmml, xmmlm, size=1, ext=0 + mavg xmmh, xmmh, xmmhm, size=1, ext=0 +}; + +def macroop PAVGB_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=1, ext=0 + mavg xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PAVGB_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=1, ext=0 + mavg xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PAVGUSB_XMM_XMM { + mavg xmml, xmml, xmmlm, size=1, ext=0 + mavg xmmh, xmmh, xmmhm, size=1, ext=0 +}; + +def macroop PAVGUSB_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=1, ext=0 + mavg xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PAVGUSB_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=1, ext=0 + mavg xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PAVGW_XMM_XMM { + mavg xmml, xmml, xmmlm, size=2, ext=0 + mavg xmmh, xmmh, xmmhm, size=2, ext=0 +}; + +def macroop PAVGW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=2, ext=0 + mavg xmmh, xmmh, ufp2, size=2, ext=0 +}; + +def macroop PAVGW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + mavg xmml, xmml, ufp1, size=2, ext=0 + mavg xmmh, xmmh, ufp2, size=2, ext=0 +}; ''' |