2 /*============================================================================
4 This C header file is part of the SoftFloat IEEE Floating-Point Arithmetic
5 Package, Release 3d, 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"
48 #ifndef softfloat_shortShiftRightJam64
49 /*----------------------------------------------------------------------------
50 | Shifts 'a' right by the number of bits given in 'dist', which must be in
51 | the range 1 to 63. If any nonzero bits are shifted off, they are "jammed"
52 | into the least-significant bit of the shifted value by setting the least-
53 | significant bit to 1. This shifted-and-jammed value is returned.
54 *----------------------------------------------------------------------------*/
55 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
57 uint64_t softfloat_shortShiftRightJam64( uint64_t a
, uint_fast8_t dist
)
58 { return a
>>dist
| ((a
& (((uint_fast64_t) 1<<dist
) - 1)) != 0); }
60 uint64_t softfloat_shortShiftRightJam64( uint64_t a
, uint_fast8_t dist
);
64 #ifndef softfloat_shiftRightJam32
65 /*----------------------------------------------------------------------------
66 | Shifts 'a' right by the number of bits given in 'dist', which must not
67 | be zero. If any nonzero bits are shifted off, they are "jammed" into the
68 | least-significant bit of the shifted value by setting the least-significant
69 | bit to 1. This shifted-and-jammed value is returned.
70 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
71 | greater than 32, the result will be either 0 or 1, depending on whether 'a'
73 *----------------------------------------------------------------------------*/
74 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
75 INLINE
uint32_t softfloat_shiftRightJam32( uint32_t a
, uint_fast16_t dist
)
78 (dist
< 31) ? a
>>dist
| ((uint32_t) (a
<<(-dist
& 31)) != 0) : (a
!= 0);
81 uint32_t softfloat_shiftRightJam32( uint32_t a
, uint_fast16_t dist
);
85 #ifndef softfloat_shiftRightJam64
86 /*----------------------------------------------------------------------------
87 | Shifts 'a' right by the number of bits given in 'dist', which must not
88 | be zero. If any nonzero bits are shifted off, they are "jammed" into the
89 | least-significant bit of the shifted value by setting the least-significant
90 | bit to 1. This shifted-and-jammed value is returned.
91 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
92 | greater than 64, the result will be either 0 or 1, depending on whether 'a'
94 *----------------------------------------------------------------------------*/
95 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
96 INLINE
uint64_t softfloat_shiftRightJam64( uint64_t a
, uint_fast32_t dist
)
99 (dist
< 63) ? a
>>dist
| ((uint64_t) (a
<<(-dist
& 63)) != 0) : (a
!= 0);
102 uint64_t softfloat_shiftRightJam64( uint64_t a
, uint_fast32_t dist
);
106 /*----------------------------------------------------------------------------
107 | A constant table that translates an 8-bit unsigned integer (the array index)
108 | into the number of leading 0 bits before the most-significant 1 of that
109 | integer. For integer zero (index 0), the corresponding table element is 8.
110 *----------------------------------------------------------------------------*/
111 extern const uint_least8_t softfloat_countLeadingZeros8
[256];
113 #ifndef softfloat_countLeadingZeros16
114 /*----------------------------------------------------------------------------
115 | Returns the number of leading 0 bits before the most-significant 1 bit of
116 | 'a'. If 'a' is zero, 16 is returned.
117 *----------------------------------------------------------------------------*/
118 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
119 INLINE
uint_fast8_t softfloat_countLeadingZeros16( uint16_t a
)
121 uint_fast8_t count
= 8;
126 count
+= softfloat_countLeadingZeros8
[a
];
130 uint_fast8_t softfloat_countLeadingZeros16( uint16_t a
);
134 #ifndef softfloat_countLeadingZeros32
135 /*----------------------------------------------------------------------------
136 | Returns the number of leading 0 bits before the most-significant 1 bit of
137 | 'a'. If 'a' is zero, 32 is returned.
138 *----------------------------------------------------------------------------*/
139 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
140 INLINE
uint_fast8_t softfloat_countLeadingZeros32( uint32_t a
)
142 uint_fast8_t count
= 0;
147 if ( a
< 0x1000000 ) {
151 count
+= softfloat_countLeadingZeros8
[a
>>24];
155 uint_fast8_t softfloat_countLeadingZeros32( uint32_t a
);
159 #ifndef softfloat_countLeadingZeros64
160 /*----------------------------------------------------------------------------
161 | Returns the number of leading 0 bits before the most-significant 1 bit of
162 | 'a'. If 'a' is zero, 64 is returned.
163 *----------------------------------------------------------------------------*/
164 uint_fast8_t softfloat_countLeadingZeros64( uint64_t a
);
167 extern const uint16_t softfloat_approxRecip_1k0s
[16];
168 extern const uint16_t softfloat_approxRecip_1k1s
[16];
170 #ifndef softfloat_approxRecip32_1
171 /*----------------------------------------------------------------------------
172 | Returns an approximation to the reciprocal of the number represented by 'a',
173 | where 'a' is interpreted as an unsigned fixed-point number with one integer
174 | bit and 31 fraction bits. The 'a' input must be "normalized", meaning that
175 | its most-significant bit (bit 31) must be 1. Thus, if A is the value of
176 | the fixed-point interpretation of 'a', then 1 <= A < 2. The returned value
177 | is interpreted as a pure unsigned fraction, having no integer bits and 32
178 | fraction bits. The approximation returned is never greater than the true
179 | reciprocal 1/A, and it differs from the true reciprocal by at most 2.006 ulp
180 | (units in the last place).
181 *----------------------------------------------------------------------------*/
182 #ifdef SOFTFLOAT_FAST_DIV64TO32
183 #define softfloat_approxRecip32_1( a ) ((uint32_t) (UINT64_C( 0x7FFFFFFFFFFFFFFF ) / (uint32_t) (a)))
185 uint32_t softfloat_approxRecip32_1( uint32_t a
);
189 extern const uint16_t softfloat_approxRecipSqrt_1k0s
[16];
190 extern const uint16_t softfloat_approxRecipSqrt_1k1s
[16];
192 #ifndef softfloat_approxRecipSqrt32_1
193 /*----------------------------------------------------------------------------
194 | Returns an approximation to the reciprocal of the square root of the number
195 | represented by 'a', where 'a' is interpreted as an unsigned fixed-point
196 | number either with one integer bit and 31 fraction bits or with two integer
197 | bits and 30 fraction bits. The format of 'a' is determined by 'oddExpA',
198 | which must be either 0 or 1. If 'oddExpA' is 1, 'a' is interpreted as
199 | having one integer bit, and if 'oddExpA' is 0, 'a' is interpreted as having
200 | two integer bits. The 'a' input must be "normalized", meaning that its
201 | most-significant bit (bit 31) must be 1. Thus, if A is the value of the
202 | fixed-point interpretation of 'a', it follows that 1 <= A < 2 when 'oddExpA'
203 | is 1, and 2 <= A < 4 when 'oddExpA' is 0.
204 | The returned value is interpreted as a pure unsigned fraction, having
205 | no integer bits and 32 fraction bits. The approximation returned is never
206 | greater than the true reciprocal 1/sqrt(A), and it differs from the true
207 | reciprocal by at most 2.06 ulp (units in the last place). The approximation
208 | returned is also always within the range 0.5 to 1; thus, the most-
209 | significant bit of the result is always set.
210 *----------------------------------------------------------------------------*/
211 uint32_t softfloat_approxRecipSqrt32_1( unsigned int oddExpA
, uint32_t a
);
214 #ifdef SOFTFLOAT_FAST_INT64
216 /*----------------------------------------------------------------------------
217 | The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is
219 *----------------------------------------------------------------------------*/
221 #ifndef softfloat_eq128
222 /*----------------------------------------------------------------------------
223 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
224 | and 'a0' is equal to the 128-bit unsigned integer formed by concatenating
226 *----------------------------------------------------------------------------*/
227 #if defined INLINE_LEVEL && (1 <= INLINE_LEVEL)
229 bool softfloat_eq128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
230 { return (a64
== b64
) && (a0
== b0
); }
232 bool softfloat_eq128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
236 #ifndef softfloat_le128
237 /*----------------------------------------------------------------------------
238 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
239 | and 'a0' is less than or equal to the 128-bit unsigned integer formed by
240 | concatenating 'b64' and 'b0'.
241 *----------------------------------------------------------------------------*/
242 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
244 bool softfloat_le128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
245 { return (a64
< b64
) || ((a64
== b64
) && (a0
<= b0
)); }
247 bool softfloat_le128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
251 #ifndef softfloat_lt128
252 /*----------------------------------------------------------------------------
253 | Returns true if the 128-bit unsigned integer formed by concatenating 'a64'
254 | and 'a0' is less than the 128-bit unsigned integer formed by concatenating
256 *----------------------------------------------------------------------------*/
257 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
259 bool softfloat_lt128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
260 { return (a64
< b64
) || ((a64
== b64
) && (a0
< b0
)); }
262 bool softfloat_lt128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
266 #ifndef softfloat_shortShiftLeft128
267 /*----------------------------------------------------------------------------
268 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' left by the
269 | number of bits given in 'dist', which must be in the range 1 to 63.
270 *----------------------------------------------------------------------------*/
271 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
274 softfloat_shortShiftLeft128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
277 z
.v64
= a64
<<dist
| a0
>>(-dist
& 63);
283 softfloat_shortShiftLeft128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
287 #ifndef softfloat_shortShiftRight128
288 /*----------------------------------------------------------------------------
289 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
290 | number of bits given in 'dist', which must be in the range 1 to 63.
291 *----------------------------------------------------------------------------*/
292 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
295 softfloat_shortShiftRight128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
299 z
.v0
= a64
<<(-dist
& 63) | a0
>>dist
;
304 softfloat_shortShiftRight128( uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
308 #ifndef softfloat_shortShiftRightJam64Extra
309 /*----------------------------------------------------------------------------
310 | This function is the same as 'softfloat_shiftRightJam64Extra' (below),
311 | except that 'dist' must be in the range 1 to 63.
312 *----------------------------------------------------------------------------*/
313 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
316 softfloat_shortShiftRightJam64Extra(
317 uint64_t a
, uint64_t extra
, uint_fast8_t dist
)
319 struct uint64_extra z
;
321 z
.extra
= a
<<(-dist
& 63) | (extra
!= 0);
326 softfloat_shortShiftRightJam64Extra(
327 uint64_t a
, uint64_t extra
, uint_fast8_t dist
);
331 #ifndef softfloat_shortShiftRightJam128
332 /*----------------------------------------------------------------------------
333 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
334 | number of bits given in 'dist', which must be in the range 1 to 63. If any
335 | nonzero bits are shifted off, they are "jammed" into the least-significant
336 | bit of the shifted value by setting the least-significant bit to 1. This
337 | shifted-and-jammed value is returned.
338 *----------------------------------------------------------------------------*/
339 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
342 softfloat_shortShiftRightJam128(
343 uint64_t a64
, uint64_t a0
, uint_fast8_t dist
)
345 uint_fast8_t negDist
= -dist
;
349 a64
<<(negDist
& 63) | a0
>>dist
350 | ((uint64_t) (a0
<<(negDist
& 63)) != 0);
355 softfloat_shortShiftRightJam128(
356 uint64_t a64
, uint64_t a0
, uint_fast8_t dist
);
360 #ifndef softfloat_shortShiftRightJam128Extra
361 /*----------------------------------------------------------------------------
362 | This function is the same as 'softfloat_shiftRightJam128Extra' (below),
363 | except that 'dist' must be in the range 1 to 63.
364 *----------------------------------------------------------------------------*/
365 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
368 softfloat_shortShiftRightJam128Extra(
369 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast8_t dist
)
371 uint_fast8_t negDist
= -dist
;
372 struct uint128_extra z
;
374 z
.v
.v0
= a64
<<(negDist
& 63) | a0
>>dist
;
375 z
.extra
= a0
<<(negDist
& 63) | (extra
!= 0);
380 softfloat_shortShiftRightJam128Extra(
381 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast8_t dist
);
385 #ifndef softfloat_shiftRightJam64Extra
386 /*----------------------------------------------------------------------------
387 | Shifts the 128 bits formed by concatenating 'a' and 'extra' right by 64
388 | _plus_ the number of bits given in 'dist', which must not be zero. This
389 | shifted value is at most 64 nonzero bits and is returned in the 'v' field
390 | of the 'struct uint64_extra' result. The 64-bit 'extra' field of the result
391 | contains a value formed as follows from the bits that were shifted off: The
392 | _last_ bit shifted off is the most-significant bit of the 'extra' field, and
393 | the other 63 bits of the 'extra' field are all zero if and only if _all_but_
394 | _the_last_ bits shifted off were all zero.
395 | (This function makes more sense if 'a' and 'extra' are considered to form
396 | an unsigned fixed-point number with binary point between 'a' and 'extra'.
397 | This fixed-point value is shifted right by the number of bits given in
398 | 'dist', and the integer part of this shifted value is returned in the 'v'
399 | field of the result. The fractional part of the shifted value is modified
400 | as described above and returned in the 'extra' field of the result.)
401 *----------------------------------------------------------------------------*/
402 #if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
405 softfloat_shiftRightJam64Extra(
406 uint64_t a
, uint64_t extra
, uint_fast32_t dist
)
408 struct uint64_extra z
;
411 z
.extra
= a
<<(-dist
& 63);
414 z
.extra
= (dist
== 64) ? a
: (a
!= 0);
416 z
.extra
|= (extra
!= 0);
421 softfloat_shiftRightJam64Extra(
422 uint64_t a
, uint64_t extra
, uint_fast32_t dist
);
426 #ifndef softfloat_shiftRightJam128
427 /*----------------------------------------------------------------------------
428 | Shifts the 128 bits formed by concatenating 'a64' and 'a0' right by the
429 | number of bits given in 'dist', which must not be zero. If any nonzero bits
430 | are shifted off, they are "jammed" into the least-significant bit of the
431 | shifted value by setting the least-significant bit to 1. This shifted-and-
432 | jammed value is returned.
433 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
434 | greater than 128, the result will be either 0 or 1, depending on whether the
435 | original 128 bits are all zeros.
436 *----------------------------------------------------------------------------*/
438 softfloat_shiftRightJam128( uint64_t a64
, uint64_t a0
, uint_fast32_t dist
);
441 #ifndef softfloat_shiftRightJam128Extra
442 /*----------------------------------------------------------------------------
443 | Shifts the 192 bits formed by concatenating 'a64', 'a0', and 'extra' right
444 | by 64 _plus_ the number of bits given in 'dist', which must not be zero.
445 | This shifted value is at most 128 nonzero bits and is returned in the 'v'
446 | field of the 'struct uint128_extra' result. The 64-bit 'extra' field of the
447 | result contains a value formed as follows from the bits that were shifted
448 | off: The _last_ bit shifted off is the most-significant bit of the 'extra'
449 | field, and the other 63 bits of the 'extra' field are all zero if and only
450 | if _all_but_the_last_ bits shifted off were all zero.
451 | (This function makes more sense if 'a64', 'a0', and 'extra' are considered
452 | to form an unsigned fixed-point number with binary point between 'a0' and
453 | 'extra'. This fixed-point value is shifted right by the number of bits
454 | given in 'dist', and the integer part of this shifted value is returned
455 | in the 'v' field of the result. The fractional part of the shifted value
456 | is modified as described above and returned in the 'extra' field of the
458 *----------------------------------------------------------------------------*/
460 softfloat_shiftRightJam128Extra(
461 uint64_t a64
, uint64_t a0
, uint64_t extra
, uint_fast32_t dist
);
464 #ifndef softfloat_shiftRightJam256M
465 /*----------------------------------------------------------------------------
466 | Shifts the 256-bit unsigned integer pointed to by 'aPtr' right by the number
467 | of bits given in 'dist', which must not be zero. If any nonzero bits are
468 | shifted off, they are "jammed" into the least-significant bit of the shifted
469 | value by setting the least-significant bit to 1. This shifted-and-jammed
470 | value is stored at the location pointed to by 'zPtr'. Each of 'aPtr' and
471 | 'zPtr' points to an array of four 64-bit elements that concatenate in the
472 | platform's normal endian order to form a 256-bit integer.
473 | The value of 'dist' can be arbitrarily large. In particular, if 'dist'
474 | is greater than 256, the stored result will be either 0 or 1, depending on
475 | whether the original 256 bits are all zeros.
476 *----------------------------------------------------------------------------*/
478 softfloat_shiftRightJam256M(
479 const uint64_t *aPtr
, uint_fast32_t dist
, uint64_t *zPtr
);
482 #ifndef softfloat_add128
483 /*----------------------------------------------------------------------------
484 | Returns the sum of the 128-bit integer formed by concatenating 'a64' and
485 | 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'. The
486 | addition is modulo 2^128, so any carry out is lost.
487 *----------------------------------------------------------------------------*/
488 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
491 softfloat_add128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
495 z
.v64
= a64
+ b64
+ (z
.v0
< a0
);
500 softfloat_add128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
504 #ifndef softfloat_add256M
505 /*----------------------------------------------------------------------------
506 | Adds the two 256-bit integers pointed to by 'aPtr' and 'bPtr'. The addition
507 | is modulo 2^256, so any carry out is lost. The sum is stored at the
508 | location pointed to by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to
509 | an array of four 64-bit elements that concatenate in the platform's normal
510 | endian order to form a 256-bit integer.
511 *----------------------------------------------------------------------------*/
514 const uint64_t *aPtr
, const uint64_t *bPtr
, uint64_t *zPtr
);
517 #ifndef softfloat_sub128
518 /*----------------------------------------------------------------------------
519 | Returns the difference of the 128-bit integer formed by concatenating 'a64'
520 | and 'a0' and the 128-bit integer formed by concatenating 'b64' and 'b0'.
521 | The subtraction is modulo 2^128, so any borrow out (carry out) is lost.
522 *----------------------------------------------------------------------------*/
523 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
526 softfloat_sub128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
)
536 softfloat_sub128( uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
);
540 #ifndef softfloat_sub256M
541 /*----------------------------------------------------------------------------
542 | Subtracts the 256-bit integer pointed to by 'bPtr' from the 256-bit integer
543 | pointed to by 'aPtr'. The addition is modulo 2^256, so any borrow out
544 | (carry out) is lost. The difference is stored at the location pointed to
545 | by 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to an array of four
546 | 64-bit elements that concatenate in the platform's normal endian order to
547 | form a 256-bit integer.
548 *----------------------------------------------------------------------------*/
551 const uint64_t *aPtr
, const uint64_t *bPtr
, uint64_t *zPtr
);
554 #ifndef softfloat_mul64ByShifted32To128
555 /*----------------------------------------------------------------------------
556 | Returns the 128-bit product of 'a', 'b', and 2^32.
557 *----------------------------------------------------------------------------*/
558 #if defined INLINE_LEVEL && (3 <= INLINE_LEVEL)
559 INLINE
struct uint128
softfloat_mul64ByShifted32To128( uint64_t a
, uint32_t b
)
563 mid
= (uint_fast64_t) (uint32_t) a
* b
;
565 z
.v64
= (uint_fast64_t) (uint32_t) (a
>>32) * b
+ (mid
>>32);
569 struct uint128
softfloat_mul64ByShifted32To128( uint64_t a
, uint32_t b
);
573 #ifndef softfloat_mul64To128
574 /*----------------------------------------------------------------------------
575 | Returns the 128-bit product of 'a' and 'b'.
576 *----------------------------------------------------------------------------*/
577 struct uint128
softfloat_mul64To128( uint64_t a
, uint64_t b
);
580 #ifndef softfloat_mul128By32
581 /*----------------------------------------------------------------------------
582 | Returns the product of the 128-bit integer formed by concatenating 'a64' and
583 | 'a0', multiplied by 'b'. The multiplication is modulo 2^128; any overflow
584 | bits are discarded.
585 *----------------------------------------------------------------------------*/
586 #if defined INLINE_LEVEL && (4 <= INLINE_LEVEL)
588 struct uint128
softfloat_mul128By32( uint64_t a64
, uint64_t a0
, uint32_t b
)
594 mid
= (uint_fast64_t) (uint32_t) (a0
>>32) * b
;
595 carry
= (uint32_t) ((uint_fast32_t) (z
.v0
>>32) - (uint_fast32_t) mid
);
596 z
.v64
= a64
* b
+ (uint_fast32_t) ((mid
+ carry
)>>32);
600 struct uint128
softfloat_mul128By32( uint64_t a64
, uint64_t a0
, uint32_t b
);
604 #ifndef softfloat_mul128To256M
605 /*----------------------------------------------------------------------------
606 | Multiplies the 128-bit unsigned integer formed by concatenating 'a64' and
607 | 'a0' by the 128-bit unsigned integer formed by concatenating 'b64' and
608 | 'b0'. The 256-bit product is stored at the location pointed to by 'zPtr'.
609 | Argument 'zPtr' points to an array of four 64-bit elements that concatenate
610 | in the platform's normal endian order to form a 256-bit integer.
611 *----------------------------------------------------------------------------*/
613 softfloat_mul128To256M(
614 uint64_t a64
, uint64_t a0
, uint64_t b64
, uint64_t b0
, uint64_t *zPtr
);
619 /*----------------------------------------------------------------------------
620 | The following functions are needed only when 'SOFTFLOAT_FAST_INT64' is not
622 *----------------------------------------------------------------------------*/
624 #ifndef softfloat_compare96M
625 /*----------------------------------------------------------------------------
626 | Compares the two 96-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
627 | Returns -1 if the first integer (A) is less than the second (B); returns 0
628 | if the two integers are equal; and returns +1 if the first integer (A)
629 | is greater than the second (B). (The result is thus the signum of A - B.)
630 | Each of 'aPtr' and 'bPtr' points to an array of three 32-bit elements that
631 | concatenate in the platform's normal endian order to form a 96-bit integer.
632 *----------------------------------------------------------------------------*/
633 int_fast8_t softfloat_compare96M( const uint32_t *aPtr
, const uint32_t *bPtr
);
636 #ifndef softfloat_compare128M
637 /*----------------------------------------------------------------------------
638 | Compares the two 128-bit unsigned integers pointed to by 'aPtr' and 'bPtr'.
639 | Returns -1 if the first integer (A) is less than the second (B); returns 0
640 | if the two integers are equal; and returns +1 if the first integer (A)
641 | is greater than the second (B). (The result is thus the signum of A - B.)
642 | Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
643 | concatenate in the platform's normal endian order to form a 128-bit integer.
644 *----------------------------------------------------------------------------*/
646 softfloat_compare128M( const uint32_t *aPtr
, const uint32_t *bPtr
);
649 #ifndef softfloat_shortShiftLeft64To96M
650 /*----------------------------------------------------------------------------
651 | Extends 'a' to 96 bits and shifts the value left by the number of bits given
652 | in 'dist', which must be in the range 1 to 31. The result is stored at the
653 | location pointed to by 'zPtr'. Argument 'zPtr' points to an array of three
654 | 32-bit elements that concatenate in the platform's normal endian order to
655 | form a 96-bit integer.
656 *----------------------------------------------------------------------------*/
657 #if defined INLINE_LEVEL && (2 <= INLINE_LEVEL)
660 softfloat_shortShiftLeft64To96M(
661 uint64_t a
, uint_fast8_t dist
, uint32_t *zPtr
)
663 zPtr
[indexWord( 3, 0 )] = (uint32_t) a
<<dist
;
665 zPtr
[indexWord( 3, 2 )] = a
>>32;
666 zPtr
[indexWord( 3, 1 )] = a
;
670 softfloat_shortShiftLeft64To96M(
671 uint64_t a
, uint_fast8_t dist
, uint32_t *zPtr
);
675 #ifndef softfloat_shortShiftLeftM
676 /*----------------------------------------------------------------------------
677 | Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
678 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
679 | must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
680 | shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
681 | of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
682 | that concatenate in the platform's normal endian order to form an N-bit
684 *----------------------------------------------------------------------------*/
686 softfloat_shortShiftLeftM(
687 uint_fast8_t size_words
,
688 const uint32_t *aPtr
,
694 #ifndef softfloat_shortShiftLeft96M
695 /*----------------------------------------------------------------------------
696 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
697 | 'size_words' = 3 (N = 96).
698 *----------------------------------------------------------------------------*/
699 #define softfloat_shortShiftLeft96M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 3, aPtr, dist, zPtr )
702 #ifndef softfloat_shortShiftLeft128M
703 /*----------------------------------------------------------------------------
704 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
705 | 'size_words' = 4 (N = 128).
706 *----------------------------------------------------------------------------*/
707 #define softfloat_shortShiftLeft128M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 4, aPtr, dist, zPtr )
710 #ifndef softfloat_shortShiftLeft160M
711 /*----------------------------------------------------------------------------
712 | This function or macro is the same as 'softfloat_shortShiftLeftM' with
713 | 'size_words' = 5 (N = 160).
714 *----------------------------------------------------------------------------*/
715 #define softfloat_shortShiftLeft160M( aPtr, dist, zPtr ) softfloat_shortShiftLeftM( 5, aPtr, dist, zPtr )
718 #ifndef softfloat_shiftLeftM
719 /*----------------------------------------------------------------------------
720 | Shifts the N-bit unsigned integer pointed to by 'aPtr' left by the number
721 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
722 | must not be zero. Any nonzero bits shifted off are lost. The shifted
723 | N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
724 | and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
725 | concatenate in the platform's normal endian order to form an N-bit integer.
726 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
727 | greater than N, the stored result will be 0.
728 *----------------------------------------------------------------------------*/
730 softfloat_shiftLeftM(
731 uint_fast8_t size_words
,
732 const uint32_t *aPtr
,
738 #ifndef softfloat_shiftLeft96M
739 /*----------------------------------------------------------------------------
740 | This function or macro is the same as 'softfloat_shiftLeftM' with
741 | 'size_words' = 3 (N = 96).
742 *----------------------------------------------------------------------------*/
743 #define softfloat_shiftLeft96M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 3, aPtr, dist, zPtr )
746 #ifndef softfloat_shiftLeft128M
747 /*----------------------------------------------------------------------------
748 | This function or macro is the same as 'softfloat_shiftLeftM' with
749 | 'size_words' = 4 (N = 128).
750 *----------------------------------------------------------------------------*/
751 #define softfloat_shiftLeft128M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 4, aPtr, dist, zPtr )
754 #ifndef softfloat_shiftLeft160M
755 /*----------------------------------------------------------------------------
756 | This function or macro is the same as 'softfloat_shiftLeftM' with
757 | 'size_words' = 5 (N = 160).
758 *----------------------------------------------------------------------------*/
759 #define softfloat_shiftLeft160M( aPtr, dist, zPtr ) softfloat_shiftLeftM( 5, aPtr, dist, zPtr )
762 #ifndef softfloat_shortShiftRightM
763 /*----------------------------------------------------------------------------
764 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
765 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
766 | must be in the range 1 to 31. Any nonzero bits shifted off are lost. The
767 | shifted N-bit result is stored at the location pointed to by 'zPtr'. Each
768 | of 'aPtr' and 'zPtr' points to a 'size_words'-long array of 32-bit elements
769 | that concatenate in the platform's normal endian order to form an N-bit
771 *----------------------------------------------------------------------------*/
773 softfloat_shortShiftRightM(
774 uint_fast8_t size_words
,
775 const uint32_t *aPtr
,
781 #ifndef softfloat_shortShiftRight128M
782 /*----------------------------------------------------------------------------
783 | This function or macro is the same as 'softfloat_shortShiftRightM' with
784 | 'size_words' = 4 (N = 128).
785 *----------------------------------------------------------------------------*/
786 #define softfloat_shortShiftRight128M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 4, aPtr, dist, zPtr )
789 #ifndef softfloat_shortShiftRight160M
790 /*----------------------------------------------------------------------------
791 | This function or macro is the same as 'softfloat_shortShiftRightM' with
792 | 'size_words' = 5 (N = 160).
793 *----------------------------------------------------------------------------*/
794 #define softfloat_shortShiftRight160M( aPtr, dist, zPtr ) softfloat_shortShiftRightM( 5, aPtr, dist, zPtr )
797 #ifndef softfloat_shortShiftRightJamM
798 /*----------------------------------------------------------------------------
799 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
800 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
801 | must be in the range 1 to 31. If any nonzero bits are shifted off, they are
802 | "jammed" into the least-significant bit of the shifted value by setting the
803 | least-significant bit to 1. This shifted-and-jammed N-bit result is stored
804 | at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
805 | to a 'size_words'-long array of 32-bit elements that concatenate in the
806 | platform's normal endian order to form an N-bit integer.
807 *----------------------------------------------------------------------------*/
809 softfloat_shortShiftRightJamM(
810 uint_fast8_t, const uint32_t *, uint_fast8_t, uint32_t * );
813 #ifndef softfloat_shortShiftRightJam160M
814 /*----------------------------------------------------------------------------
815 | This function or macro is the same as 'softfloat_shortShiftRightJamM' with
816 | 'size_words' = 5 (N = 160).
817 *----------------------------------------------------------------------------*/
818 #define softfloat_shortShiftRightJam160M( aPtr, dist, zPtr ) softfloat_shortShiftRightJamM( 5, aPtr, dist, zPtr )
821 #ifndef softfloat_shiftRightM
822 /*----------------------------------------------------------------------------
823 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
824 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
825 | must not be zero. Any nonzero bits shifted off are lost. The shifted
826 | N-bit result is stored at the location pointed to by 'zPtr'. Each of 'aPtr'
827 | and 'zPtr' points to a 'size_words'-long array of 32-bit elements that
828 | concatenate in the platform's normal endian order to form an N-bit integer.
829 | The value of 'dist' can be arbitrarily large. In particular, if 'dist' is
830 | greater than N, the stored result will be 0.
831 *----------------------------------------------------------------------------*/
833 softfloat_shiftRightM(
834 uint_fast8_t size_words
,
835 const uint32_t *aPtr
,
841 #ifndef softfloat_shiftRight96M
842 /*----------------------------------------------------------------------------
843 | This function or macro is the same as 'softfloat_shiftRightM' with
844 | 'size_words' = 3 (N = 96).
845 *----------------------------------------------------------------------------*/
846 #define softfloat_shiftRight96M( aPtr, dist, zPtr ) softfloat_shiftRightM( 3, aPtr, dist, zPtr )
849 #ifndef softfloat_shiftRightJamM
850 /*----------------------------------------------------------------------------
851 | Shifts the N-bit unsigned integer pointed to by 'aPtr' right by the number
852 | of bits given in 'dist', where N = 'size_words' * 32. The value of 'dist'
853 | must not be zero. If any nonzero bits are shifted off, they are "jammed"
854 | into the least-significant bit of the shifted value by setting the least-
855 | significant bit to 1. This shifted-and-jammed N-bit result is stored
856 | at the location pointed to by 'zPtr'. Each of 'aPtr' and 'zPtr' points
857 | to a 'size_words'-long array of 32-bit elements that concatenate in the
858 | platform's normal endian order to form an N-bit integer.
859 | The value of 'dist' can be arbitrarily large. In particular, if 'dist'
860 | is greater than N, the stored result will be either 0 or 1, depending on
861 | whether the original N bits are all zeros.
862 *----------------------------------------------------------------------------*/
864 softfloat_shiftRightJamM(
865 uint_fast8_t size_words
,
866 const uint32_t *aPtr
,
872 #ifndef softfloat_shiftRightJam96M
873 /*----------------------------------------------------------------------------
874 | This function or macro is the same as 'softfloat_shiftRightJamM' with
875 | 'size_words' = 3 (N = 96).
876 *----------------------------------------------------------------------------*/
877 #define softfloat_shiftRightJam96M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 3, aPtr, dist, zPtr )
880 #ifndef softfloat_shiftRightJam128M
881 /*----------------------------------------------------------------------------
882 | This function or macro is the same as 'softfloat_shiftRightJamM' with
883 | 'size_words' = 4 (N = 128).
884 *----------------------------------------------------------------------------*/
885 #define softfloat_shiftRightJam128M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 4, aPtr, dist, zPtr )
888 #ifndef softfloat_shiftRightJam160M
889 /*----------------------------------------------------------------------------
890 | This function or macro is the same as 'softfloat_shiftRightJamM' with
891 | 'size_words' = 5 (N = 160).
892 *----------------------------------------------------------------------------*/
893 #define softfloat_shiftRightJam160M( aPtr, dist, zPtr ) softfloat_shiftRightJamM( 5, aPtr, dist, zPtr )
896 #ifndef softfloat_addM
897 /*----------------------------------------------------------------------------
898 | Adds the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
899 | 'size_words' * 32. The addition is modulo 2^N, so any carry out is lost.
900 | The N-bit sum is stored at the location pointed to by 'zPtr'. Each of
901 | 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long array of 32-bit
902 | elements that concatenate in the platform's normal endian order to form an
904 *----------------------------------------------------------------------------*/
907 uint_fast8_t size_words
,
908 const uint32_t *aPtr
,
909 const uint32_t *bPtr
,
914 #ifndef softfloat_add96M
915 /*----------------------------------------------------------------------------
916 | This function or macro is the same as 'softfloat_addM' with 'size_words'
918 *----------------------------------------------------------------------------*/
919 #define softfloat_add96M( aPtr, bPtr, zPtr ) softfloat_addM( 3, aPtr, bPtr, zPtr )
922 #ifndef softfloat_add128M
923 /*----------------------------------------------------------------------------
924 | This function or macro is the same as 'softfloat_addM' with 'size_words'
926 *----------------------------------------------------------------------------*/
927 #define softfloat_add128M( aPtr, bPtr, zPtr ) softfloat_addM( 4, aPtr, bPtr, zPtr )
930 #ifndef softfloat_add160M
931 /*----------------------------------------------------------------------------
932 | This function or macro is the same as 'softfloat_addM' with 'size_words'
934 *----------------------------------------------------------------------------*/
935 #define softfloat_add160M( aPtr, bPtr, zPtr ) softfloat_addM( 5, aPtr, bPtr, zPtr )
938 #ifndef softfloat_addCarryM
939 /*----------------------------------------------------------------------------
940 | Adds the two N-bit unsigned integers pointed to by 'aPtr' and 'bPtr', where
941 | N = 'size_words' * 32, plus 'carry', which must be either 0 or 1. The N-bit
942 | sum (modulo 2^N) is stored at the location pointed to by 'zPtr', and any
943 | carry out is returned as the result. Each of 'aPtr', 'bPtr', and 'zPtr'
944 | points to a 'size_words'-long array of 32-bit elements that concatenate in
945 | the platform's normal endian order to form an N-bit integer.
946 *----------------------------------------------------------------------------*/
949 uint_fast8_t size_words
,
950 const uint32_t *aPtr
,
951 const uint32_t *bPtr
,
957 #ifndef softfloat_addComplCarryM
958 /*----------------------------------------------------------------------------
959 | This function or macro is the same as 'softfloat_addCarryM', except that
960 | the value of the unsigned integer pointed to by 'bPtr' is bit-wise completed
961 | before the addition.
962 *----------------------------------------------------------------------------*/
964 softfloat_addComplCarryM(
965 uint_fast8_t size_words
,
966 const uint32_t *aPtr
,
967 const uint32_t *bPtr
,
973 #ifndef softfloat_addComplCarry96M
974 /*----------------------------------------------------------------------------
975 | This function or macro is the same as 'softfloat_addComplCarryM' with
976 | 'size_words' = 3 (N = 96).
977 *----------------------------------------------------------------------------*/
978 #define softfloat_addComplCarry96M( aPtr, bPtr, carry, zPtr ) softfloat_addComplCarryM( 3, aPtr, bPtr, carry, zPtr )
981 #ifndef softfloat_negXM
982 /*----------------------------------------------------------------------------
983 | Replaces the N-bit unsigned integer pointed to by 'zPtr' by the
984 | 2s-complement of itself, where N = 'size_words' * 32. Argument 'zPtr'
985 | points to a 'size_words'-long array of 32-bit elements that concatenate in
986 | the platform's normal endian order to form an N-bit integer.
987 *----------------------------------------------------------------------------*/
988 void softfloat_negXM( uint_fast8_t size_words
, uint32_t *zPtr
);
991 #ifndef softfloat_negX96M
992 /*----------------------------------------------------------------------------
993 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
995 *----------------------------------------------------------------------------*/
996 #define softfloat_negX96M( zPtr ) softfloat_negXM( 3, zPtr )
999 #ifndef softfloat_negX128M
1000 /*----------------------------------------------------------------------------
1001 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
1003 *----------------------------------------------------------------------------*/
1004 #define softfloat_negX128M( zPtr ) softfloat_negXM( 4, zPtr )
1007 #ifndef softfloat_negX160M
1008 /*----------------------------------------------------------------------------
1009 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
1011 *----------------------------------------------------------------------------*/
1012 #define softfloat_negX160M( zPtr ) softfloat_negXM( 5, zPtr )
1015 #ifndef softfloat_negX256M
1016 /*----------------------------------------------------------------------------
1017 | This function or macro is the same as 'softfloat_negXM' with 'size_words'
1019 *----------------------------------------------------------------------------*/
1020 #define softfloat_negX256M( zPtr ) softfloat_negXM( 8, zPtr )
1023 #ifndef softfloat_sub1XM
1024 /*----------------------------------------------------------------------------
1025 | Subtracts 1 from the N-bit integer pointed to by 'zPtr', where N =
1026 | 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
1027 | out) is lost. Argument 'zPtr' points to a 'size_words'-long array of 32-bit
1028 | elements that concatenate in the platform's normal endian order to form an
1030 *----------------------------------------------------------------------------*/
1031 void softfloat_sub1XM( uint_fast8_t size_words
, uint32_t *zPtr
);
1034 #ifndef softfloat_sub1X96M
1035 /*----------------------------------------------------------------------------
1036 | This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
1038 *----------------------------------------------------------------------------*/
1039 #define softfloat_sub1X96M( zPtr ) softfloat_sub1XM( 3, zPtr )
1042 #ifndef softfloat_sub1X160M
1043 /*----------------------------------------------------------------------------
1044 | This function or macro is the same as 'softfloat_sub1XM' with 'size_words'
1046 *----------------------------------------------------------------------------*/
1047 #define softfloat_sub1X160M( zPtr ) softfloat_sub1XM( 5, zPtr )
1050 #ifndef softfloat_subM
1051 /*----------------------------------------------------------------------------
1052 | Subtracts the two N-bit integers pointed to by 'aPtr' and 'bPtr', where N =
1053 | 'size_words' * 32. The subtraction is modulo 2^N, so any borrow out (carry
1054 | out) is lost. The N-bit difference is stored at the location pointed to by
1055 | 'zPtr'. Each of 'aPtr', 'bPtr', and 'zPtr' points to a 'size_words'-long
1056 | array of 32-bit elements that concatenate in the platform's normal endian
1057 | order to form an N-bit integer.
1058 *----------------------------------------------------------------------------*/
1061 uint_fast8_t size_words
,
1062 const uint32_t *aPtr
,
1063 const uint32_t *bPtr
,
1068 #ifndef softfloat_sub96M
1069 /*----------------------------------------------------------------------------
1070 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1072 *----------------------------------------------------------------------------*/
1073 #define softfloat_sub96M( aPtr, bPtr, zPtr ) softfloat_subM( 3, aPtr, bPtr, zPtr )
1076 #ifndef softfloat_sub128M
1077 /*----------------------------------------------------------------------------
1078 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1080 *----------------------------------------------------------------------------*/
1081 #define softfloat_sub128M( aPtr, bPtr, zPtr ) softfloat_subM( 4, aPtr, bPtr, zPtr )
1084 #ifndef softfloat_sub160M
1085 /*----------------------------------------------------------------------------
1086 | This function or macro is the same as 'softfloat_subM' with 'size_words'
1088 *----------------------------------------------------------------------------*/
1089 #define softfloat_sub160M( aPtr, bPtr, zPtr ) softfloat_subM( 5, aPtr, bPtr, zPtr )
1092 #ifndef softfloat_mul64To128M
1093 /*----------------------------------------------------------------------------
1094 | Multiplies 'a' and 'b' and stores the 128-bit product at the location
1095 | pointed to by 'zPtr'. Argument 'zPtr' points to an array of four 32-bit
1096 | elements that concatenate in the platform's normal endian order to form a
1098 *----------------------------------------------------------------------------*/
1099 void softfloat_mul64To128M( uint64_t a
, uint64_t b
, uint32_t *zPtr
);
1102 #ifndef softfloat_mul128MTo256M
1103 /*----------------------------------------------------------------------------
1104 | Multiplies the two 128-bit unsigned integers pointed to by 'aPtr' and
1105 | 'bPtr', and stores the 256-bit product at the location pointed to by 'zPtr'.
1106 | Each of 'aPtr' and 'bPtr' points to an array of four 32-bit elements that
1107 | concatenate in the platform's normal endian order to form a 128-bit integer.
1108 | Argument 'zPtr' points to an array of eight 32-bit elements that concatenate
1109 | to form a 256-bit integer.
1110 *----------------------------------------------------------------------------*/
1112 softfloat_mul128MTo256M(
1113 const uint32_t *aPtr
, const uint32_t *bPtr
, uint32_t *zPtr
);
1116 #ifndef softfloat_remStepMBy32
1117 /*----------------------------------------------------------------------------
1118 | Performs a "remainder reduction step" as follows: Arguments 'remPtr' and
1119 | 'bPtr' both point to N-bit unsigned integers, where N = 'size_words' * 32.
1120 | Defining R and B as the values of those integers, the expression (R<<'dist')
1121 | - B * q is computed modulo 2^N, and the N-bit result is stored at the
1122 | location pointed to by 'zPtr'. Each of 'remPtr', 'bPtr', and 'zPtr' points
1123 | to a 'size_words'-long array of 32-bit elements that concatenate in the
1124 | platform's normal endian order to form an N-bit integer.
1125 *----------------------------------------------------------------------------*/
1127 softfloat_remStepMBy32(
1128 uint_fast8_t size_words
,
1129 const uint32_t *remPtr
,
1131 const uint32_t *bPtr
,
1137 #ifndef softfloat_remStep96MBy32
1138 /*----------------------------------------------------------------------------
1139 | This function or macro is the same as 'softfloat_remStepMBy32' with
1140 | 'size_words' = 3 (N = 96).
1141 *----------------------------------------------------------------------------*/
1142 #define softfloat_remStep96MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 3, remPtr, dist, bPtr, q, zPtr )
1145 #ifndef softfloat_remStep128MBy32
1146 /*----------------------------------------------------------------------------
1147 | This function or macro is the same as 'softfloat_remStepMBy32' with
1148 | 'size_words' = 4 (N = 128).
1149 *----------------------------------------------------------------------------*/
1150 #define softfloat_remStep128MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 4, remPtr, dist, bPtr, q, zPtr )
1153 #ifndef softfloat_remStep160MBy32
1154 /*----------------------------------------------------------------------------
1155 | This function or macro is the same as 'softfloat_remStepMBy32' with
1156 | 'size_words' = 5 (N = 160).
1157 *----------------------------------------------------------------------------*/
1158 #define softfloat_remStep160MBy32( remPtr, dist, bPtr, q, zPtr ) softfloat_remStepMBy32( 5, remPtr, dist, bPtr, q, zPtr )