VirtualBox

source: vbox/trunk/src/libs/softfloat-3e/source/include/softfloat.h@ 96666

Last change on this file since 96666 was 96661, checked in by vboxsync, 2 years ago

VMM/IEM: Implementation of CORDIC algorithm for sin and cos in Softfloat library, ​bugref:9898

  • Property svn:eol-style set to native
File size: 24.3 KB
Line 
1
2/*============================================================================
3
4This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5Package, Release 3e, by John R. Hauser.
6
7Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8University of California. All rights reserved.
9
10Redistribution and use in source and binary forms, with or without
11modification, 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
24THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
25EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
27DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
28DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31ON 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
33SOFTWARE, 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
58RT_C_DECLS_BEGIN
59
60/*----------------------------------------------------------------------------
61| Software floating-point underflow tininess-detection mode.
62*----------------------------------------------------------------------------*/
63#ifndef VBOX_WITHOUT_SOFTFLOAT_GLOBALS
64extern THREAD_LOCAL uint_fast8_t softfloat_detectTininess;
65#else
66# define softfloat_detectTininess (pState->detectTininess)
67#endif
68enum {
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
78extern THREAD_LOCAL uint_fast8_t softfloat_roundingMode;
79#else
80# define softfloat_roundingMode (pState->roundingMode)
81#endif
82enum {
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
95extern THREAD_LOCAL uint_fast8_t softfloat_exceptionFlags;
96#else
97# define softfloat_exceptionFlags (pState->exceptionFlags)
98#endif
99enum {
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*----------------------------------------------------------------------------*/
120void softfloat_raiseFlags( uint_fast8_t SOFTFLOAT_STATE_DECL_COMMA );
121
122/*----------------------------------------------------------------------------
123| Integer-to-floating-point conversion routines.
124*----------------------------------------------------------------------------*/
125float16_t ui32_to_f16( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
126float32_t ui32_to_f32( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
127float64_t ui32_to_f64( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
128#ifdef SOFTFLOAT_FAST_INT64
129extFloat80_t ui32_to_extF80( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
130float128_t ui32_to_f128( uint32_t SOFTFLOAT_STATE_DECL_COMMA );
131#endif
132void ui32_to_extF80M( uint32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
133void ui32_to_f128M( uint32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
134float16_t ui64_to_f16( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
135float32_t ui64_to_f32( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
136float64_t ui64_to_f64( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
137#ifdef SOFTFLOAT_FAST_INT64
138extFloat80_t ui64_to_extF80( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
139float128_t ui64_to_f128( uint64_t SOFTFLOAT_STATE_DECL_COMMA );
140#endif
141void ui64_to_extF80M( uint64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
142void ui64_to_f128M( uint64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
143float16_t i32_to_f16( int32_t SOFTFLOAT_STATE_DECL_COMMA );
144float32_t i32_to_f32( int32_t SOFTFLOAT_STATE_DECL_COMMA );
145float64_t i32_to_f64( int32_t SOFTFLOAT_STATE_DECL_COMMA );
146#ifdef SOFTFLOAT_FAST_INT64
147extFloat80_t i32_to_extF80( int32_t SOFTFLOAT_STATE_DECL_COMMA );
148float128_t i32_to_f128( int32_t SOFTFLOAT_STATE_DECL_COMMA );
149#endif
150void i32_to_extF80M( int32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
151void i32_to_f128M( int32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
152float16_t i64_to_f16( int64_t SOFTFLOAT_STATE_DECL_COMMA );
153float32_t i64_to_f32( int64_t SOFTFLOAT_STATE_DECL_COMMA );
154float64_t i64_to_f64( int64_t SOFTFLOAT_STATE_DECL_COMMA );
155#ifdef SOFTFLOAT_FAST_INT64
156extFloat80_t i64_to_extF80( int64_t SOFTFLOAT_STATE_DECL_COMMA );
157float128_t i64_to_f128( int64_t SOFTFLOAT_STATE_DECL_COMMA );
158#endif
159void i64_to_extF80M( int64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
160void i64_to_f128M( int64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
161
162/*----------------------------------------------------------------------------
163| 16-bit (half-precision) floating-point operations.
164*----------------------------------------------------------------------------*/
165uint_fast32_t f16_to_ui32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
166uint_fast64_t f16_to_ui64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
167int_fast32_t f16_to_i32( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
168int_fast64_t f16_to_i64( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
169uint_fast32_t f16_to_ui32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
170uint_fast64_t f16_to_ui64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
171int_fast32_t f16_to_i32_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
172int_fast64_t f16_to_i64_r_minMag( float16_t, bool SOFTFLOAT_STATE_DECL_COMMA );
173float32_t f16_to_f32( float16_t SOFTFLOAT_STATE_DECL_COMMA );
174float64_t f16_to_f64( float16_t SOFTFLOAT_STATE_DECL_COMMA );
175#ifdef SOFTFLOAT_FAST_INT64
176extFloat80_t f16_to_extF80( float16_t SOFTFLOAT_STATE_DECL_COMMA );
177float128_t f16_to_f128( float16_t SOFTFLOAT_STATE_DECL_COMMA );
178#endif
179void f16_to_extF80M( float16_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
180void f16_to_f128M( float16_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
181float16_t f16_roundToInt( float16_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
182float16_t f16_add( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
183float16_t f16_sub( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
184float16_t f16_mul( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
185float16_t f16_mulAdd( float16_t, float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
186float16_t f16_div( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
187float16_t f16_rem( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
188float16_t f16_sqrt( float16_t SOFTFLOAT_STATE_DECL_COMMA );
189bool f16_eq( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
190bool f16_le( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
191bool f16_lt( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
192bool f16_eq_signaling( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
193bool f16_le_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
194bool f16_lt_quiet( float16_t, float16_t SOFTFLOAT_STATE_DECL_COMMA );
195bool f16_isSignalingNaN( float16_t );
196
197/*----------------------------------------------------------------------------
198| 32-bit (single-precision) floating-point operations.
199*----------------------------------------------------------------------------*/
200uint_fast32_t f32_to_ui32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
201uint_fast64_t f32_to_ui64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
202int_fast32_t f32_to_i32( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
203int_fast64_t f32_to_i64( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
204uint_fast32_t f32_to_ui32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
205uint_fast64_t f32_to_ui64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
206int_fast32_t f32_to_i32_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
207int_fast64_t f32_to_i64_r_minMag( float32_t, bool SOFTFLOAT_STATE_DECL_COMMA );
208float16_t f32_to_f16( float32_t SOFTFLOAT_STATE_DECL_COMMA );
209float64_t f32_to_f64( float32_t SOFTFLOAT_STATE_DECL_COMMA );
210#ifdef SOFTFLOAT_FAST_INT64
211extFloat80_t f32_to_extF80( float32_t SOFTFLOAT_STATE_DECL_COMMA );
212float128_t f32_to_f128( float32_t SOFTFLOAT_STATE_DECL_COMMA );
213#endif
214void f32_to_extF80M( float32_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
215void f32_to_f128M( float32_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
216float32_t f32_roundToInt( float32_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
217float32_t f32_add( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
218float32_t f32_sub( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
219float32_t f32_mul( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
220float32_t f32_mulAdd( float32_t, float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
221float32_t f32_div( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
222float32_t f32_rem( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
223float32_t f32_sqrt( float32_t SOFTFLOAT_STATE_DECL_COMMA );
224bool f32_eq( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
225bool f32_le( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
226bool f32_lt( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
227bool f32_eq_signaling( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
228bool f32_le_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
229bool f32_lt_quiet( float32_t, float32_t SOFTFLOAT_STATE_DECL_COMMA );
230bool f32_isSignalingNaN( float32_t );
231
232/*----------------------------------------------------------------------------
233| 64-bit (double-precision) floating-point operations.
234*----------------------------------------------------------------------------*/
235uint_fast32_t f64_to_ui32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
236uint_fast64_t f64_to_ui64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
237int_fast32_t f64_to_i32( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
238int_fast64_t f64_to_i64( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
239uint_fast32_t f64_to_ui32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
240uint_fast64_t f64_to_ui64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
241int_fast32_t f64_to_i32_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
242int_fast64_t f64_to_i64_r_minMag( float64_t, bool SOFTFLOAT_STATE_DECL_COMMA );
243float16_t f64_to_f16( float64_t SOFTFLOAT_STATE_DECL_COMMA );
244float32_t f64_to_f32( float64_t SOFTFLOAT_STATE_DECL_COMMA );
245#ifdef SOFTFLOAT_FAST_INT64
246extFloat80_t f64_to_extF80( float64_t SOFTFLOAT_STATE_DECL_COMMA );
247float128_t f64_to_f128( float64_t SOFTFLOAT_STATE_DECL_COMMA );
248#endif
249void f64_to_extF80M( float64_t, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
250void f64_to_f128M( float64_t, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
251float64_t f64_roundToInt( float64_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
252float64_t f64_add( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
253float64_t f64_sub( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
254float64_t f64_mul( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
255float64_t f64_mulAdd( float64_t, float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
256float64_t f64_div( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
257float64_t f64_rem( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
258float64_t f64_sqrt( float64_t SOFTFLOAT_STATE_DECL_COMMA );
259bool f64_eq( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
260bool f64_le( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
261bool f64_lt( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
262bool f64_eq_signaling( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
263bool f64_le_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
264bool f64_lt_quiet( float64_t, float64_t SOFTFLOAT_STATE_DECL_COMMA );
265bool 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
272extern 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
281uint_fast32_t extF80_to_ui32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
282uint_fast64_t extF80_to_ui64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
283int_fast32_t extF80_to_i32( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
284int_fast64_t extF80_to_i64( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
285uint_fast32_t extF80_to_ui32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
286uint_fast64_t extF80_to_ui64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
287int_fast32_t extF80_to_i32_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
288int_fast64_t extF80_to_i64_r_minMag( extFloat80_t, bool SOFTFLOAT_STATE_DECL_COMMA );
289float16_t extF80_to_f16( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
290float32_t extF80_to_f32( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
291float64_t extF80_to_f64( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
292float128_t extF80_to_f128( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
293extFloat80_t extF80_roundToInt( extFloat80_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
294extFloat80_t extF80_add( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
295extFloat80_t extF80_sub( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
296extFloat80_t extF80_mul( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
297extFloat80_t extF80_div( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
298extFloat80_t extF80_rem( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
299extFloat80_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 */
301extFloat80_t extF80_sqrt( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
302extFloat80_t extF80_sin( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
303extFloat80_t extF80_cos( extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
304void extF80_sincos( extFloat80_t, extFloat80_t*, extFloat80_t* SOFTFLOAT_STATE_DECL_COMMA );
305extFloat80_t extF80_scale_extF80( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
306bool extF80_eq( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
307bool extF80_le( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
308bool extF80_lt( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
309bool extF80_eq_signaling( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
310bool extF80_le_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
311bool extF80_lt_quiet( extFloat80_t, extFloat80_t SOFTFLOAT_STATE_DECL_COMMA );
312bool extF80_isSignalingNaN( extFloat80_t );
313#endif
314uint_fast32_t extF80M_to_ui32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
315uint_fast64_t extF80M_to_ui64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
316int_fast32_t extF80M_to_i32( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
317int_fast64_t extF80M_to_i64( const extFloat80_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
318uint_fast32_t extF80M_to_ui32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
319uint_fast64_t extF80M_to_ui64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
320int_fast32_t extF80M_to_i32_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
321int_fast64_t extF80M_to_i64_r_minMag( const extFloat80_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
322float16_t extF80M_to_f16( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
323float32_t extF80M_to_f32( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
324float64_t extF80M_to_f64( const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
325void extF80M_to_f128M( const extFloat80_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
326void
327 extF80M_roundToInt(
328 const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
329void extF80M_add( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
330void extF80M_sub( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
331void extF80M_mul( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
332void extF80M_div( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
333void extF80M_rem( const extFloat80_t *, const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
334void extF80M_sqrt( const extFloat80_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
335bool extF80M_eq( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
336bool extF80M_le( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
337bool extF80M_lt( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
338bool extF80M_eq_signaling( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
339bool extF80M_le_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
340bool extF80M_lt_quiet( const extFloat80_t *, const extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
341bool extF80M_isSignalingNaN( const extFloat80_t * );
342
343/*----------------------------------------------------------------------------
344| 128-bit (quadruple-precision) floating-point operations.
345*----------------------------------------------------------------------------*/
346#ifdef SOFTFLOAT_FAST_INT64
347uint_fast32_t f128_to_ui32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
348uint_fast64_t f128_to_ui64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
349int_fast32_t f128_to_i32( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
350int_fast64_t f128_to_i64( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
351uint_fast32_t f128_to_ui32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
352uint_fast64_t f128_to_ui64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
353int_fast32_t f128_to_i32_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
354int_fast64_t f128_to_i64_r_minMag( float128_t, bool SOFTFLOAT_STATE_DECL_COMMA );
355float16_t f128_to_f16( float128_t SOFTFLOAT_STATE_DECL_COMMA );
356float32_t f128_to_f32( float128_t SOFTFLOAT_STATE_DECL_COMMA );
357float64_t f128_to_f64( float128_t SOFTFLOAT_STATE_DECL_COMMA );
358extFloat80_t f128_to_extF80( float128_t SOFTFLOAT_STATE_DECL_COMMA );
359float128_t f128_roundToInt( float128_t, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
360float128_t f128_add( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
361float128_t f128_sub( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
362float128_t f128_mul( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
363float128_t f128_mulAdd( float128_t, float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
364float128_t f128_div( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
365float128_t f128_rem( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
366float128_t f128_sqrt( float128_t SOFTFLOAT_STATE_DECL_COMMA );
367bool f128_eq( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
368bool f128_le( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
369bool f128_lt( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
370bool f128_eq_signaling( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
371bool f128_le_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
372bool f128_lt_quiet( float128_t, float128_t SOFTFLOAT_STATE_DECL_COMMA );
373bool f128_isSignalingNaN( float128_t );
374#endif
375uint_fast32_t f128M_to_ui32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
376uint_fast64_t f128M_to_ui64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
377int_fast32_t f128M_to_i32( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
378int_fast64_t f128M_to_i64( const float128_t *, uint_fast8_t, bool SOFTFLOAT_STATE_DECL_COMMA );
379uint_fast32_t f128M_to_ui32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
380uint_fast64_t f128M_to_ui64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
381int_fast32_t f128M_to_i32_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
382int_fast64_t f128M_to_i64_r_minMag( const float128_t *, bool SOFTFLOAT_STATE_DECL_COMMA );
383float16_t f128M_to_f16( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
384float32_t f128M_to_f32( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
385float64_t f128M_to_f64( const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
386void f128M_to_extF80M( const float128_t *, extFloat80_t * SOFTFLOAT_STATE_DECL_COMMA );
387void f128M_roundToInt( const float128_t *, uint_fast8_t, bool, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
388void f128M_add( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
389void f128M_sub( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
390void f128M_mul( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
391void
392 f128M_mulAdd(
393 const float128_t *, const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA
394 );
395void f128M_div( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
396void f128M_rem( const float128_t *, const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
397void f128M_sqrt( const float128_t *, float128_t * SOFTFLOAT_STATE_DECL_COMMA );
398bool f128M_eq( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
399bool f128M_le( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
400bool f128M_lt( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
401bool f128M_eq_signaling( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
402bool f128M_le_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
403bool f128M_lt_quiet( const float128_t *, const float128_t * SOFTFLOAT_STATE_DECL_COMMA );
404bool f128M_isSignalingNaN( const float128_t * );
405
406RT_C_DECLS_END
407
408#endif
409
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette