summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py32
-rw-r--r--src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py21
2 files changed, 51 insertions, 2 deletions
diff --git a/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py b/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py
index 40b38867b..f157d165f 100644
--- a/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py
+++ b/src/arch/x86/isa/insts/simd128/integer/arithmetic/multiply_add.py
@@ -54,5 +54,35 @@
# Authors: Gabe Black
microcode = '''
-# PMADDWD
+def macroop PMADDWD_XMM_XMM {
+ mmuli ufp3, xmml, xmmlm, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmml, xmmlm, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmml, ufp3, ufp4, size=4, ext=0
+ mmuli ufp3, xmmh, xmmhm, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmmh, xmmhm, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmmh, ufp3, ufp4, size=4, ext=0
+};
+
+def macroop PMADDWD_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mmuli ufp3, xmml, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmml, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmml, ufp3, ufp4, size=4, ext=0
+ mmuli ufp3, xmmh, ufp2, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmmh, ufp2, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmmh, ufp3, ufp4, size=4, ext=0
+};
+
+def macroop PMADDWD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mmuli ufp3, xmml, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmml, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmml, ufp3, ufp4, size=4, ext=0
+ mmuli ufp3, xmmh, ufp2, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, xmmh, ufp2, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi xmmh, ufp3, ufp4, size=4, ext=0
+};
'''
diff --git a/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py b/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py
index 40b38867b..f6940d159 100644
--- a/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py
+++ b/src/arch/x86/isa/insts/simd64/integer/arithmetic/multiply_add.py
@@ -54,5 +54,24 @@
# Authors: Gabe Black
microcode = '''
-# PMADDWD
+def macroop PMADDWD_MMX_MMX {
+ mmuli ufp3, mmx, mmxm, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, mmx, mmxm, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi mmx, ufp3, ufp4, size=4, ext=0
+};
+
+def macroop PMADDWD_MMX_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ mmuli ufp3, mmx, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, mmx, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi mmx, ufp3, ufp4, size=4, ext=0
+};
+
+def macroop PMADDWD_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ mmuli ufp3, mmx, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10 | 0x20)
+ mmuli ufp4, mmx, ufp1, srcSize=2, destSize=4, ext=(0x2 | 0x10)
+ maddi mmx, ufp3, ufp4, size=4, ext=0
+};
'''