sse bugfix

This commit is contained in:
Stanislav Shwartsman 2009-08-23 05:00:46 +00:00
parent 7233fdf3c1
commit caaac52d80

View File

@ -220,7 +220,7 @@ float32 roundAndPackFloat32(int zSign, Bit16s zExp, Bit32u zSig, float_status_t
zSig = shift32RightJamming(zSig, -zExp);
zExp = 0;
roundBits = zSig & roundMask;
if (isTiny && roundBits) {
if (isTiny && (roundBits || !float_exception_masked(status, float_flag_underflow))) {
float_raise(status, float_flag_underflow);
if(get_flush_underflow_to_zero(status)) {
float_raise(status, float_flag_inexact);
@ -321,7 +321,7 @@ float64 roundAndPackFloat64(int zSign, Bit16s zExp, Bit64u zSig, float_status_t
zSig = shift64RightJamming(zSig, -zExp);
zExp = 0;
roundBits = (Bit16s)(zSig & 0x3FF);
if (isTiny && roundBits) {
if (isTiny && (roundBits || !float_exception_masked(status, float_flag_underflow))) {
float_raise(status, float_flag_underflow);
if(get_flush_underflow_to_zero(status)) {
float_raise(status, float_flag_inexact);