Lines Matching refs:fpsr
102 DPRINTF(("%s: ENTERING: FPSR=%08x, FPCR=%08x\n",
242 DPRINTF(("%s: EXITING: w/FPSR=%08x, FPCR=%08x\n", __func__,
254 uint32_t fpsr;
257 fpsr = fe->fe_fpsr;
260 * update fpsr accrued exception bits; each insn doesn't have to
263 if (fpsr & (FPSR_BSUN | FPSR_SNAN | FPSR_OPERR)) {
264 fpsr |= FPSR_AIOP;
266 if (fpsr & FPSR_OVFL) {
267 fpsr |= FPSR_AOVFL;
269 if ((fpsr & FPSR_UNFL) && (fpsr & FPSR_INEX2)) {
270 fpsr |= FPSR_AUNFL;
272 if (fpsr & FPSR_DZ) {
273 fpsr |= FPSR_ADZ;
275 if (fpsr & (FPSR_INEX1 | FPSR_INEX2 | FPSR_OVFL)) {
276 fpsr |= FPSR_AINEX;
279 fe->fe_fpframe->fpf_fpsr = fe->fe_fpsr = fpsr;
281 return (fpsr & fpcr & FPSR_EXCP) ? SIGFPE : 0;
284 /* update fpsr according to fp (= result of an fp op) */
288 uint32_t fpsr;
290 DPRINTF(("%s: previous fpsr=%08x\n", __func__, fe->fe_fpsr));
292 fpsr = fe->fe_fpsr & ~FPSR_CCB;
297 fpsr |= FPSR_NEG;
305 fpsr |= (FPSR_NAN | FPSR_SNAN);
309 fpsr |= FPSR_NAN;
313 fpsr |= FPSR_ZERO;
317 fpsr |= FPSR_INF;
325 fe->fe_fpsr = fe->fe_fpframe->fpf_fpsr = fpsr;
327 DPRINTF(("%s: new fpsr=%08x\n", __func__, fe->fe_fpframe->fpf_fpsr));
329 return fpsr;
442 * and the FPSR is not affected.
617 DPRINTF(("%s: FPSR = %08x, FPCR = %08x\n", __func__,
923 /* update fpsr according to the result of operation */
947 DPRINTF(("%s: FPSR = %08x, FPCR = %08x\n", __func__,
964 int fpsr;
966 fpsr = fe->fe_fpsr;
967 DPRINTF(("%s: fpsr=0x%08x\n", __func__, fpsr));
1008 result = ((fpsr & FPSR_NAN) == 0);
1017 result &= ((fpsr & FPSR_NEG) == 0);
1020 result &= ((fpsr & FPSR_NEG) != 0);
1027 result &= ((fpsr & FPSR_ZERO) == 0);
1029 result |= ((fpsr & FPSR_ZERO) != 0);
1032 result |= ((fpsr & FPSR_NAN) != 0);
1037 if (sig_bsun && (fpsr & FPSR_NAN)) {
1038 fpsr |= FPSR_BSUN;
1041 if ((fpsr & FPSR_BSUN)) {
1042 fpsr |= FPSR_AIOP;
1045 /* put fpsr back */
1046 fe->fe_fpframe->fpf_fpsr = fe->fe_fpsr = fpsr;