1 |
|
---|
2 | /*============================================================================
|
---|
3 |
|
---|
4 | This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
|
---|
5 | Package, Release 3e, by John R. Hauser.
|
---|
6 |
|
---|
7 | Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
|
---|
8 | University of California. All rights reserved.
|
---|
9 |
|
---|
10 | Redistribution and use in source and binary forms, with or without
|
---|
11 | modification, are permitted provided that the following conditions are met:
|
---|
12 |
|
---|
13 | 1. Redistributions of source code must retain the above copyright notice,
|
---|
14 | this list of conditions, and the following disclaimer.
|
---|
15 |
|
---|
16 | 2. Redistributions in binary form must reproduce the above copyright notice,
|
---|
17 | this list of conditions, and the following disclaimer in the documentation
|
---|
18 | and/or other materials provided with the distribution.
|
---|
19 |
|
---|
20 | 3. Neither the name of the University nor the names of its contributors may
|
---|
21 | be used to endorse or promote products derived from this software without
|
---|
22 | specific prior written permission.
|
---|
23 |
|
---|
24 | THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
|
---|
25 | EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
---|
26 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
|
---|
27 | DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
|
---|
28 | DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
---|
29 | (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
---|
30 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
---|
31 | ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
---|
32 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
---|
33 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
---|
34 |
|
---|
35 | =============================================================================*/
|
---|
36 |
|
---|
37 |
|
---|
38 | /*============================================================================
|
---|
39 | | Note: If SoftFloat is made available as a general library for programs to
|
---|
40 | | use, it is strongly recommended that a platform-specific version of this
|
---|
41 | | header, "softfloat.h", be created that folds in "softfloat_types.h" and that
|
---|
42 | | eliminates all dependencies on compile-time macros.
|
---|
43 | *============================================================================*/
|
---|
44 |
|
---|
45 |
|
---|
46 | #ifndef softfloat_h
|
---|
47 | #define softfloat_h 1
|
---|
48 |
|
---|
49 | #include <iprt/cdefs.h>
|
---|
50 | #include <stdbool.h>
|
---|
51 | #include <stdint.h>
|
---|
52 | #include "softfloat_types.h"
|
---|
53 |
|
---|
54 | #ifndef THREAD_LOCAL
|
---|
55 | #define THREAD_LOCAL
|
---|
56 | #endif
|
---|
57 |
|
---|
58 | RT_C_DECLS_BEGIN
|
---|
59 |
|
---|
60 | /*----------------------------------------------------------------------------
|
---|
61 | | Software floating-point underflow tininess-detection mode.
|
---|
62 | *----------------------------------------------------------------------------*/
|
---|
63 | #ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
|
---|
64 | extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess;
|
---|
65 | #else
|
---|
66 | # define softfloat_detectTininess (pState->detectTininess)
|
---|
67 | #endif
|
---|
68 | enum {
|
---|
69 | softfloat_tininess_beforeRounding = 0,
|
---|
70 | softfloat_tininess_afterRounding = 1
|
---|
71 | };
|
---|
72 |
|
---|
73 | /*----------------------------------------------------------------------------
|
---|
74 | | Software floating-point rounding mode. (Mode "odd" is supported only if
|
---|
75 | | SoftFloat is compiled with macro 'SOFTFLOAT_ROUND_ODD' defined.)
|
---|
76 | *----------------------------------------------------------------------------*/
|
---|
77 | #ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
|
---|
78 | extern THREAD_LOCAL uint_fast8_t softfloat_roundingMode;
|
---|
79 | #else
|
---|
80 | # define softfloat_roundingMode (pState->roundingMode)
|
---|
81 | #endif
|
---|
82 | enum {
|
---|
83 | softfloat_round_near_even = 0,
|
---|
84 | softfloat_round_minMag = 1,
|
---|
85 | softfloat_round_min = 2,
|
---|
86 | softfloat_round_max = 3,
|
---|
87 | softfloat_round_near_maxMag = 4,
|
---|
88 | softfloat_round_odd = 6
|
---|
89 | };
|
---|
90 |
|
---|
91 | /*----------------------------------------------------------------------------
|
---|
92 | | Software floating-point exception flags.
|
---|
93 | *----------------------------------------------------------------------------*/
|
---|
94 | #ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
|
---|
95 | extern THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags;
|
---|
96 | #else
|
---|
97 | # define softfloat_exceptionFlags (pState->exceptionFlags)
|
---|
98 | #endif
|
---|
99 | enum {
|
---|
100 | #ifndef VBOX
|
---|
101 | softfloat_flag_inexact = 1,
|
---|
102 | softfloat_flag_underflow = 2,
|
---|
103 | softfloat_flag_overflow = 4,
|
---|
104 | softfloat_flag_infinite = 8,
|
---|
105 | softfloat_flag_invalid = 16
|
---|
106 | #else /* VBox: Match X86_FSW_?E */
|
---|
107 | softfloat_flag_invalid = 1<<0 /**< X86_FSW_IE */,
|
---|
108 | softfloat_flag_denormal = 1<<1 /**< X86_FSW_DE - only returned by some VBox specific functions */,
|
---|
109 | softfloat_flag_infinite = 1<<2 /**< X86_FSW_ZE */,
|
---|
110 | softfloat_flag_overflow = 1<<3 /**< X86_FSW_OE */,
|
---|
111 | softfloat_flag_underflow = 1<<4 /**< X86_FSW_UE */,
|
---|
112 | softfloat_flag_inexact = 1<<5 /**< X86_FSW_PE */,
|
---|
113 | softfloat_flag_c1 = 1<<7 /**< X86_FSW_C1 - round up indicator. wrong place. */
|
---|
114 | #endif
|
---|
115 | };
|
---|
116 |
|
---|
117 | /*----------------------------------------------------------------------------
|
---|
118 | | Routine to raise any or all of the software floating-point exception flags.
|
---|
119 | *----------------------------------------------------------------------------*/
|
---|
120 | void softfloat_raiseFlags( uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
121 |
|
---|
122 | /*----------------------------------------------------------------------------
|
---|
123 | | Integer-to-floating-point conversion routines.
|
---|
124 | *----------------------------------------------------------------------------*/
|
---|
125 | float16_t ui32_to_f16( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
126 | float32_t ui32_to_f32( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
127 | float64_t ui32_to_f64( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
128 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
129 | extFloat80_t ui32_to_extF80( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
130 | float128_t ui32_to_f128( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
131 | #endif
|
---|
132 | void ui32_to_extF80M( uint32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
133 | void ui32_to_f128M( uint32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
134 | float16_t ui64_to_f16( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
135 | float32_t ui64_to_f32( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
136 | float64_t ui64_to_f64( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
137 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
138 | extFloat80_t ui64_to_extF80( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
139 | float128_t ui64_to_f128( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
140 | #endif
|
---|
141 | void ui64_to_extF80M( uint64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
142 | void ui64_to_f128M( uint64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
143 | float16_t i32_to_f16( int32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
144 | float32_t i32_to_f32( int32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
145 | float64_t i32_to_f64( int32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
146 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
147 | extFloat80_t i32_to_extF80( int32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
148 | float128_t i32_to_f128( int32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
149 | #endif
|
---|
150 | void i32_to_extF80M( int32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
151 | void i32_to_f128M( int32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
152 | float16_t i64_to_f16( int64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
153 | float32_t i64_to_f32( int64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
154 | float64_t i64_to_f64( int64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
155 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
156 | extFloat80_t i64_to_extF80( int64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
157 | float128_t i64_to_f128( int64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
158 | #endif
|
---|
159 | void i64_to_extF80M( int64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
160 | void i64_to_f128M( int64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
161 |
|
---|
162 | /*----------------------------------------------------------------------------
|
---|
163 | | 16-bit (half-precision) floating-point operations.
|
---|
164 | *----------------------------------------------------------------------------*/
|
---|
165 | uint_fast32_t f16_to_ui32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
166 | uint_fast64_t f16_to_ui64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
167 | int_fast32_t f16_to_i32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
168 | int_fast64_t f16_to_i64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
169 | uint_fast32_t f16_to_ui32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
170 | uint_fast64_t f16_to_ui64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
171 | int_fast32_t f16_to_i32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
172 | int_fast64_t f16_to_i64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
173 | float32_t f16_to_f32( float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
174 | float64_t f16_to_f64( float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
175 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
176 | extFloat80_t f16_to_extF80( float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
177 | float128_t f16_to_f128( float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
178 | #endif
|
---|
179 | void f16_to_extF80M( float16_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
180 | void f16_to_f128M( float16_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
181 | float16_t f16_roundToInt( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
182 | float16_t f16_add( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
183 | float16_t f16_sub( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
184 | float16_t f16_mul( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
185 | float16_t f16_mulAdd( float16_t, float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
186 | float16_t f16_div( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
187 | float16_t f16_rem( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
188 | float16_t f16_sqrt( float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
189 | bool f16_eq( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
190 | bool f16_le( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
191 | bool f16_lt( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
192 | bool f16_eq_signaling( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
193 | bool f16_le_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
194 | bool f16_lt_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
195 | bool f16_isSignalingNaN( float16_t );
|
---|
196 |
|
---|
197 | /*----------------------------------------------------------------------------
|
---|
198 | | 32-bit (single-precision) floating-point operations.
|
---|
199 | *----------------------------------------------------------------------------*/
|
---|
200 | uint_fast32_t f32_to_ui32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
201 | uint_fast64_t f32_to_ui64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
202 | int_fast32_t f32_to_i32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
203 | int_fast64_t f32_to_i64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
204 | uint_fast32_t f32_to_ui32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
205 | uint_fast64_t f32_to_ui64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
206 | int_fast32_t f32_to_i32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
207 | int_fast64_t f32_to_i64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
208 | float16_t f32_to_f16( float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
209 | float64_t f32_to_f64( float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
210 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
211 | extFloat80_t f32_to_extF80( float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
212 | float128_t f32_to_f128( float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
213 | #endif
|
---|
214 | void f32_to_extF80M( float32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
215 | void f32_to_f128M( float32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
216 | float32_t f32_roundToInt( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
217 | float32_t f32_add( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
218 | float32_t f32_sub( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
219 | float32_t f32_mul( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
220 | float32_t f32_mulAdd( float32_t, float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
221 | float32_t f32_div( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
222 | float32_t f32_rem( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
223 | float32_t f32_sqrt( float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
224 | bool f32_eq( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
225 | bool f32_le( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
226 | bool f32_lt( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
227 | bool f32_eq_signaling( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
228 | bool f32_le_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
229 | bool f32_lt_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
230 | bool f32_isSignalingNaN( float32_t );
|
---|
231 |
|
---|
232 | /*----------------------------------------------------------------------------
|
---|
233 | | 64-bit (double-precision) floating-point operations.
|
---|
234 | *----------------------------------------------------------------------------*/
|
---|
235 | uint_fast32_t f64_to_ui32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
236 | uint_fast64_t f64_to_ui64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
237 | int_fast32_t f64_to_i32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
238 | int_fast64_t f64_to_i64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
239 | uint_fast32_t f64_to_ui32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
240 | uint_fast64_t f64_to_ui64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
241 | int_fast32_t f64_to_i32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
242 | int_fast64_t f64_to_i64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
243 | float16_t f64_to_f16( float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
244 | float32_t f64_to_f32( float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
245 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
246 | extFloat80_t f64_to_extF80( float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
247 | float128_t f64_to_f128( float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
248 | #endif
|
---|
249 | void f64_to_extF80M( float64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
250 | void f64_to_f128M( float64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
251 | float64_t f64_roundToInt( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
252 | float64_t f64_add( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
253 | float64_t f64_sub( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
254 | float64_t f64_mul( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
255 | float64_t f64_mulAdd( float64_t, float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
256 | float64_t f64_div( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
257 | float64_t f64_rem( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
258 | float64_t f64_sqrt( float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
259 | bool f64_eq( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
260 | bool f64_le( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
261 | bool f64_lt( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
262 | bool f64_eq_signaling( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
263 | bool f64_le_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
264 | bool f64_lt_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
265 | bool f64_isSignalingNaN( float64_t );
|
---|
266 |
|
---|
267 | /*----------------------------------------------------------------------------
|
---|
268 | | Rounding precision for 80-bit extended double-precision floating-point.
|
---|
269 | | Valid values are 32, 64, and 80.
|
---|
270 | *----------------------------------------------------------------------------*/
|
---|
271 | #ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
|
---|
272 | extern THREAD_LOCAL uint_fast8_t extF80_roundingPrecision;
|
---|
273 | #else
|
---|
274 | # define extF80_roundingPrecision (pState->roundingPrecision)
|
---|
275 | #endif
|
---|
276 |
|
---|
277 | /*----------------------------------------------------------------------------
|
---|
278 | | 80-bit extended double-precision floating-point operations.
|
---|
279 | *----------------------------------------------------------------------------*/
|
---|
280 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
281 | uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
282 | uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
283 | int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
284 | int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
285 | uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
286 | uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
287 | int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
288 | int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
289 | float16_t extF80_to_f16( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
290 | float32_t extF80_to_f32( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
291 | float64_t extF80_to_f64( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
292 | float128_t extF80_to_f128( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
293 | extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
294 | extFloat80_t extF80_add( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
295 | extFloat80_t extF80_sub( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
296 | extFloat80_t extF80_mul( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
297 | extFloat80_t extF80_div( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
298 | extFloat80_t extF80_rem( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
299 | extFloat80_t extF80_partialRem( extFloat80_t a, extFloat80_t b, uint8_t roundingMode, /* VBox: FPREM/FPREM1 */
|
---|
300 | uint16_t *pfCxFlags, softfloat_state_t *pState ); /* VBox: FPREM/FPREM1 */
|
---|
301 | extFloat80_t extF80_sqrt( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
302 | extFloat80_t extF80_sin( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
303 | extFloat80_t extF80_cos( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
304 | void extF80_sincos( extFloat80_t, extFloat80_t*, extFloat80_t* SOFTFLOAT_STATE_DECL_COMMA );
|
---|
305 | extFloat80_t extF80_scale_extF80( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
306 | bool extF80_eq( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
307 | bool extF80_le( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
308 | bool extF80_lt( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
309 | bool extF80_eq_signaling( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
310 | bool extF80_le_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
311 | bool extF80_lt_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
312 | bool extF80_isSignalingNaN( extFloat80_t );
|
---|
313 | #endif
|
---|
314 | uint_fast32_t extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
315 | uint_fast64_t extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
316 | int_fast32_t extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
317 | int_fast64_t extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
318 | uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
319 | uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
320 | int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
321 | int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
322 | float16_t extF80M_to_f16( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
323 | float32_t extF80M_to_f32( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
324 | float64_t extF80M_to_f64( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
325 | void extF80M_to_f128M( const extFloat80_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
326 | void
|
---|
327 | extF80M_roundToInt(
|
---|
328 | const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
329 | void extF80M_add( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
330 | void extF80M_sub( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
331 | void extF80M_mul( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
332 | void extF80M_div( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
333 | void extF80M_rem( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
334 | void extF80M_sqrt( const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
335 | bool extF80M_eq( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
336 | bool extF80M_le( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
337 | bool extF80M_lt( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
338 | bool extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
339 | bool extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
340 | bool extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
341 | bool extF80M_isSignalingNaN( const extFloat80_t * );
|
---|
342 |
|
---|
343 | /*----------------------------------------------------------------------------
|
---|
344 | | 128-bit (quadruple-precision) floating-point operations.
|
---|
345 | *----------------------------------------------------------------------------*/
|
---|
346 | #ifdef SOFTFLOAT_FAST_INT64
|
---|
347 | uint_fast32_t f128_to_ui32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
348 | uint_fast64_t f128_to_ui64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
349 | int_fast32_t f128_to_i32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
350 | int_fast64_t f128_to_i64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
351 | uint_fast32_t f128_to_ui32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
352 | uint_fast64_t f128_to_ui64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
353 | int_fast32_t f128_to_i32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
354 | int_fast64_t f128_to_i64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
355 | float16_t f128_to_f16( float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
356 | float32_t f128_to_f32( float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
357 | float64_t f128_to_f64( float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
358 | extFloat80_t f128_to_extF80( float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
359 | float128_t f128_roundToInt( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
360 | float128_t f128_add( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
361 | float128_t f128_sub( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
362 | float128_t f128_mul( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
363 | float128_t f128_mulAdd( float128_t, float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
364 | float128_t f128_div( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
365 | float128_t f128_rem( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
366 | float128_t f128_sqrt( float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
367 | bool f128_eq( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
368 | bool f128_le( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
369 | bool f128_lt( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
370 | bool f128_eq_signaling( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
371 | bool f128_le_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
372 | bool f128_lt_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
|
---|
373 | bool f128_isSignalingNaN( float128_t );
|
---|
374 | #endif
|
---|
375 | uint_fast32_t f128M_to_ui32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
376 | uint_fast64_t f128M_to_ui64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
377 | int_fast32_t f128M_to_i32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
378 | int_fast64_t f128M_to_i64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
379 | uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
380 | uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
381 | int_fast32_t f128M_to_i32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
382 | int_fast64_t f128M_to_i64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
|
---|
383 | float16_t f128M_to_f16( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
384 | float32_t f128M_to_f32( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
385 | float64_t f128M_to_f64( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
386 | void f128M_to_extF80M( const float128_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
387 | void f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
388 | void f128M_add( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
389 | void f128M_sub( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
390 | void f128M_mul( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
391 | void
|
---|
392 | f128M_mulAdd(
|
---|
393 | const float128_t *, const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA
|
---|
394 | );
|
---|
395 | void f128M_div( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
396 | void f128M_rem( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
397 | void f128M_sqrt( const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
398 | bool f128M_eq( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
399 | bool f128M_le( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
400 | bool f128M_lt( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
401 | bool f128M_eq_signaling( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
402 | bool f128M_le_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
403 | bool f128M_lt_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
|
---|
404 | bool f128M_isSignalingNaN( const float128_t * );
|
---|
405 |
|
---|
406 | RT_C_DECLS_END
|
---|
407 |
|
---|
408 | #endif
|
---|
409 |
|
---|