• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/arch/x86/math-emu/

Lines Matching refs:st0_ptr

33 static int trig_arg(FPU_REG *st0_ptr, int even)
41 if (exponent(st0_ptr) >= 63) {
49 setpositive(st0_ptr);
50 tag = FPU_u_div(st0_ptr, &CONST_PI2, &tmp, PR_64_BITS | RC_CHOP | 0x3f,
57 rem_kernel(significand(st0_ptr),
60 q, exponent(st0_ptr) - exponent(&CONST_PI2));
76 if ((exponent(st0_ptr) <= exponent(&CONST_PI2extra) + 64)
91 if (signnegative(st0_ptr)) {
96 setpositive(st0_ptr);
109 && (exponent(st0_ptr) <= exponent(&CONST_PI2extra) + 64))
125 if ((exponent(st0_ptr) == exponent(&CONST_PI2)) &&
126 ((st0_ptr->sigh > CONST_PI2.sigh)
127 || ((st0_ptr->sigh == CONST_PI2.sigh)
128 && (st0_ptr->sigl > CONST_PI2.sigl)))) {
179 static void single_arg_error(FPU_REG *st0_ptr, u_char st0_tag)
184 real_1op_NaN(st0_ptr); /* return with a NaN in st(0) */
191 static void single_arg_2_error(FPU_REG *st0_ptr, u_char st0_tag)
197 isNaN = (exponent(st0_ptr) == EXP_OVER)
198 && (st0_ptr->sigh & 0x80000000);
199 if (isNaN && !(st0_ptr->sigh & 0x40000000)) { /* Signaling ? */
204 st0_ptr->sigh |= 0x40000000;
206 FPU_copy_to_reg0(st0_ptr, TAG_Special);
211 FPU_copy_to_reg0(st0_ptr, TAG_Special);
232 static void f2xm1(FPU_REG *st0_ptr, u_char tag)
240 if (exponent(st0_ptr) < 0) {
243 FPU_to_exp16(st0_ptr, &a);
246 poly_2xm1(getsign(st0_ptr), &a, st0_ptr);
256 tag = FPU_Special(st0_ptr);
264 if (signnegative(st0_ptr)) {
267 setnegative(st0_ptr);
271 single_arg_error(st0_ptr, tag);
275 static void fptan(FPU_REG *st0_ptr, u_char st0_tag)
279 u_char arg_sign = getsign(st0_ptr);
298 if (exponent(st0_ptr) > -40) {
299 if ((q = trig_arg(st0_ptr, 0)) == -1) {
304 poly_tan(st0_ptr);
305 setsign(st0_ptr, (q & 1) ^ (arg_sign != 0));
313 FPU_to_exp16(st0_ptr, st0_ptr);
316 FPU_round(st0_ptr, 1, 0, FULL_PRECISION, arg_sign);
332 st0_tag = FPU_Special(st0_ptr);
351 single_arg_2_error(st0_ptr, st0_tag);
354 static void fxtract(FPU_REG *st0_ptr, u_char st0_tag)
358 register FPU_REG *st1_ptr = st0_ptr; /* anticipate */
384 sign = getsign(st0_ptr);
396 st0_tag = FPU_Special(st0_ptr);
407 sign = getsign(st0_ptr);
408 setpositive(st0_ptr);
414 if (real_1op_NaN(st0_ptr) < 0)
418 FPU_copy_to_reg0(st0_ptr, TAG_Special);
447 static void fsqrt_(FPU_REG *st0_ptr, u_char st0_tag)
456 if (signnegative(st0_ptr)) {
462 expon = exponent(st0_ptr);
466 setexponent16(st0_ptr, (expon & 1));
469 tag = wm_sqrt(st0_ptr, 0, 0, control_word, SIGN_POS);
470 addexponent(st0_ptr, expon >> 1);
479 st0_tag = FPU_Special(st0_ptr);
482 if (signnegative(st0_ptr))
486 if (signnegative(st0_ptr)) {
494 FPU_to_exp16(st0_ptr, st0_ptr);
496 expon = exponent16(st0_ptr);
501 single_arg_error(st0_ptr, st0_tag);
505 static void frndint_(FPU_REG *st0_ptr, u_char st0_tag)
514 sign = getsign(st0_ptr);
516 if (exponent(st0_ptr) > 63)
525 if ((flags = FPU_round_to_int(st0_ptr, st0_tag)))
528 setexponent16(st0_ptr, 63);
529 tag = FPU_normalize(st0_ptr);
530 setsign(st0_ptr, sign);
539 st0_tag = FPU_Special(st0_ptr);
546 single_arg_error(st0_ptr, st0_tag);
549 static int fsin(FPU_REG *st0_ptr, u_char tag)
551 u_char arg_sign = getsign(st0_ptr);
556 if (exponent(st0_ptr) > -40) {
557 if ((q = trig_arg(st0_ptr, 0)) == -1) {
562 poly_sine(st0_ptr);
565 changesign(st0_ptr);
567 setsign(st0_ptr, getsign(st0_ptr) ^ arg_sign);
585 tag = FPU_Special(st0_ptr);
593 FPU_to_exp16(st0_ptr, st0_ptr);
595 tag = FPU_round(st0_ptr, 1, 0, FULL_PRECISION, arg_sign);
605 single_arg_error(st0_ptr, tag);
610 static int f_cos(FPU_REG *st0_ptr, u_char tag)
614 st0_sign = getsign(st0_ptr);
619 if (exponent(st0_ptr) > -40) {
620 if ((exponent(st0_ptr) < 0)
621 || ((exponent(st0_ptr) == 0)
622 && (significand(st0_ptr) <=
624 poly_cos(st0_ptr);
630 } else if ((q = trig_arg(st0_ptr, FCOS)) != -1) {
631 poly_sine(st0_ptr);
634 changesign(st0_ptr);
663 tag = FPU_Special(st0_ptr);
675 single_arg_error(st0_ptr, tag); /* requires st0_ptr == &st(0) */
680 static void fcos(FPU_REG *st0_ptr, u_char st0_tag)
682 f_cos(st0_ptr, st0_tag);
685 static void fsincos(FPU_REG *st0_ptr, u_char st0_tag)
708 tag = FPU_Special(st0_ptr);
713 single_arg_2_error(st0_ptr, TW_NaN);
725 reg_copy(st0_ptr, &arg);
726 if (!fsin(st0_ptr, st0_tag)) {
778 static void do_fprem(FPU_REG *st0_ptr, u_char st0_tag, int round)
796 st0_sign = FPU_to_exp16(st0_ptr, &st0);
930 reg_copy(&tmp, st0_ptr);
937 tag = arith_underflow(st0_ptr);
938 setsign(st0_ptr, st0_sign);
942 stdexp(st0_ptr);
943 setsign(st0_ptr, st0_sign);
946 FPU_round(st0_ptr, 0, 0, FULL_PRECISION, st0_sign);
955 st0_tag = FPU_Special(st0_ptr);
1020 static void fyl2x(FPU_REG *st0_ptr, u_char st0_tag)
1032 if (signpositive(st0_ptr)) {
1034 FPU_to_exp16(st0_ptr, st0_ptr);
1037 setexponent16(st0_ptr, exponent(st0_ptr));
1039 if ((st0_ptr->sigh == 0x80000000)
1040 && (st0_ptr->sigl == 0)) {
1043 e = exponent16(st0_ptr);
1069 poly_l2(st0_ptr, st1_ptr, sign);
1083 st0_tag = FPU_Special(st0_ptr);
1109 if (signnegative(st0_ptr)) {
1117 if (exponent(st0_ptr) < 0)
1130 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) < 0)
1135 if ((signnegative(st0_ptr)) || (st1_tag == TAG_Zero)) {
1152 && (signpositive(st0_ptr))) {
1153 if (exponent(st0_ptr) >= 0) {
1154 if ((exponent(st0_ptr) == 0) &&
1155 (st0_ptr->sigh == 0x80000000) &&
1156 (st0_ptr->sigl == 0)) {
1191 static void fpatan(FPU_REG *st0_ptr, u_char st0_tag)
1201 poly_atan(st0_ptr, st0_tag, st1_ptr, st1_tag);
1209 st0_tag = FPU_Special(st0_ptr);
1224 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) >= 0)
1231 if (signpositive(st0_ptr)) {
1249 if (signpositive(st0_ptr)) {
1274 if (signpositive(st0_ptr)) {
1301 static void fprem(FPU_REG *st0_ptr, u_char st0_tag)
1303 do_fprem(st0_ptr, st0_tag, RC_CHOP);
1306 static void fprem1(FPU_REG *st0_ptr, u_char st0_tag)
1308 do_fprem(st0_ptr, st0_tag, RC_RND);
1311 static void fyl2xp1(FPU_REG *st0_ptr, u_char st0_tag)
1321 sign = getsign(st0_ptr);
1324 FPU_to_exp16(st0_ptr, &a);
1335 st0_tag = FPU_Special(st0_ptr);
1357 setsign(st0_ptr, getsign(st0_ptr) ^ getsign(st1_ptr));
1358 FPU_copy_to_reg1(st0_ptr, st0_tag);
1368 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) < 0)
1382 if (signnegative(st0_ptr)) {
1383 if (exponent(st0_ptr) >= 0) {
1402 if (signnegative(st0_ptr)) {
1403 if ((exponent(st0_ptr) >= 0) &&
1404 !((st0_ptr->sigh == 0x80000000) &&
1405 (st0_ptr->sigl == 0))) {
1424 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) < 0)
1429 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) < 0)
1433 if (real_2op_NaN(st0_ptr, st0_tag, 1, st0_ptr) < 0)
1435 } else if (signnegative(st0_ptr)) {
1480 static void fscale(FPU_REG *st0_ptr, u_char st0_tag)
1485 u_char sign = getsign(st0_ptr);
1493 setexponent16(st0_ptr, exponent(st0_ptr));
1507 setsign(st0_ptr, sign);
1517 scale += exponent16(st0_ptr);
1519 setexponent16(st0_ptr, scale);
1522 FPU_round(st0_ptr, 0, 0, control_word, sign);
1528 st0_tag = FPU_Special(st0_ptr);
1540 FPU_to_exp16(st0_ptr, st0_ptr); /* Will not be left on stack */
1561 setsign(st0_ptr, sign);
1565 real_2op_NaN(st1_ptr, st1_tag, 0, st0_ptr);
1584 real_2op_NaN(st1_ptr, st1_tag, 0, st0_ptr);
1603 real_2op_NaN(st1_ptr, st1_tag, 0, st0_ptr);
1608 real_2op_NaN(st1_ptr, st1_tag, 0, st0_ptr);