summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts/simd128
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2009-08-17 20:25:14 -0700
committerGabe Black <gblack@eecs.umich.edu>2009-08-17 20:25:14 -0700
commit123ea3b22962a3ff50fba1d8077c7cb3af28529c (patch)
tree9f0670be63771d69b33bbd61faef07064fa2f071 /src/arch/x86/isa/insts/simd128
parent288f4286322f56255d15b13224371ec60b4b2cac (diff)
downloadgem5-123ea3b22962a3ff50fba1d8077c7cb3af28529c.tar.xz
X86: Implement the instructions that compare fp values and write a mask as a result.
Diffstat (limited to 'src/arch/x86/isa/insts/simd128')
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py73
1 files changed, 69 insertions, 4 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py
index 705f64093..09c34600b 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_mask.py
@@ -54,8 +54,73 @@
# Authors: Gabe Black
microcode = '''
-# CMPPS
-# CMPPD
-# CMPSS
-# CMPSD
+def macroop CMPPS_XMM_XMM_I {
+ mcmpf2r xmml, xmml, xmmlm, size=4, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, xmmhm, size=4, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPPS_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=4, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, ufp2, size=4, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPPS_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=4, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, ufp2, size=4, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPPD_XMM_XMM_I {
+ mcmpf2r xmml, xmml, xmmlm, size=8, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, xmmhm, size=8, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPPD_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=8, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, ufp2, size=8, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPPD_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=8, ext="IMMEDIATE & mask(3)"
+ mcmpf2r xmmh, xmmh, ufp2, size=8, ext="IMMEDIATE & mask(3)"
+};
+
+def macroop CMPSS_XMM_XMM_I {
+ mcmpf2r xmml, xmml, xmmlm, size=4, ext="IMMEDIATE | 0x8"
+};
+
+def macroop CMPSS_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=4, ext="IMMEDIATE | 0x8"
+};
+
+def macroop CMPSS_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=4, ext="IMMEDIATE | 0x8"
+};
+
+def macroop CMPSD_XMM_XMM_I {
+ mcmpf2r xmml, xmml, xmmlm, size=8, ext="IMMEDIATE | 0x8"
+};
+
+def macroop CMPSD_XMM_M_I {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=8, ext="IMMEDIATE | 0x8"
+};
+
+def macroop CMPSD_XMM_P_I {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ mcmpf2r xmml, xmml, ufp1, size=8, ext="IMMEDIATE | 0x8"
+};
'''