2 /*============================================================================
4 This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5 Package, Release 3e, by John R. Hauser.
7 Copyright 2011, 2012, 2013, 2014, 2015, 2016, 2017 The Regents of the
8 University of California. All rights reserved.
10 Redistribution and use in source and binary forms, with or without
11 modification, are permitted provided that the following conditions are met:
13 1. Redistributions of source code must retain the above copyright notice,
14 this list of conditions, and the following disclaimer.
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.
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.
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.
35 =============================================================================*/
38 #define primitives_h 1
42 #include "primitiveTypes.h"
44 #ifndef softfloat_shortShiftRightJam64
45 /*----------------------------------------------------------------------------
46 | Shifts 'a' right by the number of bits given in 'dist', which must be in
47 | the range 1 to 63. If any nonzero bits are shifted off, they are "jammed"
48 | into the least-significant bit of the shifted value by setting the least-
49 | significant bit to 1. This shifted-and-jammed value is returned.
50 *----------------------------------------------------------------------------*/
51 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
53 uint64_t softfloat_shortShiftRightJam64( uint64_t a
, uint_fast8_t dist
)
54 { return a
>>dist
| ((a
& (((uint_fast64_t) 1<<dist
) - 1)) != 0); }
56 uint64_t softfloat_shortShiftRightJam64( uint64_t a
, uint_fast8_t dist
);
60 #ifndef softfloat_shiftRightJam32
61 /*----------------------------------------------------------------------------
62 | Shifts 'a' right by the number of bits given in 'dist', which must not
63 | be zero. If any nonzero bits are shifted off, they are "jammed" into the
64 | least-significant bit of the shifted value by setting the least-significant
65 | bit to 1. This shifted-and-jammed value is returned.
66 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
67 | greater than 32, the result will be either 0 or 1, depending on whether 'a'
69 *----------------------------------------------------------------------------*/
70 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
71 INLINE
uint32_t softfloat_shiftRightJam32( uint32_t a
, uint_fast16_t dist
)
74 (dist
< 31) ? a
>>dist
| ((uint32_t) (a
<<(-dist
& 31)) != 0) : (a
!= 0);
77 uint32_t softfloat_shiftRightJam32( uint32_t a
, uint_fast16_t dist
);
81 #ifndef softfloat_shiftRightJam64
82 /*----------------------------------------------------------------------------
83 | Shifts 'a' right by the number of bits given in 'dist', which must not
84 | be zero. If any nonzero bits are shifted off, they are "jammed" into the
85 | least-significant bit of the shifted value by setting the least-significant
86 | bit to 1. This shifted-and-jammed value is returned.
87 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
88 | greater than 64, the result will be either 0 or 1, depending on whether 'a'
90 *----------------------------------------------------------------------------*/
91 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
92 INLINE
uint64_t softfloat_shiftRightJam64( uint64_t a
, uint_fast32_t dist
)
95 (dist
< 63) ? a
>>dist
| ((uint64_t) (a
<<(-dist
& 63)) != 0) : (a
!= 0);
98 uint64_t softfloat_shiftRightJam64( uint64_t a
, uint_fast32_t dist
);
102 /*----------------------------------------------------------------------------
103 | A constant table that translates an 8-bit unsigned integer (the array index)
104 | into the number of leading 0 bits before the most-significant 1 of that
105 | integer. For integer zero (index 0), the corresponding table element is 8.
106 *----------------------------------------------------------------------------*/
107 extern const uint_least8_t softfloat_countLeadingZeros8
[256];
109 #ifndef softfloat_countLeadingZeros16
110 /*----------------------------------------------------------------------------
111 | Returns the number of leading 0 bits before the most-significant 1 bit of
112 | 'a'. If 'a' is zero, 16 is returned.
113 *----------------------------------------------------------------------------*/
114 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
115 INLINE
uint_fast8_t softfloat_countLeadingZeros16( uint16_t a
)
117 uint_fast8_t count
= 8;
122 count
+= softfloat_countLeadingZeros8
[a
];
126 uint_fast8_t softfloat_countLeadingZeros16( uint16_t a
);
130 #ifndef softfloat_countLeadingZeros32
131 /*----------------------------------------------------------------------------
132 | Returns the number of leading 0 bits before the most-significant 1 bit of
133 | 'a'. If 'a' is zero, 32 is returned.
134 *----------------------------------------------------------------------------*/
135 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
136 INLINE
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a
)
138 uint_fast8_t count
= 0;
143 if ( a
< 0x1000000 ) {
147 count
+= softfloat_countLeadingZeros8
[a
>>24];
151 uint_fast8_t softfloat_countLeadingZeros32( uint32_t a
);
155 #ifndef softfloat_countLeadingZeros64
156 /*----------------------------------------------------------------------------
157 | Returns the number of leading 0 bits before the most-significant 1 bit of
158 | 'a'. If 'a' is zero, 64 is returned.
159 *----------------------------------------------------------------------------*/
160 uint_fast8_t softfloat_countLeadingZeros64( uint64_t a
);
163 extern const uint16_t softfloat_approxRecip_1k0s
[16];
164 extern const uint16_t softfloat_approxRecip_1k1s
[16];
166 #ifndef softfloat_approxRecip32_1
167 /*----------------------------------------------------------------------------
168 | Returns an approximation to the reciprocal of the number represented by 'a',
169 | where 'a' is interpreted as an unsigned fixed-point number with one integer
170 | bit and 31 fraction bits. The 'a' input must be "normalized", meaning that
171 | its most-significant bit (bit 31) must be 1. Thus, if A is the value of
172 | the fixed-point interpretation of 'a', then 1 <= A < 2. The returned value
173 | is interpreted as a pure unsigned fraction, having no integer bits and 32
174 | fraction bits. The approximation returned is never greater than the true
175 | reciprocal 1/A, and it differs from the true reciprocal by at most 2.006 ulp
176 | (units in the last place).
177 *----------------------------------------------------------------------------*/
178 #ifdef SOFTFLOAT_FAST_DIV64TO32
179 #define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a)))
181 uint32_t softfloat_approxRecip32_1( uint32_t a
);
185 extern const uint16_t softfloat_approxRecipSqrt_1k0s
[16];
186 extern const uint16_t softfloat_approxRecipSqrt_1k1s
[16];
188 #ifndef softfloat_approxRecipSqrt32_1
189 /*----------------------------------------------------------------------------
190 | Returns an approximation to the reciprocal of the square root of the number
191 | represented by 'a', where 'a' is interpreted as an unsigned fixed-point
192 | number either with one integer bit and 31 fraction bits or with two integer
193 | bits and 30 fraction bits. The format of 'a' is determined by 'oddExpA',
194 | which must be either 0 or 1. If 'oddExpA' is 1, 'a' is interpreted as
195 | having one integer bit, and if 'oddExpA' is 0, 'a' is interpreted as having
196 | two integer bits. The 'a' input must be "normalized", meaning that its
197 | most-significant bit (bit 31) must be 1. Thus, if A is the value of the
198 | fixed-point interpretation of 'a', it follows that 1 <= A < 2 when 'oddExpA'
199 | is 1, and 2 <= A < 4 when 'oddExpA' is 0.
200 | The returned value is interpreted as a pure unsigned fraction, having
201 | no integer bits and 32 fraction bits. The approximation returned is never
202 | greater than the true reciprocal 1/sqrt(A), and it differs from the true
203 | reciprocal by at most 2.06 ulp (units in the last place). The approximation
204 | returned is also always within the range 0.5 to 1; thus, the most-
205 | significant bit of the result is always set.
206 *----------------------------------------------------------------------------*/
207 uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA
, uint32_t a
);
210 #ifdef SOFTFLOAT_FAST_INT64
212 /*----------------------------------------------------------------------------
213 | The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
215 *----------------------------------------------------------------------------*/
217 #ifndef softfloat_eq128
218 /*----------------------------------------------------------------------------
219 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
220 | and 'a0' is equal to the 128-bit unsigned integer formed by concatenating
222 *----------------------------------------------------------------------------*/
223 #if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
225 bool softfloat_eq128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
226 { return (a64
== b64
) && (a0
== b0
); }
228 bool softfloat_eq128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
232 #ifndef softfloat_le128
233 /*----------------------------------------------------------------------------
234 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
235 | and 'a0' is less than or equal to the 128-bit unsigned integer formed by
236 | concatenating 'b64' and 'b0'.
237 *----------------------------------------------------------------------------*/
238 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
240 bool softfloat_le128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
241 { return (a64
< b64
) || ((a64
== b64
) && (a0
<= b0
)); }
243 bool softfloat_le128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
247 #ifndef softfloat_lt128
248 /*----------------------------------------------------------------------------
249 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
250 | and 'a0' is less than the 128-bit unsigned integer formed by concatenating
252 *----------------------------------------------------------------------------*/
253 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
255 bool softfloat_lt128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
256 { return (a64
< b64
) || ((a64
== b64
) && (a0
< b0
)); }
258 bool softfloat_lt128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
262 #ifndef softfloat_shortShiftLeft128
263 /*----------------------------------------------------------------------------
264 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' left by the
265 | number of bits given in 'dist', which must be in the range 1 to 63.
266 *----------------------------------------------------------------------------*/
267 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
270 softfloat_shortShiftLeft128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
273 z
.v64
= a64
<<dist
| a0
>>(-dist
& 63);
279 softfloat_shortShiftLeft128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
283 #ifndef softfloat_shortShiftRight128
284 /*----------------------------------------------------------------------------
285 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
286 | number of bits given in 'dist', which must be in the range 1 to 63.
287 *----------------------------------------------------------------------------*/
288 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
291 softfloat_shortShiftRight128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
295 z
.v0
= a64
<<(-dist
& 63) | a0
>>dist
;
300 softfloat_shortShiftRight128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
304 #ifndef softfloat_shortShiftRightJam64Extra
305 /*----------------------------------------------------------------------------
306 | This function is the same as 'softfloat_shiftRightJam64Extra' (below),
307 | except that 'dist' must be in the range 1 to 63.
308 *----------------------------------------------------------------------------*/
309 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
312 softfloat_shortShiftRightJam64Extra(
313 uint64_t a
, uint64_t extra
, uint_fast8_t dist
)
315 struct uint64_extra z
;
317 z
.extra
= a
<<(-dist
& 63) | (extra
!= 0);
322 softfloat_shortShiftRightJam64Extra(
323 uint64_t a
, uint64_t extra
, uint_fast8_t dist
);
327 #ifndef softfloat_shortShiftRightJam128
328 /*----------------------------------------------------------------------------
329 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
330 | number of bits given in 'dist', which must be in the range 1 to 63. If any
331 | nonzero bits are shifted off, they are "jammed" into the least-significant
332 | bit of the shifted value by setting the least-significant bit to 1. This
333 | shifted-and-jammed value is returned.
334 *----------------------------------------------------------------------------*/
335 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
338 softfloat_shortShiftRightJam128(
339 uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
341 uint_fast8_t negDist
= -dist
;
345 a64
<<(negDist
& 63) | a0
>>dist
346 | ((uint64_t) (a0
<<(negDist
& 63)) != 0);
351 softfloat_shortShiftRightJam128(
352 uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
356 #ifndef softfloat_shortShiftRightJam128Extra
357 /*----------------------------------------------------------------------------
358 | This function is the same as 'softfloat_shiftRightJam128Extra' (below),
359 | except that 'dist' must be in the range 1 to 63.
360 *----------------------------------------------------------------------------*/
361 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
364 softfloat_shortShiftRightJam128Extra(
365 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast8_t dist
)
367 uint_fast8_t negDist
= -dist
;
368 struct uint128_extra z
;
370 z
.v
.v0
= a64
<<(negDist
& 63) | a0
>>dist
;
371 z
.extra
= a0
<<(negDist
& 63) | (extra
!= 0);
376 softfloat_shortShiftRightJam128Extra(
377 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast8_t dist
);
381 #ifndef softfloat_shiftRightJam64Extra
382 /*----------------------------------------------------------------------------
383 | Shifts the 128 bits formed by concatenating 'a' and 'extra' right by 64
384 | _plus_ the number of bits given in 'dist', which must not be zero. This
385 | shifted value is at most 64 nonzero bits and is returned in the 'v' field
386 | of the 'struct uint64_extra' result. The 64-bit 'extra' field of the result
387 | contains a value formed as follows from the bits that were shifted off: The
388 | _last_ bit shifted off is the most-significant bit of the 'extra' field, and
389 | the other 63 bits of the 'extra' field are all zero if and only if _all_but_
390 | _the_last_ bits shifted off were all zero.
391 | (This function makes more sense if 'a' and 'extra' are considered to form
392 | an unsigned fixed-point number with binary point between 'a' and 'extra'.
393 | This fixed-point value is shifted right by the number of bits given in
394 | 'dist', and the integer part of this shifted value is returned in the 'v'
395 | field of the result. The fractional part of the shifted value is modified
396 | as described above and returned in the 'extra' field of the result.)
397 *----------------------------------------------------------------------------*/
398 #if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
401 softfloat_shiftRightJam64Extra(
402 uint64_t a
, uint64_t extra
, uint_fast32_t dist
)
404 struct uint64_extra z
;
407 z
.extra
= a
<<(-dist
& 63);
410 z
.extra
= (dist
== 64) ? a
: (a
!= 0);
412 z
.extra
|= (extra
!= 0);
417 softfloat_shiftRightJam64Extra(
418 uint64_t a
, uint64_t extra
, uint_fast32_t dist
);
422 #ifndef softfloat_shiftRightJam128
423 /*----------------------------------------------------------------------------
424 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
425 | number of bits given in 'dist', which must not be zero. If any nonzero bits
426 | are shifted off, they are "jammed" into the least-significant bit of the
427 | shifted value by setting the least-significant bit to 1. This shifted-and-
428 | jammed value is returned.
429 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
430 | greater than 128, the result will be either 0 or 1, depending on whether the
431 | original 128 bits are all zeros.
432 *----------------------------------------------------------------------------*/
434 softfloat_shiftRightJam128( uint64_t a64
, uint64_t a0
, uint_fast32_t dist
);
437 #ifndef softfloat_shiftRightJam128Extra
438 /*----------------------------------------------------------------------------
439 | Shifts the 192 bits formed by concatenating 'a64', 'a0', and 'extra' right
440 | by 64 _plus_ the number of bits given in 'dist', which must not be zero.
441 | This shifted value is at most 128 nonzero bits and is returned in the 'v'
442 | field of the 'struct uint128_extra' result. The 64-bit 'extra' field of the
443 | result contains a value formed as follows from the bits that were shifted
444 | off: The _last_ bit shifted off is the most-significant bit of the 'extra'
445 | field, and the other 63 bits of the 'extra' field are all zero if and only
446 | if _all_but_the_last_ bits shifted off were all zero.
447 | (This function makes more sense if 'a64', 'a0', and 'extra' are considered
448 | to form an unsigned fixed-point number with binary point between 'a0' and
449 | 'extra'. This fixed-point value is shifted right by the number of bits
450 | given in 'dist', and the integer part of this shifted value is returned
451 | in the 'v' field of the result. The fractional part of the shifted value
452 | is modified as described above and returned in the 'extra' field of the
454 *----------------------------------------------------------------------------*/
456 softfloat_shiftRightJam128Extra(
457 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast32_t dist
);
460 #ifndef softfloat_shiftRightJam256M
461 /*----------------------------------------------------------------------------
462 | Shifts the 256-bit unsigned integer pointed to by 'aPtr' right by the number
463 | of bits given in 'dist', which must not be zero. If any nonzero bits are
464 | shifted off, they are "jammed" into the least-significant bit of the shifted
465 | value by setting the least-significant bit to 1. This shifted-and-jammed
466 | value is stored at the location pointed to by 'zPtr'. Each of 'aPtr' and
467 | 'zPtr' points to an array of four 64-bit elements that concatenate in the
468 | platform's normal endian order to form a 256-bit integer.
469 | The value of 'dist' can be arbitrarily large. In particular, if 'dist'
470 | is greater than 256, the stored result will be either 0 or 1, depending on
471 | whether the original 256 bits are all zeros.
472 *----------------------------------------------------------------------------*/
474 softfloat_shiftRightJam256M(
475 const uint64_t *aPtr
, uint_fast32_t dist
, uint64_t *zPtr
);
478 #ifndef softfloat_add128
479 /*----------------------------------------------------------------------------
480 | Returns the sum of the 128-bit integer formed by concatenating 'a64' and
481 | 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. The
482 | addition is modulo 2^128, so any carry out is lost.
483 *----------------------------------------------------------------------------*/
484 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
487 softfloat_add128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
491 z
.v64
= a64
+ b64
+ (z
.v0
< a0
);
496 softfloat_add128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
500 #ifndef softfloat_add256M
501 /*----------------------------------------------------------------------------
502 | Adds the two 256-bit integers pointed to by 'aPtr' and 'bPtr'. The addition
503 | is modulo 2^256, so any carry out is lost. The sum is stored at the
504 | location pointed to by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to
505 | an array of four 64-bit elements that concatenate in the platform's normal
506 | endian order to form a 256-bit integer.
507 *----------------------------------------------------------------------------*/
510 const uint64_t *aPtr
, const uint64_t *bPtr
, uint64_t *zPtr
);
513 #ifndef softfloat_sub128
514 /*----------------------------------------------------------------------------
515 | Returns the difference of the 128-bit integer formed by concatenating 'a64'
516 | and 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'.
517 | The subtraction is modulo 2^128, so any borrow out (carry out) is lost.
518 *----------------------------------------------------------------------------*/
519 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
522 softfloat_sub128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
532 softfloat_sub128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
536 #ifndef softfloat_sub256M
537 /*----------------------------------------------------------------------------
538 | Subtracts the 256-bit integer pointed to by 'bPtr' from the 256-bit integer
539 | pointed to by 'aPtr'. The addition is modulo 2^256, so any borrow out
540 | (carry out) is lost. The difference is stored at the location pointed to
541 | by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to an array of four
542 | 64-bit elements that concatenate in the platform's normal endian order to
543 | form a 256-bit integer.
544 *----------------------------------------------------------------------------*/
547 const uint64_t *aPtr
, const uint64_t *bPtr
, uint64_t *zPtr
);
550 #ifndef softfloat_mul64ByShifted32To128
551 /*----------------------------------------------------------------------------
552 | Returns the 128-bit product of 'a', 'b', and 2^32.
553 *----------------------------------------------------------------------------*/
554 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
555 INLINE
struct uint128
softfloat_mul64ByShifted32To128( uint64_t a
, uint32_t b
)
559 mid
= (uint_fast64_t) (uint32_t) a
* b
;
561 z
.v64
= (uint_fast64_t) (uint32_t) (a
>>32) * b
+ (mid
>>32);
565 struct uint128
softfloat_mul64ByShifted32To128( uint64_t a
, uint32_t b
);
569 #ifndef softfloat_mul64To128
570 /*----------------------------------------------------------------------------
571 | Returns the 128-bit product of 'a' and 'b'.
572 *----------------------------------------------------------------------------*/
573 struct uint128
softfloat_mul64To128( uint64_t a
, uint64_t b
);
576 #ifndef softfloat_mul128By32
577 /*----------------------------------------------------------------------------
578 | Returns the product of the 128-bit integer formed by concatenating 'a64' and
579 | 'a0', multiplied by 'b'. The multiplication is modulo 2^128; any overflow
580 | bits are discarded.
581 *----------------------------------------------------------------------------*/
582 #if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
584 struct uint128
softfloat_mul128By32( uint64_t a64
, uint64_t a0
, uint32_t b
)
590 mid
= (uint_fast64_t) (uint32_t) (a0
>>32) * b
;
591 carry
= (uint32_t) ((uint_fast32_t) (z
.v0
>>32) - (uint_fast32_t) mid
);
592 z
.v64
= a64
* b
+ (uint_fast32_t) ((mid
+ carry
)>>32);
596 struct uint128
softfloat_mul128By32( uint64_t a64
, uint64_t a0
, uint32_t b
);
600 #ifndef softfloat_mul128To256M
601 /*----------------------------------------------------------------------------
602 | Multiplies the 128-bit unsigned integer formed by concatenating 'a64' and
603 | 'a0' by the 128-bit unsigned integer formed by concatenating 'b64' and
604 | 'b0'. The 256-bit product is stored at the location pointed to by 'zPtr'.
605 | Argument 'zPtr' points to an array of four 64-bit elements that concatenate
606 | in the platform's normal endian order to form a 256-bit integer.
607 *----------------------------------------------------------------------------*/
609 softfloat_mul128To256M(
610 uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
, uint64_t *zPtr
);
615 /*----------------------------------------------------------------------------
616 | The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
618 *----------------------------------------------------------------------------*/
620 #ifndef softfloat_compare96M
621 /*----------------------------------------------------------------------------
622 | Compares the two 96-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
623 | Returns -1 if the first integer (A) is less than the second (B); returns 0
624 | if the two integers are equal; and returns +1 if the first integer (A)
625 | is greater than the second (B). (The result is thus the signum of A - B.)
626 | Each of 'aPtr' and 'bPtr' points to an array of three 32-bit elements that
627 | concatenate in the platform's normal endian order to form a 96-bit integer.
628 *----------------------------------------------------------------------------*/
629 int_fast8_t softfloat_compare96M( const uint32_t *aPtr
, const uint32_t *bPtr
);
632 #ifndef softfloat_compare128M
633 /*----------------------------------------------------------------------------
634 | Compares the two 128-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
635 | Returns -1 if the first integer (A) is less than the second (B); returns 0
636 | if the two integers are equal; and returns +1 if the first integer (A)
637 | is greater than the second (B). (The result is thus the signum of A - B.)
638 | Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
639 | concatenate in the platform's normal endian order to form a 128-bit integer.
640 *----------------------------------------------------------------------------*/
642 softfloat_compare128M( const uint32_t *aPtr
, const uint32_t *bPtr
);
645 #ifndef softfloat_shortShiftLeft64To96M
646 /*----------------------------------------------------------------------------
647 | Extends 'a' to 96 bits and shifts the value left by the number of bits given
648 | in 'dist', which must be in the range 1 to 31. The result is stored at the
649 | location pointed to by 'zPtr'. Argument 'zPtr' points to an array of three
650 | 32-bit elements that concatenate in the platform's normal endian order to
651 | form a 96-bit integer.
652 *----------------------------------------------------------------------------*/
653 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
656 softfloat_shortShiftLeft64To96M(
657 uint64_t a
, uint_fast8_t dist
, uint32_t *zPtr
)
659 zPtr
[indexWord( 3, 0 )] = (uint32_t) a
<<dist
;
661 zPtr
[indexWord( 3, 2 )] = a
>>32;
662 zPtr
[indexWord( 3, 1 )] = a
;
666 softfloat_shortShiftLeft64To96M(
667 uint64_t a
, uint_fast8_t dist
, uint32_t *zPtr
);
671 #ifndef softfloat_shortShiftLeftM
672 /*----------------------------------------------------------------------------
673 | Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
674 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
675 | must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
676 | shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
677 | of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
678 | that concatenate in the platform's normal endian order to form an N-bit
680 *----------------------------------------------------------------------------*/
682 softfloat_shortShiftLeftM(
683 uint_fast8_t size_words
,
684 const uint32_t *aPtr
,
690 #ifndef softfloat_shortShiftLeft96M
691 /*----------------------------------------------------------------------------
692 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
693 | 'size_words' = 3 (N = 96).
694 *----------------------------------------------------------------------------*/
695 #define softfloat_shortShiftLeft96M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 3, aPtr, dist, zPtr )
698 #ifndef softfloat_shortShiftLeft128M
699 /*----------------------------------------------------------------------------
700 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
701 | 'size_words' = 4 (N = 128).
702 *----------------------------------------------------------------------------*/
703 #define softfloat_shortShiftLeft128M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 4, aPtr, dist, zPtr )
706 #ifndef softfloat_shortShiftLeft160M
707 /*----------------------------------------------------------------------------
708 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
709 | 'size_words' = 5 (N = 160).
710 *----------------------------------------------------------------------------*/
711 #define softfloat_shortShiftLeft160M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 5, aPtr, dist, zPtr )
714 #ifndef softfloat_shiftLeftM
715 /*----------------------------------------------------------------------------
716 | Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
717 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
718 | must not be zero. Any nonzero bits shifted off are lost. The shifted
719 | N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
720 | and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
721 | concatenate in the platform's normal endian order to form an N-bit integer.
722 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
723 | greater than N, the stored result will be 0.
724 *----------------------------------------------------------------------------*/
726 softfloat_shiftLeftM(
727 uint_fast8_t size_words
,
728 const uint32_t *aPtr
,
734 #ifndef softfloat_shiftLeft96M
735 /*----------------------------------------------------------------------------
736 | This function or macro is the same as 'softfloat_shiftLeftM' with
737 | 'size_words' = 3 (N = 96).
738 *----------------------------------------------------------------------------*/
739 #define softfloat_shiftLeft96M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 3, aPtr, dist, zPtr )
742 #ifndef softfloat_shiftLeft128M
743 /*----------------------------------------------------------------------------
744 | This function or macro is the same as 'softfloat_shiftLeftM' with
745 | 'size_words' = 4 (N = 128).
746 *----------------------------------------------------------------------------*/
747 #define softfloat_shiftLeft128M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 4, aPtr, dist, zPtr )
750 #ifndef softfloat_shiftLeft160M
751 /*----------------------------------------------------------------------------
752 | This function or macro is the same as 'softfloat_shiftLeftM' with
753 | 'size_words' = 5 (N = 160).
754 *----------------------------------------------------------------------------*/
755 #define softfloat_shiftLeft160M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 5, aPtr, dist, zPtr )
758 #ifndef softfloat_shortShiftRightM
759 /*----------------------------------------------------------------------------
760 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
761 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
762 | must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
763 | shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
764 | of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
765 | that concatenate in the platform's normal endian order to form an N-bit
767 *----------------------------------------------------------------------------*/
769 softfloat_shortShiftRightM(
770 uint_fast8_t size_words
,
771 const uint32_t *aPtr
,
777 #ifndef softfloat_shortShiftRight128M
778 /*----------------------------------------------------------------------------
779 | This function or macro is the same as 'softfloat_shortShiftRightM' with
780 | 'size_words' = 4 (N = 128).
781 *----------------------------------------------------------------------------*/
782 #define softfloat_shortShiftRight128M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 4, aPtr, dist, zPtr )
785 #ifndef softfloat_shortShiftRight160M
786 /*----------------------------------------------------------------------------
787 | This function or macro is the same as 'softfloat_shortShiftRightM' with
788 | 'size_words' = 5 (N = 160).
789 *----------------------------------------------------------------------------*/
790 #define softfloat_shortShiftRight160M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 5, aPtr, dist, zPtr )
793 #ifndef softfloat_shortShiftRightJamM
794 /*----------------------------------------------------------------------------
795 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
796 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
797 | must be in the range 1 to 31. If any nonzero bits are shifted off, they are
798 | "jammed" into the least-significant bit of the shifted value by setting the
799 | least-significant bit to 1. This shifted-and-jammed N-bit result is stored
800 | at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
801 | to a 'size_words'-long array of 32-bit elements that concatenate in the
802 | platform's normal endian order to form an N-bit integer.
803 *----------------------------------------------------------------------------*/
805 softfloat_shortShiftRightJamM(
806 uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t * );
809 #ifndef softfloat_shortShiftRightJam160M
810 /*----------------------------------------------------------------------------
811 | This function or macro is the same as 'softfloat_shortShiftRightJamM' with
812 | 'size_words' = 5 (N = 160).
813 *----------------------------------------------------------------------------*/
814 #define softfloat_shortShiftRightJam160M( aPtr, dist, zPtr ) softfloat_shortShiftRightJamM( 5, aPtr, dist, zPtr )
817 #ifndef softfloat_shiftRightM
818 /*----------------------------------------------------------------------------
819 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
820 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
821 | must not be zero. Any nonzero bits shifted off are lost. The shifted
822 | N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
823 | and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
824 | concatenate in the platform's normal endian order to form an N-bit integer.
825 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
826 | greater than N, the stored result will be 0.
827 *----------------------------------------------------------------------------*/
829 softfloat_shiftRightM(
830 uint_fast8_t size_words
,
831 const uint32_t *aPtr
,
837 #ifndef softfloat_shiftRight96M
838 /*----------------------------------------------------------------------------
839 | This function or macro is the same as 'softfloat_shiftRightM' with
840 | 'size_words' = 3 (N = 96).
841 *----------------------------------------------------------------------------*/
842 #define softfloat_shiftRight96M( aPtr, dist, zPtr ) softfloat_shiftRightM( 3, aPtr, dist, zPtr )
845 #ifndef softfloat_shiftRightJamM
846 /*----------------------------------------------------------------------------
847 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
848 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
849 | must not be zero. If any nonzero bits are shifted off, they are "jammed"
850 | into the least-significant bit of the shifted value by setting the least-
851 | significant bit to 1. This shifted-and-jammed N-bit result is stored
852 | at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
853 | to a 'size_words'-long array of 32-bit elements that concatenate in the
854 | platform's normal endian order to form an N-bit integer.
855 | The value of 'dist' can be arbitrarily large. In particular, if 'dist'
856 | is greater than N, the stored result will be either 0 or 1, depending on
857 | whether the original N bits are all zeros.
858 *----------------------------------------------------------------------------*/
860 softfloat_shiftRightJamM(
861 uint_fast8_t size_words
,
862 const uint32_t *aPtr
,
868 #ifndef softfloat_shiftRightJam96M
869 /*----------------------------------------------------------------------------
870 | This function or macro is the same as 'softfloat_shiftRightJamM' with
871 | 'size_words' = 3 (N = 96).
872 *----------------------------------------------------------------------------*/
873 #define softfloat_shiftRightJam96M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 3, aPtr, dist, zPtr )
876 #ifndef softfloat_shiftRightJam128M
877 /*----------------------------------------------------------------------------
878 | This function or macro is the same as 'softfloat_shiftRightJamM' with
879 | 'size_words' = 4 (N = 128).
880 *----------------------------------------------------------------------------*/
881 #define softfloat_shiftRightJam128M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 4, aPtr, dist, zPtr )
884 #ifndef softfloat_shiftRightJam160M
885 /*----------------------------------------------------------------------------
886 | This function or macro is the same as 'softfloat_shiftRightJamM' with
887 | 'size_words' = 5 (N = 160).
888 *----------------------------------------------------------------------------*/
889 #define softfloat_shiftRightJam160M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 5, aPtr, dist, zPtr )
892 #ifndef softfloat_addM
893 /*----------------------------------------------------------------------------
894 | Adds the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
895 | 'size_words' * 32. The addition is modulo 2^N, so any carry out is lost.
896 | The N-bit sum is stored at the location pointed to by 'zPtr'. Each of
897 | 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long array of 32-bit
898 | elements that concatenate in the platform's normal endian order to form an
900 *----------------------------------------------------------------------------*/
903 uint_fast8_t size_words
,
904 const uint32_t *aPtr
,
905 const uint32_t *bPtr
,
910 #ifndef softfloat_add96M
911 /*----------------------------------------------------------------------------
912 | This function or macro is the same as 'softfloat_addM' with 'size_words'
914 *----------------------------------------------------------------------------*/
915 #define softfloat_add96M( aPtr, bPtr, zPtr ) softfloat_addM( 3, aPtr, bPtr, zPtr )
918 #ifndef softfloat_add128M
919 /*----------------------------------------------------------------------------
920 | This function or macro is the same as 'softfloat_addM' with 'size_words'
922 *----------------------------------------------------------------------------*/
923 #define softfloat_add128M( aPtr, bPtr, zPtr ) softfloat_addM( 4, aPtr, bPtr, zPtr )
926 #ifndef softfloat_add160M
927 /*----------------------------------------------------------------------------
928 | This function or macro is the same as 'softfloat_addM' with 'size_words'
930 *----------------------------------------------------------------------------*/
931 #define softfloat_add160M( aPtr, bPtr, zPtr ) softfloat_addM( 5, aPtr, bPtr, zPtr )
934 #ifndef softfloat_addCarryM
935 /*----------------------------------------------------------------------------
936 | Adds the two N-bit unsigned integers pointed to by 'aPtr' and 'bPtr', where
937 | N = 'size_words' * 32, plus 'carry', which must be either 0 or 1. The N-bit
938 | sum (modulo 2^N) is stored at the location pointed to by 'zPtr', and any
939 | carry out is returned as the result. Each of 'aPtr', 'bPtr', and 'zPtr'
940 | points to a 'size_words'-long array of 32-bit elements that concatenate in
941 | the platform's normal endian order to form an N-bit integer.
942 *----------------------------------------------------------------------------*/
945 uint_fast8_t size_words
,
946 const uint32_t *aPtr
,
947 const uint32_t *bPtr
,
953 #ifndef softfloat_addComplCarryM
954 /*----------------------------------------------------------------------------
955 | This function or macro is the same as 'softfloat_addCarryM', except that
956 | the value of the unsigned integer pointed to by 'bPtr' is bit-wise completed
957 | before the addition.
958 *----------------------------------------------------------------------------*/
960 softfloat_addComplCarryM(
961 uint_fast8_t size_words
,
962 const uint32_t *aPtr
,
963 const uint32_t *bPtr
,
969 #ifndef softfloat_addComplCarry96M
970 /*----------------------------------------------------------------------------
971 | This function or macro is the same as 'softfloat_addComplCarryM' with
972 | 'size_words' = 3 (N = 96).
973 *----------------------------------------------------------------------------*/
974 #define softfloat_addComplCarry96M( aPtr, bPtr, carry, zPtr ) softfloat_addComplCarryM( 3, aPtr, bPtr, carry, zPtr )
977 #ifndef softfloat_negXM
978 /*----------------------------------------------------------------------------
979 | Replaces the N-bit unsigned integer pointed to by 'zPtr' by the
980 | 2s-complement of itself, where N = 'size_words' * 32. Argument 'zPtr'
981 | points to a 'size_words'-long array of 32-bit elements that concatenate in
982 | the platform's normal endian order to form an N-bit integer.
983 *----------------------------------------------------------------------------*/
984 void softfloat_negXM( uint_fast8_t size_words
, uint32_t *zPtr
);
987 #ifndef softfloat_negX96M
988 /*----------------------------------------------------------------------------
989 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
991 *----------------------------------------------------------------------------*/
992 #define softfloat_negX96M( zPtr ) softfloat_negXM( 3, zPtr )
995 #ifndef softfloat_negX128M
996 /*----------------------------------------------------------------------------
997 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
999 *----------------------------------------------------------------------------*/
1000 #define softfloat_negX128M( zPtr ) softfloat_negXM( 4, zPtr )
1003 #ifndef softfloat_negX160M
1004 /*----------------------------------------------------------------------------
1005 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
1007 *----------------------------------------------------------------------------*/
1008 #define softfloat_negX160M( zPtr ) softfloat_negXM( 5, zPtr )
1011 #ifndef softfloat_negX256M
1012 /*----------------------------------------------------------------------------
1013 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
1015 *----------------------------------------------------------------------------*/
1016 #define softfloat_negX256M( zPtr ) softfloat_negXM( 8, zPtr )
1019 #ifndef softfloat_sub1XM
1020 /*----------------------------------------------------------------------------
1021 | Subtracts 1 from the N-bit integer pointed to by 'zPtr', where N =
1022 | 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
1023 | out) is lost. Argument 'zPtr' points to a 'size_words'-long array of 32-bit
1024 | elements that concatenate in the platform's normal endian order to form an
1026 *----------------------------------------------------------------------------*/
1027 void softfloat_sub1XM( uint_fast8_t size_words
, uint32_t *zPtr
);
1030 #ifndef softfloat_sub1X96M
1031 /*----------------------------------------------------------------------------
1032 | This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
1034 *----------------------------------------------------------------------------*/
1035 #define softfloat_sub1X96M( zPtr ) softfloat_sub1XM( 3, zPtr )
1038 #ifndef softfloat_sub1X160M
1039 /*----------------------------------------------------------------------------
1040 | This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
1042 *----------------------------------------------------------------------------*/
1043 #define softfloat_sub1X160M( zPtr ) softfloat_sub1XM( 5, zPtr )
1046 #ifndef softfloat_subM
1047 /*----------------------------------------------------------------------------
1048 | Subtracts the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
1049 | 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
1050 | out) is lost. The N-bit difference is stored at the location pointed to by
1051 | 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long
1052 | array of 32-bit elements that concatenate in the platform's normal endian
1053 | order to form an N-bit integer.
1054 *----------------------------------------------------------------------------*/
1057 uint_fast8_t size_words
,
1058 const uint32_t *aPtr
,
1059 const uint32_t *bPtr
,
1064 #ifndef softfloat_sub96M
1065 /*----------------------------------------------------------------------------
1066 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1068 *----------------------------------------------------------------------------*/
1069 #define softfloat_sub96M( aPtr, bPtr, zPtr ) softfloat_subM( 3, aPtr, bPtr, zPtr )
1072 #ifndef softfloat_sub128M
1073 /*----------------------------------------------------------------------------
1074 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1076 *----------------------------------------------------------------------------*/
1077 #define softfloat_sub128M( aPtr, bPtr, zPtr ) softfloat_subM( 4, aPtr, bPtr, zPtr )
1080 #ifndef softfloat_sub160M
1081 /*----------------------------------------------------------------------------
1082 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1084 *----------------------------------------------------------------------------*/
1085 #define softfloat_sub160M( aPtr, bPtr, zPtr ) softfloat_subM( 5, aPtr, bPtr, zPtr )
1088 #ifndef softfloat_mul64To128M
1089 /*----------------------------------------------------------------------------
1090 | Multiplies 'a' and 'b' and stores the 128-bit product at the location
1091 | pointed to by 'zPtr'. Argument 'zPtr' points to an array of four 32-bit
1092 | elements that concatenate in the platform's normal endian order to form a
1094 *----------------------------------------------------------------------------*/
1095 void softfloat_mul64To128M( uint64_t a
, uint64_t b
, uint32_t *zPtr
);
1098 #ifndef softfloat_mul128MTo256M
1099 /*----------------------------------------------------------------------------
1100 | Multiplies the two 128-bit unsigned integers pointed to by 'aPtr' and
1101 | 'bPtr', and stores the 256-bit product at the location pointed to by 'zPtr'.
1102 | Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
1103 | concatenate in the platform's normal endian order to form a 128-bit integer.
1104 | Argument 'zPtr' points to an array of eight 32-bit elements that concatenate
1105 | to form a 256-bit integer.
1106 *----------------------------------------------------------------------------*/
1108 softfloat_mul128MTo256M(
1109 const uint32_t *aPtr
, const uint32_t *bPtr
, uint32_t *zPtr
);
1112 #ifndef softfloat_remStepMBy32
1113 /*----------------------------------------------------------------------------
1114 | Performs a "remainder reduction step" as follows: Arguments 'remPtr' and
1115 | 'bPtr' both point to N-bit unsigned integers, where N = 'size_words' * 32.
1116 | Defining R and B as the values of those integers, the expression (R<<'dist')
1117 | - B * q is computed modulo 2^N, and the N-bit result is stored at the
1118 | location pointed to by 'zPtr'. Each of 'remPtr', 'bPtr', and 'zPtr' points
1119 | to a 'size_words'-long array of 32-bit elements that concatenate in the
1120 | platform's normal endian order to form an N-bit integer.
1121 *----------------------------------------------------------------------------*/
1123 softfloat_remStepMBy32(
1124 uint_fast8_t size_words
,
1125 const uint32_t *remPtr
,
1127 const uint32_t *bPtr
,
1133 #ifndef softfloat_remStep96MBy32
1134 /*----------------------------------------------------------------------------
1135 | This function or macro is the same as 'softfloat_remStepMBy32' with
1136 | 'size_words' = 3 (N = 96).
1137 *----------------------------------------------------------------------------*/
1138 #define softfloat_remStep96MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 3, remPtr, dist, bPtr, q, zPtr )
1141 #ifndef softfloat_remStep128MBy32
1142 /*----------------------------------------------------------------------------
1143 | This function or macro is the same as 'softfloat_remStepMBy32' with
1144 | 'size_words' = 4 (N = 128).
1145 *----------------------------------------------------------------------------*/
1146 #define softfloat_remStep128MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 4, remPtr, dist, bPtr, q, zPtr )
1149 #ifndef softfloat_remStep160MBy32
1150 /*----------------------------------------------------------------------------
1151 | This function or macro is the same as 'softfloat_remStepMBy32' with
1152 | 'size_words' = 5 (N = 160).
1153 *----------------------------------------------------------------------------*/
1154 #define softfloat_remStep160MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 5, remPtr, dist, bPtr, q, zPtr )