qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [V5 PATCH 01/22] softfloat: Fix float64_to_uint64


From: Peter Maydell
Subject: Re: [Qemu-devel] [V5 PATCH 01/22] softfloat: Fix float64_to_uint64
Date: Mon, 6 Jan 2014 12:54:05 +0000

On 2 January 2014 22:21, Tom Musta <address@hidden> 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 <address@hidden>

Reviewed-by: Peter Maydell <address@hidden>

...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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]