1 | ; $Id: bs3-fpustate-1-asm.asm 69111 2017-10-17 14:26:02Z vboxsync $
|
---|
2 | ;; @file
|
---|
3 | ; BS3Kit - bs3-fpustate-1, assembly helpers and template instantiation.
|
---|
4 | ;
|
---|
5 |
|
---|
6 | ;
|
---|
7 | ; Copyright (C) 2007-2017 Oracle Corporation
|
---|
8 | ;
|
---|
9 | ; This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | ; available from http://www.virtualbox.org. This file is free software;
|
---|
11 | ; you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | ; General Public License (GPL) as published by the Free Software
|
---|
13 | ; Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | ; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | ; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | ;
|
---|
17 | ; The contents of this file may alternatively be used under the terms
|
---|
18 | ; of the Common Development and Distribution License Version 1.0
|
---|
19 | ; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | ; VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | ; CDDL are applicable instead of those of the GPL.
|
---|
22 | ;
|
---|
23 | ; You may elect to license modified versions of this file under the
|
---|
24 | ; terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | ;
|
---|
26 |
|
---|
27 |
|
---|
28 | ;*********************************************************************************************************************************
|
---|
29 | ;* Header Files *
|
---|
30 | ;*********************************************************************************************************************************
|
---|
31 | %include "bs3kit.mac"
|
---|
32 |
|
---|
33 |
|
---|
34 | ;*********************************************************************************************************************************
|
---|
35 | ;* Global Variables *
|
---|
36 | ;*********************************************************************************************************************************
|
---|
37 | BS3_BEGIN_DATA16
|
---|
38 | ;; @name Floating point constants.
|
---|
39 | ; @{
|
---|
40 | g_r32_0dot1: dd 0.1
|
---|
41 | g_r32_3dot2: dd 3.2
|
---|
42 | g_r32_Zero: dd 0.0
|
---|
43 | g_r32_One: dd 1.0
|
---|
44 | g_r32_Two: dd 2.0
|
---|
45 | g_r32_Three: dd 3.0
|
---|
46 | g_r32_Ten: dd 10.0
|
---|
47 | g_r32_Eleven: dd 11.0
|
---|
48 | g_r32_ThirtyTwo:dd 32.0
|
---|
49 | g_r32_Min: dd 000800000h
|
---|
50 | g_r32_Max: dd 07f7fffffh
|
---|
51 | g_r32_Inf: dd 07f800000h
|
---|
52 | g_r32_SNaN: dd 07f800001h
|
---|
53 | g_r32_SNaNMax: dd 07fbfffffh
|
---|
54 | g_r32_QNaN: dd 07fc00000h
|
---|
55 | g_r32_QNaNMax: dd 07fffffffh
|
---|
56 | g_r32_NegQNaN: dd 0ffc00000h
|
---|
57 |
|
---|
58 | g_r64_0dot1: dq 0.1
|
---|
59 | g_r64_6dot9: dq 6.9
|
---|
60 | g_r64_Zero: dq 0.0
|
---|
61 | g_r64_One: dq 1.0
|
---|
62 | g_r64_Two: dq 2.0
|
---|
63 | g_r64_Three: dq 3.0
|
---|
64 | g_r64_Ten: dq 10.0
|
---|
65 | g_r64_Eleven: dq 11.0
|
---|
66 | g_r64_ThirtyTwo:dq 32.0
|
---|
67 | g_r64_Min: dq 00010000000000000h
|
---|
68 | g_r64_Max: dq 07fefffffffffffffh
|
---|
69 | g_r64_Inf: dq 07ff0000000000000h
|
---|
70 | g_r64_SNaN: dq 07ff0000000000001h
|
---|
71 | g_r64_SNaNMax: dq 07ff7ffffffffffffh
|
---|
72 | g_r64_NegQNaN: dq 0fff8000000000000h
|
---|
73 | g_r64_QNaN: dq 07ff8000000000000h
|
---|
74 | g_r64_QNaNMax: dq 07fffffffffffffffh
|
---|
75 | g_r64_DnMin: dq 00000000000000001h
|
---|
76 | g_r64_DnMax: dq 0000fffffffffffffh
|
---|
77 |
|
---|
78 |
|
---|
79 | g_r80_0dot1: dt 0.1
|
---|
80 | g_r80_3dot2: dt 3.2
|
---|
81 | g_r80_Zero: dt 0.0
|
---|
82 | g_r80_One: dt 1.0
|
---|
83 | g_r80_Two: dt 2.0
|
---|
84 | g_r80_Three: dt 3.0
|
---|
85 | g_r80_Ten: dt 10.0
|
---|
86 | g_r80_Eleven: dt 11.0
|
---|
87 | g_r80_ThirtyTwo:dt 32.0
|
---|
88 | %ifdef __NASM__
|
---|
89 | g_r80_Min: dq 08000000000000000h
|
---|
90 | dw 00001h
|
---|
91 | g_r80_Max: dq 0ffffffffffffffffh
|
---|
92 | dw 07ffeh
|
---|
93 | g_r80_Inf: dq 08000000000000000h
|
---|
94 | dw 07fffh
|
---|
95 | g_r80_QNaN: dq 0c000000000000000h
|
---|
96 | dw 07fffh
|
---|
97 | g_r80_QNaNMax: dq 0ffffffffffffffffh
|
---|
98 | dw 07fffh
|
---|
99 | g_r80_NegQNaN: dq 0c000000000000000h
|
---|
100 | dw 0ffffh
|
---|
101 | g_r80_SNaN: dq 08000000000000001h
|
---|
102 | dw 07fffh
|
---|
103 | g_r80_SNaNMax: dq 0bfffffffffffffffh
|
---|
104 | dw 07fffh
|
---|
105 | g_r80_DnMin: dq 00000000000000001h
|
---|
106 | dw 00000h
|
---|
107 | g_r80_DnMax: dq 07fffffffffffffffh
|
---|
108 | dw 00000h
|
---|
109 | %else
|
---|
110 | g_r80_Min: dt 000018000000000000000h
|
---|
111 | g_r80_Max: dt 07ffeffffffffffffffffh
|
---|
112 | g_r80_Inf: dt 07fff8000000000000000h
|
---|
113 | g_r80_QNaN: dt 07fffc000000000000000h
|
---|
114 | g_r80_QNaNMax: dt 07fffffffffffffffffffh
|
---|
115 | g_r80_NegQNaN: dt 0ffffc000000000000000h
|
---|
116 | g_r80_SNaN: dt 07fff8000000000000001h
|
---|
117 | g_r80_SNaNMax: dt 07fffbfffffffffffffffh
|
---|
118 | g_r80_DnMin: dt 000000000000000000001h
|
---|
119 | g_r80_DnMax: dt 000007fffffffffffffffh
|
---|
120 | %endif
|
---|
121 |
|
---|
122 | g_r32V1: dd 3.2
|
---|
123 | g_r32V2: dd -1.9
|
---|
124 | g_r64V1: dq 6.4
|
---|
125 | g_r80V1: dt 8.0
|
---|
126 |
|
---|
127 | ; Denormal numbers.
|
---|
128 | g_r32D0: dd 000200000h
|
---|
129 | ;; @}
|
---|
130 |
|
---|
131 | ;; @name Upconverted Floating point constants
|
---|
132 | ; @{
|
---|
133 | ;g_r80_r32_0dot1: dt 0.1
|
---|
134 | %ifdef __NASM__
|
---|
135 | g_r80_r32_3dot2: dq 0cccccd0000000000h
|
---|
136 | dw 04000h
|
---|
137 | %else
|
---|
138 | g_r80_r32_3dot2: dt 04000cccccd0000000000h
|
---|
139 | %endif
|
---|
140 | ;g_r80_r32_Zero: dt 0.0
|
---|
141 | ;g_r80_r32_One: dt 1.0
|
---|
142 | ;g_r80_r32_Two: dt 2.0
|
---|
143 | ;g_r80_r32_Three: dt 3.0
|
---|
144 | ;g_r80_r32_Ten: dt 10.0
|
---|
145 | ;g_r80_r32_Eleven: dt 11.0
|
---|
146 | ;g_r80_r32_ThirtyTwo: dt 32.0
|
---|
147 | ;; @}
|
---|
148 |
|
---|
149 | ;; @name Decimal constants.
|
---|
150 | ; @{
|
---|
151 | g_u64Zero: dd 0
|
---|
152 | g_u32Zero: dw 0
|
---|
153 | g_u64Two: dd 2
|
---|
154 | g_u32Two: dw 2
|
---|
155 | ;; @}
|
---|
156 |
|
---|
157 |
|
---|
158 | ;
|
---|
159 | ; Instantiate code templates.
|
---|
160 | ;
|
---|
161 | BS3_INSTANTIATE_TEMPLATE_ESSENTIALS "bs3-fpustate-1-template.mac"
|
---|
162 |
|
---|