Lines Matching +full:0 +full:xf002
21 #define FPSCR_RCHG 0x00000000
32 asm volatile("sts.l fpul, @-%0\n\t" in save_fpu()
33 "sts.l fpscr, @-%0\n\t" in save_fpu()
34 "fmov.s fr15, @-%0\n\t" in save_fpu()
35 "fmov.s fr14, @-%0\n\t" in save_fpu()
36 "fmov.s fr13, @-%0\n\t" in save_fpu()
37 "fmov.s fr12, @-%0\n\t" in save_fpu()
38 "fmov.s fr11, @-%0\n\t" in save_fpu()
39 "fmov.s fr10, @-%0\n\t" in save_fpu()
40 "fmov.s fr9, @-%0\n\t" in save_fpu()
41 "fmov.s fr8, @-%0\n\t" in save_fpu()
42 "fmov.s fr7, @-%0\n\t" in save_fpu()
43 "fmov.s fr6, @-%0\n\t" in save_fpu()
44 "fmov.s fr5, @-%0\n\t" in save_fpu()
45 "fmov.s fr4, @-%0\n\t" in save_fpu()
46 "fmov.s fr3, @-%0\n\t" in save_fpu()
47 "fmov.s fr2, @-%0\n\t" in save_fpu()
48 "fmov.s fr1, @-%0\n\t" in save_fpu()
49 "fmov.s fr0, @-%0\n\t" in save_fpu()
52 : "0" ((char *)(&tsk->thread.xstate->hardfpu.status)), in save_fpu()
65 asm volatile("fmov.s @%0+, fr0\n\t" in restore_fpu()
66 "fmov.s @%0+, fr1\n\t" in restore_fpu()
67 "fmov.s @%0+, fr2\n\t" in restore_fpu()
68 "fmov.s @%0+, fr3\n\t" in restore_fpu()
69 "fmov.s @%0+, fr4\n\t" in restore_fpu()
70 "fmov.s @%0+, fr5\n\t" in restore_fpu()
71 "fmov.s @%0+, fr6\n\t" in restore_fpu()
72 "fmov.s @%0+, fr7\n\t" in restore_fpu()
73 "fmov.s @%0+, fr8\n\t" in restore_fpu()
74 "fmov.s @%0+, fr9\n\t" in restore_fpu()
75 "fmov.s @%0+, fr10\n\t" in restore_fpu()
76 "fmov.s @%0+, fr11\n\t" in restore_fpu()
77 "fmov.s @%0+, fr12\n\t" in restore_fpu()
78 "fmov.s @%0+, fr13\n\t" in restore_fpu()
79 "fmov.s @%0+, fr14\n\t" in restore_fpu()
80 "fmov.s @%0+, fr15\n\t" in restore_fpu()
81 "lds.l @%0+, fpscr\n\t" in restore_fpu()
82 "lds.l @%0+, fpul\n\t" in restore_fpu()
84 : "0" (tsk->thread.xstate), "r" (FPSCR_RCHG) in restore_fpu()
100 ix = hx & 0x7fffffff; in denormal_mulf()
101 iy = hy & 0x7fffffff; in denormal_mulf()
102 if (iy < 0x00800000 || ix == 0) in denormal_mulf()
103 return ((hx ^ hy) & 0x80000000); in denormal_mulf()
105 exp = (iy & 0x7f800000) >> 23; in denormal_mulf()
106 ix &= 0x007fffff; in denormal_mulf()
107 iy = (iy & 0x007fffff) | 0x00800000; in denormal_mulf()
115 if (exp > 0) in denormal_mulf()
116 ix = ((int) (m >> (w - 23)) & 0x007fffff) | (exp << 23); in denormal_mulf()
117 else if (exp + 22 >= 0) in denormal_mulf()
118 ix = (int) (m >> (w - 22 - exp)) & 0x007fffff; in denormal_mulf()
120 ix = 0; in denormal_mulf()
122 ix |= (hx ^ hy) & 0x80000000; in denormal_mulf()
134 sub1 = (x & 0xffffffffLL) * (unsigned long) (y >> 32); in mult64()
135 sub2 = (x >> 32) * (unsigned long) (y & 0xffffffffLL); in mult64()
136 sub3 = (x & 0xffffffffLL) * (unsigned long) (y & 0xffffffffLL); in mult64()
138 high = 0LL; in mult64()
167 ix = hx & 0x7fffffffffffffffLL; in denormal_muld()
168 iy = hy & 0x7fffffffffffffffLL; in denormal_muld()
169 if (iy < 0x0010000000000000LL || ix == 0) in denormal_muld()
170 return ((hx ^ hy) & 0x8000000000000000LL); in denormal_muld()
172 exp = (iy & 0x7ff0000000000000LL) >> 52; in denormal_muld()
173 ix &= 0x000fffffffffffffLL; in denormal_muld()
174 iy = (iy & 0x000fffffffffffffLL) | 0x0010000000000000LL; in denormal_muld()
187 if (exp > 0) in denormal_muld()
188 ix = (rshift64(mh, ml, w - 52) & 0x000fffffffffffffLL) in denormal_muld()
190 else if (exp + 51 >= 0) in denormal_muld()
191 ix = rshift64(mh, ml, w - 51 - exp) & 0x000fffffffffffffLL; in denormal_muld()
193 ix = 0; in denormal_muld()
195 ix |= (hx ^ hy) & 0x8000000000000000LL; in denormal_muld()
199 /* ix - iy where iy: denormal and ix, iy >= 0 */
205 if (ix < 0x00800000) in denormal_subf1()
208 exp = (ix & 0x7f800000) >> 23; in denormal_subf1()
212 if (iy == 0) in denormal_subf1()
215 frac = (ix & 0x007fffff) | 0x00800000; in denormal_subf1()
217 while (frac < 0x00800000) { in denormal_subf1()
218 if (--exp == 0) in denormal_subf1()
223 return (exp << 23) | (frac & 0x007fffff); in denormal_subf1()
226 /* ix + iy where iy: denormal and ix, iy >= 0 */
232 if (ix < 0x00800000) in denormal_addf1()
235 exp = (ix & 0x7f800000) >> 23; in denormal_addf1()
239 if (iy == 0) in denormal_addf1()
242 frac = (ix & 0x007fffff) | 0x00800000; in denormal_addf1()
244 if (frac >= 0x01000000) { in denormal_addf1()
249 return (exp << 23) | (frac & 0x007fffff); in denormal_addf1()
257 if ((hx ^ hy) & 0x80000000) { in denormal_addf()
258 sign = hx & 0x80000000; in denormal_addf()
259 ix = hx & 0x7fffffff; in denormal_addf()
260 iy = hy & 0x7fffffff; in denormal_addf()
261 if (iy < 0x00800000) { in denormal_addf()
263 if ((int) ix < 0) { in denormal_addf()
265 sign ^= 0x80000000; in denormal_addf()
269 sign ^= 0x80000000; in denormal_addf()
272 sign = hx & 0x80000000; in denormal_addf()
273 ix = hx & 0x7fffffff; in denormal_addf()
274 iy = hy & 0x7fffffff; in denormal_addf()
275 if (iy < 0x00800000) in denormal_addf()
284 /* ix - iy where iy: denormal and ix, iy >= 0 */
290 if (ix < 0x0010000000000000LL) in denormal_subd1()
293 exp = (ix & 0x7ff0000000000000LL) >> 52; in denormal_subd1()
297 if (iy == 0) in denormal_subd1()
300 frac = (ix & 0x000fffffffffffffLL) | 0x0010000000000000LL; in denormal_subd1()
302 while (frac < 0x0010000000000000LL) { in denormal_subd1()
303 if (--exp == 0) in denormal_subd1()
308 return ((long long)exp << 52) | (frac & 0x000fffffffffffffLL); in denormal_subd1()
311 /* ix + iy where iy: denormal and ix, iy >= 0 */
317 if (ix < 0x0010000000000000LL) in denormal_addd1()
320 exp = (ix & 0x7ff0000000000000LL) >> 52; in denormal_addd1()
324 if (iy == 0) in denormal_addd1()
327 frac = (ix & 0x000fffffffffffffLL) | 0x0010000000000000LL; in denormal_addd1()
329 if (frac >= 0x0020000000000000LL) { in denormal_addd1()
334 return (exp << 52) | (frac & 0x000fffffffffffffLL); in denormal_addd1()
342 if ((hx ^ hy) & 0x8000000000000000LL) { in denormal_addd()
343 sign = hx & 0x8000000000000000LL; in denormal_addd()
344 ix = hx & 0x7fffffffffffffffLL; in denormal_addd()
345 iy = hy & 0x7fffffffffffffffLL; in denormal_addd()
346 if (iy < 0x0010000000000000LL) { in denormal_addd()
348 if ((int) ix < 0) { in denormal_addd()
350 sign ^= 0x8000000000000000LL; in denormal_addd()
354 sign ^= 0x8000000000000000LL; in denormal_addd()
357 sign = hx & 0x8000000000000000LL; in denormal_addd()
358 ix = hx & 0x7fffffffffffffffLL; in denormal_addd()
359 iy = hy & 0x7fffffffffffffffLL; in denormal_addd()
360 if (iy < 0x0010000000000000LL) in denormal_addd()
383 if (x != 0 && (x & 0x7f800000) == 0) { in denormal_to_double()
384 du = (x & 0x80000000); in denormal_to_double()
385 while ((x & 0x00800000) == 0) { in denormal_to_double()
389 x &= 0x007fffff; in denormal_to_double()
412 (insn >> 12) & 0xf, in ieee_fpe_handler()
413 (insn >> 8) & 0xf, in ieee_fpe_handler()
414 (insn >> 4) & 0xf, in ieee_fpe_handler()
415 insn & 0xf}; in ieee_fpe_handler()
417 if (nib[0] == 0xb || in ieee_fpe_handler()
418 (nib[0] == 0x4 && nib[2] == 0x0 && nib[3] == 0xb)) /* bsr & jsr */ in ieee_fpe_handler()
420 if (nib[0] == 0xa || nib[0] == 0xb) { /* bra & bsr */ in ieee_fpe_handler()
421 nextpc = regs->pc + 4 + ((short) ((insn & 0xfff) << 4) >> 3); in ieee_fpe_handler()
423 } else if (nib[0] == 0x8 && nib[1] == 0xd) { /* bt/s */ in ieee_fpe_handler()
425 nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); in ieee_fpe_handler()
429 } else if (nib[0] == 0x8 && nib[1] == 0xf) { /* bf/s */ in ieee_fpe_handler()
433 nextpc = regs->pc + 4 + ((char) (insn & 0xff) << 1); in ieee_fpe_handler()
435 } else if (nib[0] == 0x4 && nib[3] == 0xb && in ieee_fpe_handler()
436 (nib[2] == 0x0 || nib[2] == 0x2)) { /* jmp & jsr */ in ieee_fpe_handler()
439 } else if (nib[0] == 0x0 && nib[3] == 0x3 && in ieee_fpe_handler()
440 (nib[2] == 0x0 || nib[2] == 0x2)) { /* braf & bsrf */ in ieee_fpe_handler()
443 } else if (insn == 0x000b) { /* rts */ in ieee_fpe_handler()
453 if ((finsn & 0xf1ff) == 0xf0ad) { /* fcnvsd */ in ieee_fpe_handler()
459 (finsn >> 8) & 0xf); in ieee_fpe_handler()
461 return 0; in ieee_fpe_handler()
465 } else if ((finsn & 0xf00f) == 0xf002) { /* fmul */ in ieee_fpe_handler()
471 n = (finsn >> 8) & 0xf; in ieee_fpe_handler()
472 m = (finsn >> 4) & 0xf; in ieee_fpe_handler()
479 && (prec && ((hx & 0x7fffffff) < 0x00100000 in ieee_fpe_handler()
480 || (hy & 0x7fffffff) < 0x00100000))) { in ieee_fpe_handler()
488 if ((hx & 0x7fffffff) >= 0x00100000) in ieee_fpe_handler()
493 tsk->thread.xstate->hardfpu.fp_regs[n+1] = llx & 0xffffffff; in ieee_fpe_handler()
495 && (!prec && ((hx & 0x7fffffff) < 0x00800000 in ieee_fpe_handler()
496 || (hy & 0x7fffffff) < 0x00800000))) { in ieee_fpe_handler()
498 if ((hx & 0x7fffffff) >= 0x00800000) in ieee_fpe_handler()
504 return 0; in ieee_fpe_handler()
508 } else if ((finsn & 0xf00e) == 0xf000) { /* fadd, fsub */ in ieee_fpe_handler()
514 n = (finsn >> 8) & 0xf; in ieee_fpe_handler()
515 m = (finsn >> 4) & 0xf; in ieee_fpe_handler()
522 && (prec && ((hx & 0x7fffffff) < 0x00100000 in ieee_fpe_handler()
523 || (hy & 0x7fffffff) < 0x00100000))) { in ieee_fpe_handler()
531 if ((finsn & 0xf00f) == 0xf000) in ieee_fpe_handler()
536 tsk->thread.xstate->hardfpu.fp_regs[n+1] = llx & 0xffffffff; in ieee_fpe_handler()
538 && (!prec && ((hx & 0x7fffffff) < 0x00800000 in ieee_fpe_handler()
539 || (hy & 0x7fffffff) < 0x00800000))) { in ieee_fpe_handler()
541 if ((finsn & 0xf00f) == 0xf000) in ieee_fpe_handler()
544 hx = denormal_addf(hx, hy ^ 0x80000000); in ieee_fpe_handler()
547 return 0; in ieee_fpe_handler()
553 return 0; in ieee_fpe_handler()