Lines Matching +full:half +full:- +full:bit
1 /* SPDX-License-Identifier: GPL-2.0 */
3 /*---------------------------------------------------------------------------+
10 | Australia. E-mail [email protected] |
20 | Return value is the tag of the answer, or-ed with FPU_Exception if |
21 | one was raised, or -1 on internal error. |
26 +---------------------------------------------------------------------------*/
28 /*---------------------------------------------------------------------------+
32 | %eax:%ebx 64 bit significand |
33 | %edx 32 bit extension of the significand |
47 | must be non-zero. |
48 | If the significand extension is non-zero then the significand is |
50 | greater than zero and less than one ls bit of the significand. |
52 | non-zero values: |
54 | bit smaller than the magnitude of the |
56 | exactly 0x80000000 <=> the significand is exactly 1/2 an ls bit |
60 | bit smaller than the magnitude of the |
63 +---------------------------------------------------------------------------*/
65 /*---------------------------------------------------------------------------+
70 | a real FPU. These require a bit more thought because at this stage the |
73 +---------------------------------------------------------------------------*/
90 /* Make the code re-entrant by putting
96 /* Not re-entrant, so we can gain speed by putting
138 jle L_Make_denorm /* The number is a de-normal */
140 movb $0,FPU_denormal /* 0 -> not a de-normal */
171 /* Round etc to 24 bit precision */
184 cmpl RC_DOWN,%ecx /* Towards -infinity */
210 /* Do rounding of the 24th bit if needed (nearest or even) */
214 jc LCheck_truncate_24 /* less than half, no increment needed */
216 jne LGreater_Half_24 /* greater than half, increment needed */
218 /* Possibly half, we need to check the ls bits */
220 jnz LGreater_Half_24 /* greater than half, increment needed */
223 jnz LGreater_Half_24 /* greater than half, increment needed */
225 /* Exactly half, increment only if 24th bit is 1 (round to even) */
229 LGreater_Half_24: /* Rounding: increment at the 24th bit */
251 /* Round etc to 53 bit precision */
264 cmpl RC_DOWN,%ecx /* Towards -infinity */
289 /* Do rounding of the 53rd bit if needed (nearest or even) */
293 jc LCheck_truncate_53 /* less than half, no increment needed */
295 jnz LGreater_Half_53 /* greater than half, increment needed */
297 /* Possibly half, we need to check the ls bits */
299 jnz LGreater_Half_53 /* greater than half, increment needed */
301 /* Exactly half, increment only if 53rd bit is 1 (round to even) */
305 LGreater_Half_53: /* Rounding: increment at the 53rd bit */
325 /* Round etc to 64 bit precision */
338 cmpl RC_DOWN,%ecx /* Towards -infinity */
367 /* Now test for round-to-even */
445 * round-up.
493 * is for a small de-normalising shift.
498 setne %ch /* Save whether %edx is non-zero */
533 /* Exactly 64 bit shift */
550 /* This is easy, %eax must be non-zero, so.. */
563 /* Undo the de-normalisation. */
645 /* The number may have been changed to a non-denormal */
707 mov $-1,%eax