VirtualBox

source: vbox/trunk/src/libs/softfloat-3e/testfloat/source/genLoops.h@ 107044

Last change on this file since 107044 was 94551, checked in by vboxsync, 3 years ago

libs/softfloat: Copied TestFloat-3e from vendor branch and to testfloat subdir. bugref:9898

  • Property svn:eol-style set to native
File size: 11.1 KB
Line 
1
2/*============================================================================
3
4This C header file is part of TestFloat, Release 3e, a package of programs for
5testing the correctness of floating-point arithmetic complying with the IEEE
6Standard for Floating-Point, by John R. Hauser.
7
8Copyright 2011, 2012, 2013, 2014, 2015, 2017 The Regents of the University of
9California. All rights reserved.
10
11Redistribution and use in source and binary forms, with or without
12modification, are permitted provided that the following conditions are met:
13
14 1. Redistributions of source code must retain the above copyright notice,
15 this list of conditions, and the following disclaimer.
16
17 2. Redistributions in binary form must reproduce the above copyright notice,
18 this list of conditions, and the following disclaimer in the documentation
19 and/or other materials provided with the distribution.
20
21 3. Neither the name of the University nor the names of its contributors may
22 be used to endorse or promote products derived from this software without
23 specific prior written permission.
24
25THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS", AND ANY
26EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
27WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ARE
28DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY
29DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
30(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
31LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
32ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
33(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
34SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
36=============================================================================*/
37
38#include <stdbool.h>
39#include <stdint.h>
40#include <signal.h>
41#include "softfloat.h"
42
43extern volatile sig_atomic_t genLoops_stop;
44
45extern bool genLoops_forever;
46extern bool genLoops_givenCount;
47extern uint_fast64_t genLoops_count;
48extern uint_fast8_t *genLoops_trueFlagsPtr;
49
50void gen_a_ui32( void );
51void gen_a_ui64( void );
52void gen_a_i32( void );
53void gen_a_i64( void );
54#ifdef FLOAT16
55void gen_a_f16( void );
56void gen_ab_f16( void );
57void gen_abc_f16( void );
58#endif
59void gen_a_f32( void );
60void gen_ab_f32( void );
61void gen_abc_f32( void );
62#ifdef FLOAT64
63void gen_a_f64( void );
64void gen_ab_f64( void );
65void gen_abc_f64( void );
66#endif
67#ifdef EXTFLOAT80
68void gen_a_extF80( void );
69void gen_ab_extF80( void );
70void gen_abc_extF80( void );
71#endif
72#ifdef FLOAT128
73void gen_a_f128( void );
74void gen_ab_f128( void );
75void gen_abc_f128( void );
76#endif
77
78#ifdef FLOAT16
79void gen_a_ui32_z_f16( float16_t ( uint32_t ) );
80#endif
81void gen_a_ui32_z_f32( float32_t ( uint32_t ) );
82#ifdef FLOAT64
83void gen_a_ui32_z_f64( float64_t ( uint32_t ) );
84#endif
85#ifdef EXTFLOAT80
86void gen_a_ui32_z_extF80( void ( uint32_t, extFloat80_t * ) );
87#endif
88#ifdef FLOAT128
89void gen_a_ui32_z_f128( void ( uint32_t, float128_t * ) );
90#endif
91#ifdef FLOAT16
92void gen_a_ui64_z_f16( float16_t ( uint64_t ) );
93#endif
94void gen_a_ui64_z_f32( float32_t ( uint64_t ) );
95#ifdef FLOAT64
96void gen_a_ui64_z_f64( float64_t ( uint64_t ) );
97#endif
98#ifdef EXTFLOAT80
99void gen_a_ui64_z_extF80( void ( uint64_t, extFloat80_t * ) );
100#endif
101#ifdef FLOAT128
102void gen_a_ui64_z_f128( void ( uint64_t, float128_t * ) );
103#endif
104#ifdef FLOAT16
105void gen_a_i32_z_f16( float16_t ( int32_t ) );
106#endif
107void gen_a_i32_z_f32( float32_t ( int32_t ) );
108#ifdef FLOAT64
109void gen_a_i32_z_f64( float64_t ( int32_t ) );
110#endif
111#ifdef EXTFLOAT80
112void gen_a_i32_z_extF80( void ( int32_t, extFloat80_t * ) );
113#endif
114#ifdef FLOAT128
115void gen_a_i32_z_f128( void ( int32_t, float128_t * ) );
116#endif
117#ifdef FLOAT16
118void gen_a_i64_z_f16( float16_t ( int64_t ) );
119#endif
120void gen_a_i64_z_f32( float32_t ( int64_t ) );
121#ifdef FLOAT64
122void gen_a_i64_z_f64( float64_t ( int64_t ) );
123#endif
124#ifdef EXTFLOAT80
125void gen_a_i64_z_extF80( void ( int64_t, extFloat80_t * ) );
126#endif
127#ifdef FLOAT128
128void gen_a_i64_z_f128( void ( int64_t, float128_t * ) );
129#endif
130
131#ifdef FLOAT16
132void
133 gen_a_f16_z_ui32_rx(
134 uint_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
135void
136 gen_a_f16_z_ui64_rx(
137 uint_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
138void
139 gen_a_f16_z_i32_rx(
140 int_fast32_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
141void
142 gen_a_f16_z_i64_rx(
143 int_fast64_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
144void gen_a_f16_z_ui32_x( uint_fast32_t ( float16_t, bool ), bool );
145void gen_a_f16_z_ui64_x( uint_fast64_t ( float16_t, bool ), bool );
146void gen_a_f16_z_i32_x( int_fast32_t ( float16_t, bool ), bool );
147void gen_a_f16_z_i64_x( int_fast64_t ( float16_t, bool ), bool );
148void gen_a_f16_z_f32( float32_t ( float16_t ) );
149#ifdef FLOAT64
150void gen_a_f16_z_f64( float64_t ( float16_t ) );
151#endif
152#ifdef EXTFLOAT80
153void gen_a_f16_z_extF80( void ( float16_t, extFloat80_t * ) );
154#endif
155#ifdef FLOAT128
156void gen_a_f16_z_f128( void ( float16_t, float128_t * ) );
157#endif
158void gen_az_f16( float16_t ( float16_t ) );
159void
160 gen_az_f16_rx(
161 float16_t ( float16_t, uint_fast8_t, bool ), uint_fast8_t, bool );
162void gen_abz_f16( float16_t ( float16_t, float16_t ) );
163void gen_abcz_f16( float16_t ( float16_t, float16_t, float16_t ) );
164void gen_ab_f16_z_bool( bool ( float16_t, float16_t ) );
165#endif
166
167void
168 gen_a_f32_z_ui32_rx(
169 uint_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
170void
171 gen_a_f32_z_ui64_rx(
172 uint_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
173void
174 gen_a_f32_z_i32_rx(
175 int_fast32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
176void
177 gen_a_f32_z_i64_rx(
178 int_fast64_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
179void gen_a_f32_z_ui32_x( uint_fast32_t ( float32_t, bool ), bool );
180void gen_a_f32_z_ui64_x( uint_fast64_t ( float32_t, bool ), bool );
181void gen_a_f32_z_i32_x( int_fast32_t ( float32_t, bool ), bool );
182void gen_a_f32_z_i64_x( int_fast64_t ( float32_t, bool ), bool );
183#ifdef FLOAT16
184void gen_a_f32_z_f16( float16_t ( float32_t ) );
185#endif
186#ifdef FLOAT64
187void gen_a_f32_z_f64( float64_t ( float32_t ) );
188#endif
189#ifdef EXTFLOAT80
190void gen_a_f32_z_extF80( void ( float32_t, extFloat80_t * ) );
191#endif
192#ifdef FLOAT128
193void gen_a_f32_z_f128( void ( float32_t, float128_t * ) );
194#endif
195void gen_az_f32( float32_t ( float32_t ) );
196void
197 gen_az_f32_rx(
198 float32_t ( float32_t, uint_fast8_t, bool ), uint_fast8_t, bool );
199void gen_abz_f32( float32_t ( float32_t, float32_t ) );
200void gen_abcz_f32( float32_t ( float32_t, float32_t, float32_t ) );
201void gen_ab_f32_z_bool( bool ( float32_t, float32_t ) );
202
203#ifdef FLOAT64
204void
205 gen_a_f64_z_ui32_rx(
206 uint_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
207void
208 gen_a_f64_z_ui64_rx(
209 uint_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
210void
211 gen_a_f64_z_i32_rx(
212 int_fast32_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
213void
214 gen_a_f64_z_i64_rx(
215 int_fast64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
216void gen_a_f64_z_ui32_x( uint_fast32_t ( float64_t, bool ), bool );
217void gen_a_f64_z_ui64_x( uint_fast64_t ( float64_t, bool ), bool );
218void gen_a_f64_z_i32_x( int_fast32_t ( float64_t, bool ), bool );
219void gen_a_f64_z_i64_x( int_fast64_t ( float64_t, bool ), bool );
220#ifdef FLOAT16
221void gen_a_f64_z_f16( float16_t ( float64_t ) );
222#endif
223void gen_a_f64_z_f32( float32_t ( float64_t ) );
224#ifdef EXTFLOAT80
225void gen_a_f64_z_extF80( void ( float64_t, extFloat80_t * ) );
226#endif
227#ifdef FLOAT128
228void gen_a_f64_z_f128( void ( float64_t, float128_t * ) );
229#endif
230void gen_az_f64( float64_t ( float64_t ) );
231void
232 gen_az_f64_rx(
233 float64_t ( float64_t, uint_fast8_t, bool ), uint_fast8_t, bool );
234void gen_abz_f64( float64_t ( float64_t, float64_t ) );
235void gen_abcz_f64( float64_t ( float64_t, float64_t, float64_t ) );
236void gen_ab_f64_z_bool( bool ( float64_t, float64_t ) );
237#endif
238
239#ifdef EXTFLOAT80
240void
241 gen_a_extF80_z_ui32_rx(
242 uint_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
243 uint_fast8_t,
244 bool
245 );
246void
247 gen_a_extF80_z_ui64_rx(
248 uint_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
249 uint_fast8_t,
250 bool
251 );
252void
253 gen_a_extF80_z_i32_rx(
254 int_fast32_t ( const extFloat80_t *, uint_fast8_t, bool ),
255 uint_fast8_t,
256 bool
257 );
258void
259 gen_a_extF80_z_i64_rx(
260 int_fast64_t ( const extFloat80_t *, uint_fast8_t, bool ),
261 uint_fast8_t,
262 bool
263 );
264void
265 gen_a_extF80_z_ui32_x( uint_fast32_t ( const extFloat80_t *, bool ), bool );
266void
267 gen_a_extF80_z_ui64_x( uint_fast64_t ( const extFloat80_t *, bool ), bool );
268void gen_a_extF80_z_i32_x( int_fast32_t ( const extFloat80_t *, bool ), bool );
269void gen_a_extF80_z_i64_x( int_fast64_t ( const extFloat80_t *, bool ), bool );
270#ifdef FLOAT16
271void gen_a_extF80_z_f16( float16_t ( const extFloat80_t * ) );
272#endif
273void gen_a_extF80_z_f32( float32_t ( const extFloat80_t * ) );
274#ifdef FLOAT64
275void gen_a_extF80_z_f64( float64_t ( const extFloat80_t * ) );
276#endif
277#ifdef FLOAT128
278void gen_a_extF80_z_f128( void ( const extFloat80_t *, float128_t * ) );
279#endif
280void gen_az_extF80( void ( const extFloat80_t *, extFloat80_t * ) );
281void
282 gen_az_extF80_rx(
283 void ( const extFloat80_t *, uint_fast8_t, bool, extFloat80_t * ),
284 uint_fast8_t,
285 bool
286 );
287void
288 gen_abz_extF80(
289 void ( const extFloat80_t *, const extFloat80_t *, extFloat80_t * ) );
290void
291 gen_ab_extF80_z_bool( bool ( const extFloat80_t *, const extFloat80_t * ) );
292#endif
293
294#ifdef FLOAT128
295void
296 gen_a_f128_z_ui32_rx(
297 uint_fast32_t ( const float128_t *, uint_fast8_t, bool ),
298 uint_fast8_t,
299 bool
300 );
301void
302 gen_a_f128_z_ui64_rx(
303 uint_fast64_t ( const float128_t *, uint_fast8_t, bool ),
304 uint_fast8_t,
305 bool
306 );
307void
308 gen_a_f128_z_i32_rx(
309 int_fast32_t ( const float128_t *, uint_fast8_t, bool ),
310 uint_fast8_t,
311 bool
312 );
313void
314 gen_a_f128_z_i64_rx(
315 int_fast64_t ( const float128_t *, uint_fast8_t, bool ),
316 uint_fast8_t,
317 bool
318 );
319void gen_a_f128_z_ui32_x( uint_fast32_t ( const float128_t *, bool ), bool );
320void gen_a_f128_z_ui64_x( uint_fast64_t ( const float128_t *, bool ), bool );
321void gen_a_f128_z_i32_x( int_fast32_t ( const float128_t *, bool ), bool );
322void gen_a_f128_z_i64_x( int_fast64_t ( const float128_t *, bool ), bool );
323#ifdef FLOAT16
324void gen_a_f128_z_f16( float16_t ( const float128_t * ) );
325#endif
326void gen_a_f128_z_f32( float32_t ( const float128_t * ) );
327#ifdef FLOAT64
328void gen_a_f128_z_f64( float64_t ( const float128_t * ) );
329#endif
330#ifdef EXTFLOAT80
331void gen_a_f128_z_extF80( void ( const float128_t *, extFloat80_t * ) );
332#endif
333void gen_az_f128( void ( const float128_t *, float128_t * ) );
334void
335 gen_az_f128_rx(
336 void ( const float128_t *, uint_fast8_t, bool, float128_t * ),
337 uint_fast8_t,
338 bool
339 );
340void
341 gen_abz_f128( void ( const float128_t *, const float128_t *, float128_t * ) );
342void
343 gen_abcz_f128(
344 void
345 (
346 const float128_t *,
347 const float128_t *,
348 const float128_t *,
349 float128_t *
350 )
351 );
352void gen_ab_f128_z_bool( bool ( const float128_t *, const float128_t * ) );
353#endif
354
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