[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 01/19] Add New softfloat Routines for VSX
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 01/19] Add New softfloat Routines for VSX |
Date: |
Fri, 25 Oct 2013 12:55:08 +0100 |
On 24 October 2013 17:17, Tom Musta <address@hidden> wrote:
> This patch adds routines to the softfloat library that are useful for
> the PowerPC VSX implementation. The routines are, however, not specific
> to PowerPC and are approprriate for softfloat.
>
> The following routines are added:
>
> - float32_is_denormal() returns true if the 32-bit floating point number
> is denormalized.
> - float64_is_denormal() returns true if the 64-bit floating point number
> is denormalized.
Can you point me at the patches which use these, please?
I couldn't find them with a quick search in my email client.
> - float32_get_unbiased_exp() returns the unbiased exponent of a 32-bit
> floating point number.
> - float64_get_unbiased_exp() returns the unbiased exponent of a 64-bit
> floating point number.
These look rather odd to me, and again I can't find the uses in
your patchset. Returning just the exponent is a bit odd and
suggests that maybe the split between target code and softfloat
is in the wrong place.
> - float32_to_uint64() converts a 32-bit floating point number to an
> unsigned 64 bit number.
I would put this in its own patch, personally.
>
> +INLINE int float32_is_denormal(float32 a)
> +{
> + return ((float32_val(a) & 0x7f800000) == 0) &&
> + ((float32_val(a) & 0x007fffff) != 0);
> +}
return float32_is_zero_or_denormal(a) && !float32_is_zero(a);
is easier to review and less duplicative of code.
thanks
-- PMM
[Qemu-devel] [PATCH 02/19] Add set_fprf Argument to fload_invalid_op_excp(), Tom Musta, 2013/10/24
[Qemu-devel] [PATCH 03/19] General Support for VSX Helpers, Tom Musta, 2013/10/24
[Qemu-devel] [PATCH 04/19] Add VSX ISA2.06 xadd Instructions, Tom Musta, 2013/10/24
[Qemu-devel] [PATCH 05/19] Add VSX ISA2.06 xsub Instructions, Tom Musta, 2013/10/24