summaryrefslogtreecommitdiff
path: root/src/arch/x86/isa/insts
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
commitf5ac4f51d94ff24818f17c768e17893629f5910c (patch)
tree8272fb9e49c67f5598efcd2654b01c188001451a /src/arch/x86/isa/insts
parent83df309a7ed25373e265b3885d3871547dff6274 (diff)
downloadgem5-f5ac4f51d94ff24818f17c768e17893629f5910c.tar.xz
X86: Implement the instructions that convert between forms of floating point.
Diffstat (limited to 'src/arch/x86/isa/insts')
-rw-r--r--src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py74
1 files changed, 70 insertions, 4 deletions
diff --git a/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py b/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
index 2de33efa2..1c36f7e45 100644
--- a/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
+++ b/src/arch/x86/isa/insts/simd128/floating_point/data_conversion/convert_floating_point_to_floating_point.py
@@ -54,8 +54,74 @@
# Authors: Gabe Black
microcode = '''
-# CVTPS2PD
-# CVTPD2PS
-# CVTSS2SD
-# CVTSD2SS
+def macroop CVTSS2SD_XMM_XMM {
+ cvtf2f xmml, xmmlm, destSize=8, srcSize=4, ext=1
+};
+
+def macroop CVTSS2SD_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=1
+};
+
+def macroop CVTSS2SD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=1
+};
+
+def macroop CVTSD2SS_XMM_XMM {
+ cvtf2f xmml, xmmlm, destSize=4, srcSize=8, ext=1
+};
+
+def macroop CVTSD2SS_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=1
+};
+
+def macroop CVTSD2SS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=1
+};
+
+def macroop CVTPS2PD_XMM_XMM {
+ cvtf2f xmmh, xmmlm, destSize=8, srcSize=4, ext=2
+ cvtf2f xmml, xmmlm, destSize=8, srcSize=4, ext=0
+};
+
+def macroop CVTPS2PD_XMM_M {
+ ldfp ufp1, seg, sib, disp, dataSize=8
+ cvtf2f xmmh, ufp1, destSize=8, srcSize=4, ext=2
+ cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=0
+};
+
+def macroop CVTPS2PD_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, disp, dataSize=8
+ cvtf2f xmmh, ufp1, destSize=8, srcSize=4, ext=2
+ cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=0
+};
+
+def macroop CVTPD2PS_XMM_XMM {
+ cvtf2f xmml, xmmlm, destSize=4, srcSize=8, ext=0
+ cvtf2f xmml, xmmhm, destSize=4, srcSize=8, ext=2
+ lfpimm xmmh, 0
+};
+
+def macroop CVTPD2PS_XMM_M {
+ ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
+ cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=0
+ cvtf2f xmml, ufp2, destSize=4, srcSize=8, ext=2
+ lfpimm xmmh, 0
+};
+
+def macroop CVTPD2PS_XMM_P {
+ rdip t7
+ ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
+ ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
+ cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=0
+ cvtf2f xmml, ufp2, destSize=4, srcSize=8, ext=2
+ lfpimm xmmh, 0
+};
'''