Lines Matching +full:e +full:- +full:book

1 // SPDX-License-Identifier: GPL-2.0
2 /*---------------------------------------------------------------------------+
9 | E-mail billm@suburbia.net |
12 +---------------------------------------------------------------------------*/
14 /*---------------------------------------------------------------------------+
19 +---------------------------------------------------------------------------*/
33 #define DOUBLE_Emin (-1022) /* smallest valid exponent */
37 #define SINGLE_Emin (-126) /* smallest valid exponent */
59 if (!(ptr->sigh | ptr->sigl)) { in FPU_tagof()
62 /* The number is a de-normal or pseudodenormal. */ in FPU_tagof()
71 if (!(ptr->sigh & 0x80000000)) { in FPU_tagof()
107 exp = ((m64 & 0x7ff00000) >> 20) - DOUBLE_Ebias + EXTENDED_Ebias; in FPU_load_double()
112 /* +- infinity */ in FPU_load_double()
113 loaded_data->sigh = 0x80000000; in FPU_load_double()
114 loaded_data->sigl = 0x00000000; in FPU_load_double()
120 loaded_data->sigh = (m64 << 11) | 0x80000000; in FPU_load_double()
121 loaded_data->sigh |= l64 >> 21; in FPU_load_double()
122 loaded_data->sigl = l64 << 11; in FPU_load_double()
126 /* Zero or de-normal */ in FPU_load_double()
133 /* De-normal */ in FPU_load_double()
134 loaded_data->sigh = m64 << 11; in FPU_load_double()
135 loaded_data->sigh |= l64 >> 21; in FPU_load_double()
136 loaded_data->sigl = l64 << 11; in FPU_load_double()
143 loaded_data->sigh = (m64 << 11) | 0x80000000; in FPU_load_double()
144 loaded_data->sigh |= l64 >> 21; in FPU_load_double()
145 loaded_data->sigl = l64 << 11; in FPU_load_double()
174 exp = ((m32 & 0x7f800000) >> 23) - SINGLE_Ebias + EXTENDED_Ebias; in FPU_load_single()
177 /* De-normals */ in FPU_load_single()
178 loaded_data->sigh = m32; in FPU_load_single()
179 loaded_data->sigl = 0; in FPU_load_single()
186 /* +- infinity */ in FPU_load_single()
187 loaded_data->sigh = 0x80000000; in FPU_load_single()
188 loaded_data->sigl = 0x00000000; in FPU_load_single()
194 loaded_data->sigh = m32 | 0x80000000; in FPU_load_single()
195 loaded_data->sigl = 0; in FPU_load_single()
199 loaded_data->sigh = m32 | 0x80000000; in FPU_load_single()
200 loaded_data->sigl = 0; in FPU_load_single()
230 s = -s; in FPU_load_int64()
258 s = -s; in FPU_load_int32()
262 loaded_data->sigh = s; in FPU_load_int32()
263 loaded_data->sigl = 0; in FPU_load_int32()
287 s = -s; in FPU_load_int16()
291 loaded_data->sigh = s << 16; in FPU_load_int16()
292 loaded_data->sigl = 0; in FPU_load_int16()
309 for (pos = 8; pos >= 0; pos--) { in FPU_load_bcd()
342 extended format is the Invalid Stack exception, i.e. in FPU_store_extended()
350 FPU_put_user(st0_ptr->sigl, (unsigned long __user *)d); in FPU_store_extended()
351 FPU_put_user(st0_ptr->sigh, in FPU_store_extended()
394 addexponent(&tmp, -DOUBLE_Emin + 52); /* largest exp to be 51 */ in FPU_store_double()
398 /* Did it round to a non-denormal ? */ in FPU_store_double()
404 && (st0_ptr->sigl & 0x000007ff))) in FPU_store_double()
409 the 80486 book */ in FPU_store_double()
426 ((tmp.sigl & 0xc00) == 0xc00); /* odd -> even */ in FPU_store_double()
428 case RC_DOWN: /* towards -infinity */ in FPU_store_double()
479 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ in FPU_store_double()
513 && (st0_ptr->sigh & 0x80000000)) { in FPU_store_double()
516 (st0_ptr->sigl >> 11) | (st0_ptr-> in FPU_store_double()
518 l[1] = ((st0_ptr->sigh >> 11) & 0xfffff); in FPU_store_double()
519 if (!(st0_ptr->sigh & 0x40000000)) { in FPU_store_double()
578 addexponent(&tmp, -SINGLE_Emin + 23); /* largest exp to be 22 */ in FPU_store_single()
584 /* Did it round to a non-denormal ? */ in FPU_store_single()
589 ((st0_ptr->sigh & 0x000000ff) in FPU_store_single()
590 || st0_ptr->sigl))) in FPU_store_single()
595 the 80486 book */ in FPU_store_single()
616 case RC_DOWN: /* towards -infinity */ in FPU_store_single()
660 /* This is a special case: see sec 16.2.5.1 of the 80486 book. */ in FPU_store_single()
695 && (st0_ptr->sigh & 0x80000000)) { in FPU_store_single()
697 templ = st0_ptr->sigh >> 8; in FPU_store_single()
698 if (!(st0_ptr->sigh & 0x40000000)) { in FPU_store_single()
779 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ in FPU_store_int64()
790 tll = -tll; in FPU_store_int64()
826 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ in FPU_store_int32()
837 t.sigl = -(long)t.sigl; in FPU_store_int32()
872 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ in FPU_store_int16()
883 t.sigl = -t.sigl; in FPU_store_int16()
923 /* This is a special case: see sec 16.2.5.1 of the 80486 book */ in FPU_store_bcd()
966 a non-zero value is returned */
967 /* Overflow is signaled by a non-zero return value (in eax).
982 r->sigl = r->sigh = ~0; /* The largest representable number */ in FPU_round_to_int()
986 eax = FPU_shrxs(&r->sigl, 63 - exponent(r)); in FPU_round_to_int()
987 very_big = !(~(r->sigh) | ~(r->sigl)); /* test for 0xfff...fff */ in FPU_round_to_int()
994 || (half_or_more && (r->sigl & 1))) { /* odd -> even */ in FPU_round_to_int()
1098 if (exponent(&fpu_register(i)) == -EXTENDED_Ebias) { in fldenv()
1106 0x7fff - EXTENDED_Ebias) { in fldenv()
1111 FPU_settag(i, TAG_Special); /* An Un-normal */ in fldenv()
1124 int offset = (top & 7) * 10, other = 80 - offset; in FPU_frstor()
1137 /* The loaded data over-rides all other cases. */ in FPU_frstor()
1184 I387->soft.fcs &= ~0xf8000000; in fstenv()
1185 I387->soft.fos |= 0xffff0000; in fstenv()
1202 int offset = (top & 7) * 10, other = 80 - offset; in fsave()