qemu/target-mips op_helper.c
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Thiemo Seufer <ths> 07/06/27 19:01:46
Modified files:
target-mips : op_helper.c
Log message:
Fix computation for ceil, floor and round instructions.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op_helper.c?cvsroot=qemu&r1=1.54&r2=1.55
IMHO, calling floatX_round_to_int before floatX_to_intY is not useful...
Fabrice.
Quoted 16 lines · Thiemo Seufer
CVSROOT: /sources/qemu
Module name: qemu
Changes by: Thiemo Seufer <ths> 07/06/27 19:01:46Modified files:
target-mips :op_helper.cLog message:
Fix computation for ceil, floor and round instructions.CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op_helper.c?cvsroot=qemu&r1=1.54&r2=1.55
Quoted 1 line · Fabrice Bellard
IMHO, calling
floatX_round_to_intbeforefloatX_to_intYis not useful...
I don't understand. floatX_round_to_int does round/ceil/floor but keeps the floating point representation. floatX_to_intY converts the adjusted value to integer representation.
Doing this in two steps may have its own problems like spurious inexact signalling, but at least the calculated values appear to be correct.
Thiemo
floatX_to_intY should already do the rounding according to the current rounding direction.
Fabrice.
Quoted 17 lines · Thiemo Seufer
Quoted 1 line · Fabrice Bellard
IMHO, calling
floatX_round_to_intbeforefloatX_to_intYis not useful...I don't understand.
floatX_round_to_intdoes round/ceil/floor but keeps the floating point representation.floatX_to_intYconverts the adjusted value to integer representation.Doing this in two steps may have its own problems like spurious inexact signalling, but at least the calculated values appear to be correct.
Thiemo