Commit 418d7c7169818bce67a570fdc86ffb613f53263a

Authored by ths
1 parent df0d3736

Fix MIPS FP underflow handling, spotted by Daniel Jacobowitz.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3255 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 0 additions and 13 deletions
target-mips/op_helper.c
@@ -1032,10 +1032,6 @@ FLOAT_OP(name, d) \ @@ -1032,10 +1032,6 @@ FLOAT_OP(name, d) \
1032 update_fcr31(); \ 1032 update_fcr31(); \
1033 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) \ 1033 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) \
1034 FDT2 = 0x7ff7ffffffffffffULL; \ 1034 FDT2 = 0x7ff7ffffffffffffULL; \
1035 - else if (GET_FP_CAUSE(env->fpu->fcr31) & FP_UNDERFLOW) { \  
1036 - if ((env->fpu->fcr31 & 0x3) == 0) \  
1037 - FDT2 &= FLOAT_SIGN64; \  
1038 - } \  
1039 } \ 1035 } \
1040 FLOAT_OP(name, s) \ 1036 FLOAT_OP(name, s) \
1041 { \ 1037 { \
@@ -1044,10 +1040,6 @@ FLOAT_OP(name, s) \ @@ -1044,10 +1040,6 @@ FLOAT_OP(name, s) \
1044 update_fcr31(); \ 1040 update_fcr31(); \
1045 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) \ 1041 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) \
1046 FST2 = 0x7fbfffff; \ 1042 FST2 = 0x7fbfffff; \
1047 - else if (GET_FP_CAUSE(env->fpu->fcr31) & FP_UNDERFLOW) { \  
1048 - if ((env->fpu->fcr31 & 0x3) == 0) \  
1049 - FST2 &= FLOAT_SIGN32; \  
1050 - } \  
1051 } \ 1043 } \
1052 FLOAT_OP(name, ps) \ 1044 FLOAT_OP(name, ps) \
1053 { \ 1045 { \
@@ -1058,11 +1050,6 @@ FLOAT_OP(name, ps) \ @@ -1058,11 +1050,6 @@ FLOAT_OP(name, ps) \
1058 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) { \ 1050 if (GET_FP_CAUSE(env->fpu->fcr31) & FP_INVALID) { \
1059 FST2 = 0x7fbfffff; \ 1051 FST2 = 0x7fbfffff; \
1060 FSTH2 = 0x7fbfffff; \ 1052 FSTH2 = 0x7fbfffff; \
1061 - } else if (GET_FP_CAUSE(env->fpu->fcr31) & FP_UNDERFLOW) { \  
1062 - if ((env->fpu->fcr31 & 0x3) == 0) { \  
1063 - FST2 &= FLOAT_SIGN32; \  
1064 - FSTH2 &= FLOAT_SIGN32; \  
1065 - } \  
1066 } \ 1053 } \
1067 } 1054 }
1068 FLOAT_BINOP(add) 1055 FLOAT_BINOP(add)