On 2 January 2014 22:21, Tom Musta <tommu...@gmail.com> wrote: > The comment preceding the float64_to_uint64 routine suggests that > the implementation is broken. And this is, indeed, the case. > > This patch properly implements the conversion of a 64-bit floating > point number to an unsigned, 64 bit integer. > > This contribution can be licensed under either the softfloat-2a or -2b > license. > > Signed-off-by: Tom Musta <tommu...@gmail.com>
Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> ...but you should fix: > --- a/fpu/softfloat.c > +++ b/fpu/softfloat.c > @@ -161,7 +161,6 @@ static int32 roundAndPackInt32( flag zSign, uint64_t absZ > STATUS_PARAM) > | exception is raised and the largest positive or negative integer is > | returned. > > *----------------------------------------------------------------------------*/ > - > static int64 roundAndPackInt64( flag zSign, uint64_t absZ0, uint64_t absZ1 > STATUS_PARAM) this spurious blank line change... > { > int8 roundingMode; > > + > uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) > { > int64_t v; ...and this one. (I've done that for you in the copies of these patches which I'm about to send out as the next A64 patchset, so if they go in via my tree that's fine. Otherwise you should do a respin or get Alex to fix it up for you as he applies them to the ppc tree.) thanks -- PMM