[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal(
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal() function |
Date: |
Mon, 10 Jan 2011 20:13:21 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
On Fri, Jan 07, 2011 at 09:26:24AM +0000, Peter Maydell wrote:
> Add a utility function to softfloat to test whether a float32
> is zero or denormal.
>
> Signed-off-by: Peter Maydell <address@hidden>
> ---
> fpu/softfloat.h | 5 +++++
> 1 files changed, 5 insertions(+), 0 deletions(-)
Reviewed-by: Aurelien Jarno <address@hidden>
> diff --git a/fpu/softfloat.h b/fpu/softfloat.h
> index 15052cc..1acf7af 100644
> --- a/fpu/softfloat.h
> +++ b/fpu/softfloat.h
> @@ -336,6 +336,11 @@ INLINE int float32_is_any_nan(float32 a)
> return ((float32_val(a) & ~(1 << 31)) > 0x7f800000UL);
> }
>
> +INLINE int float32_is_zero_or_denormal(float32 a)
> +{
> + return (float32_val(a) & 0x7f800000) == 0;
> +}
> +
> #define float32_zero make_float32(0)
> #define float32_one make_float32(0x3f800000)
> #define float32_ln2 make_float32(0x3f317218)
> --
> 1.6.3.3
>
>
>
--
Aurelien Jarno GPG: 1024D/F1BCDB73
address@hidden http://www.aurel32.net
- [Qemu-devel] [PATCH 0/4] target-arm: Fix VRSQRTS, Peter Maydell, 2011/01/07
- [Qemu-devel] [PATCH 3/4] target-arm: Add support for 'Standard FPSCR Value' as used by Neon, Peter Maydell, 2011/01/07
- [Qemu-devel] [PATCH 2/4] target-arm: Fix implementation of VRSQRTS, Peter Maydell, 2011/01/07
- [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal() function, Peter Maydell, 2011/01/07
- Re: [Qemu-devel] [PATCH 1/4] softfloat: Add float32_is_zero_or_denormal() function,
Aurelien Jarno <=
- [Qemu-devel] [PATCH 4/4] target-arm: Use the standard FPSCR value for VRSQRTS, Peter Maydell, 2011/01/07
- Re: [Qemu-devel] [PATCH 0/4] target-arm: Fix VRSQRTS, Aurelien Jarno, 2011/01/14