summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/simd64
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 20:04:02 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 20:04:02 -0700
commite678df6263ba9cc9e47e6705e276830d3decb15d (patch)
tree0cbb423343c320f5227c21d85bbf18e3bec544bc /src/arch/x86/isa/insts/simd64
parentc278760da0749b1afade222028e9677737f1c8a6 (diff)
downloadgem5-e678df6263ba9cc9e47e6705e276830d3decb15d.tar.xz
X86: Implement the media integer addition instructions.
Diffstat (limited to 'src/arch/x86/isa/insts/simd64')
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py127
1 files changed, 119 insertions, 8 deletions
diff --git a/src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py b/src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
index 235a4fc7b..b663d15b7 100644
--- a/src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
+++ b/src/arch/x86/isa/insts/simd64/integer/arithmetic/addition.py
@@ -54,12 +54,123 @@
# Authors: Gabe Black
microcode = '''
-# PADDB
-# PADDW
-# PADDD
-# PADDQ
-# PADDSB
-# PADDSW
-# PADDUSB
-# PADDUSW
+def macroop PADDB_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=1, ext=0
+};
+
+def macroop PADDB_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=0
+};
+
+def macroop PADDB_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=0
+};
+
+def macroop PADDW_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=2, ext=0
+};
+
+def macroop PADDW_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=0
+};
+
+def macroop PADDW_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=0
+};
+
+def macroop PADDD_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=4, ext=0
+};
+
+def macroop PADDD_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=4, ext=0
+};
+
+def macroop PADDD_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=4, ext=0
+};
+
+def macroop PADDQ_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=8, ext=0
+};
+
+def macroop PADDQ_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=8, ext=0
+};
+
+def macroop PADDQ_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=8, ext=0
+};
+
+def macroop PADDSB_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=1, ext=4
+};
+
+def macroop PADDSB_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=4
+};
+
+def macroop PADDSB_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=4
+};
+
+def macroop PADDSW_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=2, ext=4
+};
+
+def macroop PADDSW_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=4
+};
+
+def macroop PADDSW_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=4
+};
+
+def macroop PADDUSB_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=1, ext=2
+};
+
+def macroop PADDUSB_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=2
+};
+
+def macroop PADDUSB_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=1, ext=2
+};
+
+def macroop PADDUSW_MMX_MMX {
+ maddi mmx, mmx, mmxm, size=2, ext=2
+};
+
+def macroop PADDUSW_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=2
+};
+
+def macroop PADDUSW_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ maddi mmx, mmx, ufp1, size=2, ext=2
+};
'''