summaryrefslogtreecommitdiff
path: root/src
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
commit87ad6772094170cf92e8de385e1dea47a31924dc (patch)
tree4b7f23c5b517c31780fb0f3d7ac5a6ec2b997177 /src
parent2c9ee52c3726b43fda9f68dbbcad069b3c2e874c (diff)
downloadgem5-87ad6772094170cf92e8de385e1dea47a31924dc.tar.xz
X86: Implement the instructions that compare fp values and write to rflags.
Diffstat (limited to 'src')
-rw-r--r--src/arch/x86/isa/decoder/two_byte_opcodes.isa6
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py53
2 files changed, 50 insertions, 9 deletions
diff --git a/src/arch/x86/isa/decoder/two_byte_opcodes.isa b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
index 41cbdd869..b41f2b31d 100644
--- a/src/arch/x86/isa/decoder/two_byte_opcodes.isa
+++ b/src/arch/x86/isa/decoder/two_byte_opcodes.isa
@@ -379,8 +379,8 @@
0x3: movntps_Mo_Vo();
0x4: cvttps2pi_Pq_Wq();
0x5: cvtpS2pi_Pq_Wq();
- 0x6: ucomiss_Vd_Wd();
- 0x7: comiss_Vd_Wd();
+ 0x6: Inst::UCOMISS(Vd,Wd);
+ 0x7: Inst::COMISS(Vd,Wd);
}
// repe (0xF3)
0x4: decode OPCODE_OP_BOTTOM3 {
@@ -398,7 +398,7 @@
0x4: cvttpd2pi_Pq_Wo();
0x5: cvtpd2pi_Pq_Wo();
0x6: Inst::UCOMISD(Vq,Wq);
- 0x7: comisd_Vq_Wq();
+ 0x7: Inst::COMISD(Vq,Wq);
}
// repne (0xF2)
0x8: decode OPCODE_OP_BOTTOM3 {
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py
index 2e22f71eb..50afddf7b 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/compare/compare_and_write_rflags.py
@@ -54,22 +54,63 @@
# Authors: Gabe Black
microcode = '''
-# COMISS
-# COMISD
-# UCOMISS
+def macroop UCOMISS_XMM_XMM {
+ mcmpf2rf xmml, xmmlm, size=4
+};
+
+def macroop UCOMISS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=4
+};
+
+def macroop UCOMISS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=4
+};
def macroop UCOMISD_XMM_XMM {
- compfp xmml, xmmlm
+ mcmpf2rf xmml, xmmlm, size=8
};
def macroop UCOMISD_XMM_M {
ldfp ufp1, seg, sib, disp, dataSize=8
- compfp xmml, ufp1
+ mcmpf2rf xmml, ufp1, size=8
};
def macroop UCOMISD_XMM_P {
rdip t7
ldfp ufp1, seg, riprel, disp, dataSize=8
- compfp xmml, ufp1
+ mcmpf2rf xmml, ufp1, size=8
+};
+
+def macroop COMISS_XMM_XMM {
+ mcmpf2rf xmml, xmmlm, size=4
+};
+
+def macroop COMISS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=4
+};
+
+def macroop COMISS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=4
+};
+
+def macroop COMISD_XMM_XMM {
+ mcmpf2rf xmml, xmmlm, size=8
+};
+
+def macroop COMISD_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=8
+};
+
+def macroop COMISD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ mcmpf2rf xmml, ufp1, size=8
};
'''