Re: [hatari-devel] FPU update |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Am 29.01.2017 um 21:30 schrieb Toni Wilen <twilen@xxxxxxxxxx>: Here is the updated version. The expectd.dat has grown because a result Please test if this modification of fpsr_set_result fixes the issue. Datasheet says that NaNs can be negative. But i think that might be just wrong. Maybe some more testing on real hardware makes sense to confirm this. void fpsr_set_result(fptype *result) { // condition code byte regs.fpsr &= 0x00fffff8; // clear cc if (fp_is_nan (result)) { regs.fpsr |= FPSR_CC_NAN; // check if nan is signaling if (fp_is_snan(result)) { regs.fpsr |= FPSR_SNAN; } } else { if (fp_is_zero(result)) { regs.fpsr |= FPSR_CC_Z; } else if (fp_is_infinity (result)) { regs.fpsr |= FPSR_CC_I; } if (fp_is_neg(result)) { regs.fpsr |= FPSR_CC_N; } } } |
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |