diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:04:02 -0700 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2009-08-17 20:04:02 -0700 |
commit | e678df6263ba9cc9e47e6705e276830d3decb15d (patch) | |
tree | 0cbb423343c320f5227c21d85bbf18e3bec544bc /src/arch/x86/isa/insts/simd128/integer | |
parent | c278760da0749b1afade222028e9677737f1c8a6 (diff) | |
download | gem5-e678df6263ba9cc9e47e6705e276830d3decb15d.tar.xz |
X86: Implement the media integer addition instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128/integer')
-rw-r--r-- | src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py | 167 |
1 files changed, 159 insertions, 8 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py b/src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py index 235a4fc7b..05e2b80d5 100644 --- a/src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py +++ b/src/arch/x86/isa/insts/simd128/integer/arithmetic/addition.py @@ -54,12 +54,163 @@ # Authors: Gabe Black microcode = ''' -# PADDB -# PADDW -# PADDD -# PADDQ -# PADDSB -# PADDSW -# PADDUSB -# PADDUSW +def macroop PADDB_XMM_XMM { + maddi xmml, xmml, xmmlm, size=1, ext=0 + maddi xmmh, xmmh, xmmhm, size=1, ext=0 +}; + +def macroop PADDB_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=0 + maddi xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PADDB_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=0 + maddi xmmh, xmmh, ufp2, size=1, ext=0 +}; + +def macroop PADDW_XMM_XMM { + maddi xmml, xmml, xmmlm, size=2, ext=0 + maddi xmmh, xmmh, xmmhm, size=2, ext=0 +}; + +def macroop PADDW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=0 + maddi xmmh, xmmh, ufp2, size=2, ext=0 +}; + +def macroop PADDW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=0 + maddi xmmh, xmmh, ufp2, size=2, ext=0 +}; + +def macroop PADDD_XMM_XMM { + maddi xmml, xmml, xmmlm, size=4, ext=0 + maddi xmmh, xmmh, xmmhm, size=4, ext=0 +}; + +def macroop PADDD_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=4, ext=0 + maddi xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop PADDD_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=4, ext=0 + maddi xmmh, xmmh, ufp2, size=4, ext=0 +}; + +def macroop PADDQ_XMM_XMM { + maddi xmml, xmml, xmmlm, size=8, ext=0 + maddi xmmh, xmmh, xmmhm, size=8, ext=0 +}; + +def macroop PADDQ_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=8, ext=0 + maddi xmmh, xmmh, ufp2, size=8, ext=0 +}; + +def macroop PADDQ_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=8, ext=0 + maddi xmmh, xmmh, ufp2, size=8, ext=0 +}; + +def macroop PADDSB_XMM_XMM { + maddi xmml, xmml, xmmlm, size=1, ext=4 + maddi xmmh, xmmh, xmmhm, size=1, ext=4 +}; + +def macroop PADDSB_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=4 + maddi xmmh, xmmh, ufp2, size=1, ext=4 +}; + +def macroop PADDSB_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=4 + maddi xmmh, xmmh, ufp2, size=1, ext=4 +}; + +def macroop PADDSW_XMM_XMM { + maddi xmml, xmml, xmmlm, size=2, ext=4 + maddi xmmh, xmmh, xmmhm, size=2, ext=4 +}; + +def macroop PADDSW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=4 + maddi xmmh, xmmh, ufp2, size=2, ext=4 +}; + +def macroop PADDSW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=4 + maddi xmmh, xmmh, ufp2, size=2, ext=4 +}; + +def macroop PADDUSB_XMM_XMM { + maddi xmml, xmml, xmmlm, size=1, ext=2 + maddi xmmh, xmmh, xmmhm, size=1, ext=2 +}; + +def macroop PADDUSB_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=2 + maddi xmmh, xmmh, ufp2, size=1, ext=2 +}; + +def macroop PADDUSB_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=1, ext=2 + maddi xmmh, xmmh, ufp2, size=1, ext=2 +}; + +def macroop PADDUSW_XMM_XMM { + maddi xmml, xmml, xmmlm, size=2, ext=2 + maddi xmmh, xmmh, xmmhm, size=2, ext=2 +}; + +def macroop PADDUSW_XMM_M { + ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=2 + maddi xmmh, xmmh, ufp2, size=2, ext=2 +}; + +def macroop PADDUSW_XMM_P { + rdip t7 + ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8 + ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8 + maddi xmml, xmml, ufp1, size=2, ext=2 + maddi xmmh, xmmh, ufp2, size=2, ext=2 +}; ''' |