summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 18:36:20 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 18:36:20 -0700
commitdd81a34829ec578d24d43b4d3fc7a4a16622720e (patch)
tree0bff6ba32db607650dbdbdf0a99cf390067e42cd /src/arch/x86/isa/insts
parent9fee8b75aa3d8a85395dd0e94fb4a5754817ae24 (diff)
downloadgem5-dd81a34829ec578d24d43b4d3fc7a4a16622720e.tar.xz
X86: Implement the floating point media subtract instructions.
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py63
-rw-r--r--src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py31
2 files changed, 86 insertions, 8 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py
index 10669136b..378abc070 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/arithmetic/subtraction.py
@@ -54,22 +54,73 @@
# Authors: Gabe Black
microcode = '''
-# SUBPS
-# SUBPD
-# SUBSS
+def macroop SUBSS_XMM_XMM {
+ msubf xmml, xmml, xmmlm, size=4, ext=1
+};
+
+def macroop SUBSS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ msubf xmml, xmml, ufp1, size=4, ext=1
+};
+
+def macroop SUBSS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ msubf xmml, xmml, ufp1, size=4, ext=1
+};
def macroop SUBSD_XMM_XMM {
- subfp xmml, xmml, xmmlm
+ msubf xmml, xmml, xmmlm, size=8, ext=1
};
def macroop SUBSD_XMM_M {
ldfp ufp1, seg, sib, disp, dataSize=8
- subfp xmml, xmml, ufp1
+ msubf xmml, xmml, ufp1, size=8, ext=1
};
def macroop SUBSD_XMM_P {
rdip t7
ldfp ufp1, seg, riprel, disp, dataSize=8
- subfp xmml, xmml, ufp1
+ msubf xmml, xmml, ufp1, size=8, ext=1
+};
+
+def macroop SUBPS_XMM_XMM {
+ msubf xmml, xmml, xmmlm, size=4, ext=0
+ msubf xmmh, xmmh, xmmhm, size=4, ext=0
+};
+
+def macroop SUBPS_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ msubf xmml, xmml, ufp1, size=4, ext=0
+ msubf xmmh, xmmh, ufp2, size=4, ext=0
+};
+
+def macroop SUBPS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ msubf xmml, xmml, ufp1, size=4, ext=0
+ msubf xmmh, xmmh, ufp2, size=4, ext=0
+};
+
+def macroop SUBPD_XMM_XMM {
+ msubf xmml, xmml, xmmlm, size=8, ext=0
+ msubf xmmh, xmmh, xmmhm, size=8, ext=0
+};
+
+def macroop SUBPD_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ msubf xmml, xmml, ufp1, size=8, ext=0
+ msubf xmmh, xmmh, ufp2, size=8, ext=0
+};
+
+def macroop SUBPD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ msubf xmml, xmml, ufp1, size=8, ext=0
+ msubf xmmh, xmmh, ufp2, size=8, ext=0
};
'''
diff --git a/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py b/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py
index 6e4c1804d..363794411 100644
--- a/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py
+++ b/src/arch/x86/isa/insts/simd64/floating_point/arithmetic/subtraction.py
@@ -54,6 +54,33 @@
# Authors: Gabe Black
microcode = '''
-# PFSUB
-# PFSUBR
+def macroop PFSUB_MMX_MMX {
+ msubf mmx, mmx, mmxm, size=4, ext=0
+};
+
+def macroop PFSUB_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ msubf mmx, mmx, ufp1, size=4, ext=0
+};
+
+def macroop PFSUB_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ msubf mmx, mmx, ufp1, size=4, ext=0
+};
+
+def macroop PFSUBR_MMX_MMX {
+ msubf mmx, mmxm, mmx, size=4, ext=0
+};
+
+def macroop PFSUBR_MMX_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ msubf mmx, ufp1, mmx, size=4, ext=0
+};
+
+def macroop PFSUBR_MMX_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ msubf mmx, ufp1, mmx, size=4, ext=0
+};
'''