PandA-2024.02
softfloat.c
Go to the documentation of this file.
1 /*
2 +--------------------------------------------------------------------------+
3 | CHStone : a suite of benchmark programs for C-based High-Level Synthesis |
4 | ======================================================================== |
5 | |
6 | * Collected and Modified : Y. Hara, H. Tomiyama, S. Honda, |
7 | H. Takada and K. Ishii |
8 | Nagoya University, Japan |
9 | |
10 | * Remark : |
11 | 1. This source code is modified to unify the formats of the benchmark |
12 | programs in CHStone. |
13 | 2. Test vectors are added for CHStone. |
14 | 3. If "main_result" is 0 at the end of the program, the program is |
15 | correctly executed. |
16 | 4. Please follow the copyright of each benchmark program. |
17 +--------------------------------------------------------------------------+
18 */
19 /*============================================================================
20 
21 This C source file is part of the SoftFloat IEC/IEEE Floating-point Arithmetic
22 Package, Release 2b.
23 
24 Written by John R. Hauser. This work was made possible in part by the
25 International Computer Science Institute, located at Suite 600, 1947 Center
26 Street, Berkeley, California 94704. Funding was partially provided by the
27 National Science Foundation under grant MIP-9311980. The original version
28 of this code was written as part of a project to build a fixed-point vector
29 processor in collaboration with the University of California at Berkeley,
30 overseen by Profs. Nelson Morgan and John Wawrzynek. More information
31 is available through the Web page `http://www.cs.berkeley.edu/~jhauser/
32 arithmetic/SoftFloat.html'.
33 
34 THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE. Although reasonable effort has
35 been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT TIMES
36 RESULT IN INCORRECT BEHAVIOR. USE OF THIS SOFTWARE IS RESTRICTED TO PERSONS
37 AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ALL LOSSES,
38 COSTS, OR OTHER PROBLEMS THEY INCUR DUE TO THE SOFTWARE, AND WHO FURTHERMORE
39 EFFECTIVELY INDEMNIFY JOHN HAUSER AND THE INTERNATIONAL COMPUTER SCIENCE
40 INSTITUTE (possibly via similar legal warning) AGAINST ALL LOSSES, COSTS, OR
41 OTHER PROBLEMS INCURRED BY THEIR CUSTOMERS AND CLIENTS DUE TO THE SOFTWARE.
42 
43 Derivative works are acceptable, even for commercial purposes, so long as
44 (1) the source code for the derivative work includes prominent notice that
45 the work is derivative, and (2) the source code includes prominent notice with
46 these four paragraphs for those parts of this code that are retained.
47 
48 =============================================================================*/
49 
50 #include "milieu.h"
51 #include "softfloat.h"
52 
53 /*----------------------------------------------------------------------------
54 | Floating-point rounding mode, extended double-precision rounding precision,
55 | and exception flags.
56 *----------------------------------------------------------------------------*/
59 
60 /*----------------------------------------------------------------------------
61 | Primitive arithmetic functions, including multi-word arithmetic, and
62 | division and square root approximations. (Can be specialized to target if
63 | desired.)
64 *----------------------------------------------------------------------------*/
65 #include "softfloat-macros"
66 
67 /*----------------------------------------------------------------------------
68 | Functions and definitions to determine: (1) whether tininess for underflow
69 | is detected before or after rounding by default, (2) what (if anything)
70 | happens when exceptions are raised, (3) how signaling NaNs are distinguished
71 | from quiet NaNs, (4) the default generated quiet NaNs, and (5) how NaNs
72 | are propagated from function inputs to output. These details are target-
73 | specific.
74 *----------------------------------------------------------------------------*/
75 #include "softfloat-specialize"
76 
77 /*----------------------------------------------------------------------------
78 | Returns the fraction bits of the double-precision floating-point value `a'.
79 *----------------------------------------------------------------------------*/
80 
83 {
84 
85  return a & LIT64 (0x000FFFFFFFFFFFFF);
86 
87 }
88 
89 /*----------------------------------------------------------------------------
90 | Returns the exponent bits of the double-precision floating-point value `a'.
91 *----------------------------------------------------------------------------*/
92 
95 {
96 
97  return (a >> 52) & 0x7FF;
98 
99 }
100 
101 /*----------------------------------------------------------------------------
102 | Returns the sign bit of the double-precision floating-point value `a'.
103 *----------------------------------------------------------------------------*/
104 
105 INLINE flag
107 {
108 
109  return a >> 63;
110 
111 }
112 
113 /*----------------------------------------------------------------------------
114 | Normalizes the subnormal double-precision floating-point value represented
115 | by the denormalized significand `aSig'. The normalized exponent and
116 | significand are stored at the locations pointed to by `zExpPtr' and
117 | `zSigPtr', respectively.
118 *----------------------------------------------------------------------------*/
119 
120 static void
121 normalizeFloat64Subnormal (bits64 aSig, int16 * zExpPtr, bits64 * zSigPtr)
122 {
123  int8 shiftCount;
124 
125  shiftCount = countLeadingZeros64 (aSig) - 11;
126  *zSigPtr = aSig << shiftCount;
127  *zExpPtr = 1 - shiftCount;
128 
129 }
130 
131 /*----------------------------------------------------------------------------
132 | Packs the sign `zSign', exponent `zExp', and significand `zSig' into a
133 | double-precision floating-point value, returning the result. After being
134 | shifted into the proper positions, the three fields are simply added
135 | together to form the result. This means that any integer portion of `zSig'
136 | will be added into the exponent. Since a properly normalized significand
137 | will have an integer portion equal to 1, the `zExp' input should be 1 less
138 | than the desired result exponent whenever `zSig' is a complete, normalized
139 | significand.
140 *----------------------------------------------------------------------------*/
141 
143 packFloat64 (flag zSign, int16 zExp, bits64 zSig)
144 {
145 
146  return (((bits64) zSign) << 63) + (((bits64) zExp) << 52) + zSig;
147 
148 }
149 
150 /*----------------------------------------------------------------------------
151 | Takes an abstract floating-point value having sign `zSign', exponent `zExp',
152 | and significand `zSig', and returns the proper double-precision floating-
153 | point value corresponding to the abstract input. Ordinarily, the abstract
154 | value is simply rounded and packed into the double-precision format, with
155 | the inexact exception raised if the abstract input cannot be represented
156 | exactly. However, if the abstract value is too large, the overflow and
157 | inexact exceptions are raised and an infinity or maximal finite value is
158 | returned. If the abstract value is too small, the input value is rounded
159 | to a subnormal number, and the underflow and inexact exceptions are raised
160 | if the abstract input cannot be represented exactly as a subnormal double-
161 | precision floating-point number.
162 | The input significand `zSig' has its binary point between bits 62
163 | and 61, which is 10 bits to the left of the usual location. This shifted
164 | significand must be normalized or smaller. If `zSig' is not normalized,
165 | `zExp' must be 0; in that case, the result returned is a subnormal number,
166 | and it must not require rounding. In the usual case that `zSig' is
167 | normalized, `zExp' must be 1 less than the ``true'' floating-point exponent.
168 | The handling of underflow and overflow follows the IEC/IEEE Standard for
169 | Binary Floating-Point Arithmetic.
170 *----------------------------------------------------------------------------*/
171 
172 static float64
174 {
175  int8 roundingMode;
176  flag roundNearestEven, isTiny;
177  int16 roundIncrement, roundBits;
178 
179  roundingMode = float_rounding_mode;
180  roundNearestEven = (roundingMode == float_round_nearest_even);
181  roundIncrement = 0x200;
182  if (!roundNearestEven)
183  {
184  if (roundingMode == float_round_to_zero)
185  {
186  roundIncrement = 0;
187  }
188  else
189  {
190  roundIncrement = 0x3FF;
191  if (zSign)
192  {
193  if (roundingMode == float_round_up)
194  roundIncrement = 0;
195  }
196  else
197  {
198  if (roundingMode == float_round_down)
199  roundIncrement = 0;
200  }
201  }
202  }
203  roundBits = zSig & 0x3FF;
204  if (0x7FD <= (bits16) zExp)
205  {
206  if ((0x7FD < zExp)
207  || ((zExp == 0x7FD) && ((sbits64) (zSig + roundIncrement) < 0)))
208  {
209  float_raise (float_flag_overflow | float_flag_inexact);
210  return packFloat64 (zSign, 0x7FF, 0) - (roundIncrement == 0);
211  }
212  if (zExp < 0)
213  {
214  isTiny = (float_detect_tininess == float_tininess_before_rounding)
215  || (zExp < -1)
216  || (zSig + roundIncrement < LIT64 (0x8000000000000000));
217  shift64RightJamming (zSig, -zExp, &zSig);
218  zExp = 0;
219  roundBits = zSig & 0x3FF;
220  if (isTiny && roundBits)
221  float_raise (float_flag_underflow);
222  }
223  }
224  if (roundBits)
226  zSig = (zSig + roundIncrement) >> 10;
227  zSig &= ~(((roundBits ^ 0x200) == 0) & roundNearestEven);
228  if (zSig == 0)
229  zExp = 0;
230  return packFloat64 (zSign, zExp, zSig);
231 
232 }
233 
234 /*----------------------------------------------------------------------------
235 | Takes an abstract floating-point value having sign `zSign', exponent `zExp',
236 | and significand `zSig', and returns the proper double-precision floating-
237 | point value corresponding to the abstract input. This routine is just like
238 | `roundAndPackFloat64' except that `zSig' does not have to be normalized.
239 | Bit 63 of `zSig' must be zero, and `zExp' must be 1 less than the ``true''
240 | floating-point exponent.
241 *----------------------------------------------------------------------------*/
242 
243 static float64
245 {
246  int8 shiftCount;
247 
248  shiftCount = countLeadingZeros64 (zSig) - 1;
249  return roundAndPackFloat64 (zSign, zExp - shiftCount, zSig << shiftCount);
250 
251 }
252 
253 /*----------------------------------------------------------------------------
254 | Returns the result of converting the 32-bit two's complement integer `a'
255 | to the double-precision floating-point format. The conversion is performed
256 | according to the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
257 *----------------------------------------------------------------------------*/
258 
259 float64
261 {
262  flag zSign;
263  uint32 absA;
264  int8 shiftCount;
265  bits64 zSig;
266 
267  if (a == 0)
268  return 0;
269  zSign = (a < 0);
270  absA = zSign ? -a : a;
271  shiftCount = countLeadingZeros32 (absA) + 21;
272  zSig = absA;
273  return packFloat64 (zSign, 0x432 - shiftCount, zSig << shiftCount);
274 
275 }
276 
277 /*----------------------------------------------------------------------------
278 | Returns the result of adding the absolute values of the double-precision
279 | floating-point values `a' and `b'. If `zSign' is 1, the sum is negated
280 | before being returned. `zSign' is ignored if the result is a NaN.
281 | The addition is performed according to the IEC/IEEE Standard for Binary
282 | Floating-Point Arithmetic.
283 *----------------------------------------------------------------------------*/
284 
285 static float64
287 {
288  int16 aExp, bExp, zExp;
289  bits64 aSig, bSig, zSig;
290  int16 expDiff;
291 
292  aSig = extractFloat64Frac (a);
293  aExp = extractFloat64Exp (a);
294  bSig = extractFloat64Frac (b);
295  bExp = extractFloat64Exp (b);
296  expDiff = aExp - bExp;
297  aSig <<= 9;
298  bSig <<= 9;
299  if (0 < expDiff)
300  {
301  if (aExp == 0x7FF)
302  {
303  if (aSig)
304  return propagateFloat64NaN (a, b);
305  return a;
306  }
307  if (bExp == 0)
308  --expDiff;
309  else
310  bSig |= LIT64 (0x2000000000000000);
311  shift64RightJamming (bSig, expDiff, &bSig);
312  zExp = aExp;
313  }
314  else if (expDiff < 0)
315  {
316  if (bExp == 0x7FF)
317  {
318  if (bSig)
319  return propagateFloat64NaN (a, b);
320  return packFloat64 (zSign, 0x7FF, 0);
321  }
322  if (aExp == 0)
323  ++expDiff;
324  else
325  {
326  aSig |= LIT64 (0x2000000000000000);
327  }
328  shift64RightJamming (aSig, -expDiff, &aSig);
329  zExp = bExp;
330  }
331  else
332  {
333  if (aExp == 0x7FF)
334  {
335  if (aSig | bSig)
336  return propagateFloat64NaN (a, b);
337  return a;
338  }
339  if (aExp == 0)
340  return packFloat64 (zSign, 0, (aSig + bSig) >> 9);
341  zSig = LIT64 (0x4000000000000000) + aSig + bSig;
342  zExp = aExp;
343  goto roundAndPack;
344  }
345  aSig |= LIT64 (0x2000000000000000);
346  zSig = (aSig + bSig) << 1;
347  --zExp;
348  if ((sbits64) zSig < 0)
349  {
350  zSig = aSig + bSig;
351  ++zExp;
352  }
353 roundAndPack:
354  return roundAndPackFloat64 (zSign, zExp, zSig);
355 
356 }
357 
358 /*----------------------------------------------------------------------------
359 | Returns the result of subtracting the absolute values of the double-
360 | precision floating-point values `a' and `b'. If `zSign' is 1, the
361 | difference is negated before being returned. `zSign' is ignored if the
362 | result is a NaN. The subtraction is performed according to the IEC/IEEE
363 | Standard for Binary Floating-Point Arithmetic.
364 *----------------------------------------------------------------------------*/
365 
366 static float64
368 {
369  int16 aExp, bExp, zExp;
370  bits64 aSig, bSig, zSig;
371  int16 expDiff;
372 
373  aSig = extractFloat64Frac (a);
374  aExp = extractFloat64Exp (a);
375  bSig = extractFloat64Frac (b);
376  bExp = extractFloat64Exp (b);
377  expDiff = aExp - bExp;
378  aSig <<= 10;
379  bSig <<= 10;
380  if (0 < expDiff)
381  goto aExpBigger;
382  if (expDiff < 0)
383  goto bExpBigger;
384  if (aExp == 0x7FF)
385  {
386  if (aSig | bSig)
387  return propagateFloat64NaN (a, b);
388  float_raise (float_flag_invalid);
389  return float64_default_nan;
390  }
391  if (aExp == 0)
392  {
393  aExp = 1;
394  bExp = 1;
395  }
396  if (bSig < aSig)
397  goto aBigger;
398  if (aSig < bSig)
399  goto bBigger;
401 bExpBigger:
402  if (bExp == 0x7FF)
403  {
404  if (bSig)
405  return propagateFloat64NaN (a, b);
406  return packFloat64 (zSign ^ 1, 0x7FF, 0);
407  }
408  if (aExp == 0)
409  ++expDiff;
410  else
411  aSig |= LIT64 (0x4000000000000000);
412  shift64RightJamming (aSig, -expDiff, &aSig);
413  bSig |= LIT64 (0x4000000000000000);
414 bBigger:
415  zSig = bSig - aSig;
416  zExp = bExp;
417  zSign ^= 1;
418  goto normalizeRoundAndPack;
419 aExpBigger:
420  if (aExp == 0x7FF)
421  {
422  if (aSig)
423  return propagateFloat64NaN (a, b);
424  return a;
425  }
426  if (bExp == 0)
427  --expDiff;
428  else
429  bSig |= LIT64 (0x4000000000000000);
430  shift64RightJamming (bSig, expDiff, &bSig);
431  aSig |= LIT64 (0x4000000000000000);
432 aBigger:
433  zSig = aSig - bSig;
434  zExp = aExp;
435 normalizeRoundAndPack:
436  --zExp;
437  return normalizeRoundAndPackFloat64 (zSign, zExp, zSig);
438 
439 }
440 
441 /*----------------------------------------------------------------------------
442 | Returns the result of adding the double-precision floating-point values `a'
443 | and `b'. The operation is performed according to the IEC/IEEE Standard for
444 | Binary Floating-Point Arithmetic.
445 *----------------------------------------------------------------------------*/
446 
447 float64
449 {
450  flag aSign, bSign;
451 
452  aSign = extractFloat64Sign (a);
453  bSign = extractFloat64Sign (b);
454  if (aSign == bSign)
455  return addFloat64Sigs (a, b, aSign);
456  else
457  return subFloat64Sigs (a, b, aSign);
458 
459 }
460 
461 /*----------------------------------------------------------------------------
462 | Returns the result of multiplying the double-precision floating-point values
463 | `a' and `b'. The operation is performed according to the IEC/IEEE Standard
464 | for Binary Floating-Point Arithmetic.
465 *----------------------------------------------------------------------------*/
466 
467 float64
469 {
470  flag aSign, bSign, zSign;
471  int16 aExp, bExp, zExp;
472  bits64 aSig, bSig, zSig0, zSig1;
473 
474  aSig = extractFloat64Frac (a);
475  aExp = extractFloat64Exp (a);
476  aSign = extractFloat64Sign (a);
477  bSig = extractFloat64Frac (b);
478  bExp = extractFloat64Exp (b);
479  bSign = extractFloat64Sign (b);
480  zSign = aSign ^ bSign;
481  if (aExp == 0x7FF)
482  {
483  if (aSig || ((bExp == 0x7FF) && bSig))
484  return propagateFloat64NaN (a, b);
485  if ((bExp | bSig) == 0)
486  {
487  float_raise (float_flag_invalid);
488  return float64_default_nan;
489  }
490  return packFloat64 (zSign, 0x7FF, 0);
491  }
492  if (bExp == 0x7FF)
493  {
494  if (bSig)
495  return propagateFloat64NaN (a, b);
496  if ((aExp | aSig) == 0)
497  {
498  float_raise (float_flag_invalid);
499  return float64_default_nan;
500  }
501  return packFloat64 (zSign, 0x7FF, 0);
502  }
503  if (aExp == 0)
504  {
505  if (aSig == 0)
506  return packFloat64 (zSign, 0, 0);
507  normalizeFloat64Subnormal (aSig, &aExp, &aSig);
508  }
509  if (bExp == 0)
510  {
511  if (bSig == 0)
512  return packFloat64 (zSign, 0, 0);
513  normalizeFloat64Subnormal (bSig, &bExp, &bSig);
514  }
515  zExp = aExp + bExp - 0x3FF;
516  aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
517  bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
518  mul64To128 (aSig, bSig, &zSig0, &zSig1);
519  zSig0 |= (zSig1 != 0);
520  if (0 <= (sbits64) (zSig0 << 1))
521  {
522  zSig0 <<= 1;
523  --zExp;
524  }
525  return roundAndPackFloat64 (zSign, zExp, zSig0);
526 
527 }
528 
529 /*----------------------------------------------------------------------------
530 | Returns the result of dividing the double-precision floating-point value `a'
531 | by the corresponding value `b'. The operation is performed according to
532 | the IEC/IEEE Standard for Binary Floating-Point Arithmetic.
533 *----------------------------------------------------------------------------*/
534 
535 float64
537 {
538  flag aSign, bSign, zSign;
539  int16 aExp, bExp, zExp;
540  bits64 aSig, bSig, zSig;
541  bits64 rem0, rem1, term0, term1;
542 
543  aSig = extractFloat64Frac (a);
544  aExp = extractFloat64Exp (a);
545  aSign = extractFloat64Sign (a);
546  bSig = extractFloat64Frac (b);
547  bExp = extractFloat64Exp (b);
548  bSign = extractFloat64Sign (b);
549  zSign = aSign ^ bSign;
550  if (aExp == 0x7FF)
551  {
552  if (aSig)
553  return propagateFloat64NaN (a, b);
554  if (bExp == 0x7FF)
555  {
556  if (bSig)
557  return propagateFloat64NaN (a, b);
558  float_raise (float_flag_invalid);
559  return float64_default_nan;
560  }
561  return packFloat64 (zSign, 0x7FF, 0);
562  }
563  if (bExp == 0x7FF)
564  {
565  if (bSig)
566  return propagateFloat64NaN (a, b);
567  return packFloat64 (zSign, 0, 0);
568  }
569  if (bExp == 0)
570  {
571  if (bSig == 0)
572  {
573  if ((aExp | aSig) == 0)
574  {
575  float_raise (float_flag_invalid);
576  return float64_default_nan;
577  }
578  float_raise (float_flag_divbyzero);
579  return packFloat64 (zSign, 0x7FF, 0);
580  }
581  normalizeFloat64Subnormal (bSig, &bExp, &bSig);
582  }
583  if (aExp == 0)
584  {
585  if (aSig == 0)
586  return packFloat64 (zSign, 0, 0);
587  normalizeFloat64Subnormal (aSig, &aExp, &aSig);
588  }
589  zExp = aExp - bExp + 0x3FD;
590  aSig = (aSig | LIT64 (0x0010000000000000)) << 10;
591  bSig = (bSig | LIT64 (0x0010000000000000)) << 11;
592  if (bSig <= (aSig + aSig))
593  {
594  aSig >>= 1;
595  ++zExp;
596  }
597  zSig = estimateDiv128To64 (aSig, 0, bSig);
598  if ((zSig & 0x1FF) <= 2)
599  {
600  mul64To128 (bSig, zSig, &term0, &term1);
601  sub128 (aSig, 0, term0, term1, &rem0, &rem1);
602  while ((sbits64) rem0 < 0)
603  {
604  --zSig;
605  add128 (rem0, rem1, 0, bSig, &rem0, &rem1);
606  }
607  zSig |= (rem1 != 0);
608  }
609  return roundAndPackFloat64 (zSign, zExp, zSig);
610 
611 }
612 
613 /*----------------------------------------------------------------------------
614 | Returns 1 if the double-precision floating-point value `a' is less than or
615 | equal to the corresponding value `b', and 0 otherwise. The comparison is
616 | performed according to the IEC/IEEE Standard for Binary Floating-Point
617 | Arithmetic.
618 *----------------------------------------------------------------------------*/
619 
620 flag
622 {
623  flag aSign, bSign;
624 
625  if (((extractFloat64Exp (a) == 0x7FF) && extractFloat64Frac (a))
626  || ((extractFloat64Exp (b) == 0x7FF) && extractFloat64Frac (b)))
627  {
628  float_raise (float_flag_invalid);
629  return 0;
630  }
631  aSign = extractFloat64Sign (a);
632  bSign = extractFloat64Sign (b);
633  if (aSign != bSign)
634  return aSign || ((bits64) ((a | b) << 1) == 0);
635  return (a == b) || (aSign ^ (a < b));
636 
637 }
638 
639 flag
641 {
642  return float64_le (b, a);
643 }
644 
645 // added by hiroyuki@acm.org
646 float64
648 {
649  return (((~x) & 0x8000000000000000ULL) | (x & 0x7fffffffffffffffULL));
650 }
float64 float64_div(float64 a, float64 b)
Definition: softfloat.c:241
INLINE int16 extractFloat64Exp(float64 a)
Definition: softfloat.c:94
int int16
Definition: SPARC-GCC.h:60
int flag
Definition: SPARC-GCC.h:58
static float64 roundAndPackFloat64(flag zSign, int16 zExp, bits64 zSig)
Definition: softfloat.c:173
flag float64_ge(float64 a, float64 b)
Definition: softfloat.c:640
INLINE flag extractFloat64Sign(float64 a)
Definition: softfloat.c:106
#define LIT64(a)
Definition: SPARC-GCC.h:81
#define float_flag_divbyzero
Definition: softfloat.h:74
float64 int32_to_float64(int32 a)
Definition: softfloat.c:260
unsigned int uint32
Definition: SPARC-GCC.h:61
unsigned short int bits16
Definition: SPARC-GCC.h:68
INLINE float64 packFloat64(flag zSign, int16 zExp, bits64 zSig)
Definition: softfloat.c:143
#define float_round_up
Definition: softfloat.h:67
static void normalizeFloat64Subnormal(bits64 aSig, int16 *zExpPtr, bits64 *zSigPtr)
Definition: softfloat.c:121
float64 float64_mul(float64 a, float64 b)
Definition: softfloat.c:241
#define float_flag_invalid
Definition: softfloat.h:77
flag float64_le(float64 a, float64 b)
Definition: softfloat.c:621
float64 float64_add(float64 a, float64 b)
Definition: softfloat.c:406
static float64 normalizeRoundAndPackFloat64(flag zSign, int16 zExp, bits64 zSig)
Definition: softfloat.c:244
#define float_flag_overflow
Definition: softfloat.h:76
static float64 subFloat64Sigs(float64 a, float64 b, flag zSign)
Definition: softfloat.c:367
static float64 addFloat64Sigs(float64 a, float64 b, flag zSign)
Definition: softfloat.c:286
#define float_flag_underflow
Definition: softfloat.h:75
#define float_tininess_before_rounding
Definition: softfloat.h:60
signed int int32
Definition: SPARC-GCC.h:62
#define float_round_down
Definition: softfloat.h:68
unsigned long long float64
Definition: softfloat.h:54
int8 float_rounding_mode
Definition: softfloat.c:57
int int8
Definition: SPARC-GCC.h:59
float64 float64_neg(float64 x)
Definition: softfloat.c:647
int8 float_exception_flags
Definition: softfloat.c:58
#define float_round_nearest_even
Definition: softfloat.h:65
x
Return the smallest n such that 2^n >= _x.
signed long long int sbits64
Definition: SPARC-GCC.h:71
#define float_flag_inexact
Definition: softfloat.h:73
#define float_round_to_zero
Definition: softfloat.h:66
INLINE bits64 extractFloat64Frac(float64 a)
Definition: softfloat.c:82
unsigned long long int bits64
Definition: SPARC-GCC.h:70

Generated on Mon Feb 12 2024 13:02:48 for PandA-2024.02 by doxygen 1.8.13