convert_floating_point_to_floating_point.py (5081:2ccce8600a9d) convert_floating_point_to_floating_point.py (6569:e8cb266c9451)
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use of this software in source and binary forms,
5# with or without modification, are permitted provided that the
6# following conditions are met:
7#
8# The software must be used only for Non-Commercial Use which means any

--- 40 unchanged lines hidden (view full) ---

49# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53#
54# Authors: Gabe Black
55
56microcode = '''
1# Copyright (c) 2007 The Hewlett-Packard Development Company
2# All rights reserved.
3#
4# Redistribution and use of this software in source and binary forms,
5# with or without modification, are permitted provided that the
6# following conditions are met:
7#
8# The software must be used only for Non-Commercial Use which means any

--- 40 unchanged lines hidden (view full) ---

49# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
50# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
51# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
52# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
53#
54# Authors: Gabe Black
55
56microcode = '''
57# CVTPS2PD
58# CVTPD2PS
59# CVTSS2SD
60# CVTSD2SS
57def macroop CVTSS2SD_XMM_XMM {
58 cvtf2f xmml, xmmlm, destSize=8, srcSize=4, ext=1
59};
60
61def macroop CVTSS2SD_XMM_M {
62 ldfp ufp1, seg, sib, disp, dataSize=8
63 cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=1
64};
65
66def macroop CVTSS2SD_XMM_P {
67 rdip t7
68 ldfp ufp1, seg, riprel, disp, dataSize=8
69 cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=1
70};
71
72def macroop CVTSD2SS_XMM_XMM {
73 cvtf2f xmml, xmmlm, destSize=4, srcSize=8, ext=1
74};
75
76def macroop CVTSD2SS_XMM_M {
77 ldfp ufp1, seg, sib, disp, dataSize=8
78 cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=1
79};
80
81def macroop CVTSD2SS_XMM_P {
82 rdip t7
83 ldfp ufp1, seg, riprel, disp, dataSize=8
84 cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=1
85};
86
87def macroop CVTPS2PD_XMM_XMM {
88 cvtf2f xmmh, xmmlm, destSize=8, srcSize=4, ext=2
89 cvtf2f xmml, xmmlm, destSize=8, srcSize=4, ext=0
90};
91
92def macroop CVTPS2PD_XMM_M {
93 ldfp ufp1, seg, sib, disp, dataSize=8
94 cvtf2f xmmh, ufp1, destSize=8, srcSize=4, ext=2
95 cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=0
96};
97
98def macroop CVTPS2PD_XMM_P {
99 rdip t7
100 ldfp ufp1, seg, riprel, disp, dataSize=8
101 cvtf2f xmmh, ufp1, destSize=8, srcSize=4, ext=2
102 cvtf2f xmml, ufp1, destSize=8, srcSize=4, ext=0
103};
104
105def macroop CVTPD2PS_XMM_XMM {
106 cvtf2f xmml, xmmlm, destSize=4, srcSize=8, ext=0
107 cvtf2f xmml, xmmhm, destSize=4, srcSize=8, ext=2
108 lfpimm xmmh, 0
109};
110
111def macroop CVTPD2PS_XMM_M {
112 ldfp ufp1, seg, sib, "DISPLACEMENT", dataSize=8
113 ldfp ufp2, seg, sib, "DISPLACEMENT + 8", dataSize=8
114 cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=0
115 cvtf2f xmml, ufp2, destSize=4, srcSize=8, ext=2
116 lfpimm xmmh, 0
117};
118
119def macroop CVTPD2PS_XMM_P {
120 rdip t7
121 ldfp ufp1, seg, riprel, "DISPLACEMENT", dataSize=8
122 ldfp ufp2, seg, riprel, "DISPLACEMENT + 8", dataSize=8
123 cvtf2f xmml, ufp1, destSize=4, srcSize=8, ext=0
124 cvtf2f xmml, ufp2, destSize=4, srcSize=8, ext=2
125 lfpimm xmmh, 0
126};
61'''
127'''