[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: MIPS FP rounding
From: |
Thiemo Seufer |
Subject: |
[Qemu-devel] Re: MIPS FP rounding |
Date: |
Thu, 20 Sep 2007 18:28:25 +0100 |
User-agent: |
Mutt/1.5.16 (2007-06-11) |
Daniel Jacobowitz wrote:
> Thiemo, in May you added this:
>
> - update_fcr31(); \
> + update_fcr31(); \
> + if (GET_FP_CAUSE(env->fcr31) & FP_INVALID) \
> + FST2 = 0x7fbfffff; \
> + else if (GET_FP_CAUSE(env->fcr31) & FP_UNDERFLOW) { \
> + if ((env->fcr31 & 0x3) == 0) \
> + FST2 &= 0x80000000ULL; \
> + } \
>
> That last bit says that if underflow is detected and the rounding mode
> is round-to-nearest, return an signed appropriate signed zero. Why?
> The MIPS ISA docs say a rounded result is returned in this case, and
> that's what's in FST2 if that code is removed.
It fixed an internal testcase, I'll have to check what was going
on there, probably tomorrow.
Thiemo