[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 04/14] target-ppc: Replace isden by float64_is_zer
From: |
David Gibson |
Subject: |
Re: [Qemu-ppc] [PATCH 04/14] target-ppc: Replace isden by float64_is_zero_or_denormal |
Date: |
Fri, 6 Jan 2017 09:03:06 +1100 |
User-agent: |
Mutt/1.7.1 (2016-10-04) |
On Thu, Jan 05, 2017 at 04:56:09PM +0530, Nikunj A Dadhania wrote:
> From: Bharata B Rao <address@hidden>
>
> Replace isden() by float64_is_zero_or_denormal() so that code in
> helper_compute_fprf() can be reused to work with float128 argument.
>
> Signed-off-by: Bharata B Rao <address@hidden>
> Signed-off-by: Nikunj A Dadhania <address@hidden>
Reviewed-by: David Gibson <address@hidden>
> ---
> target-ppc/fpu_helper.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c
> index 4da991a..5a7aa75 100644
> --- a/target-ppc/fpu_helper.c
> +++ b/target-ppc/fpu_helper.c
> @@ -47,15 +47,6 @@ uint32_t helper_float64_to_float32(CPUPPCState *env,
> uint64_t arg)
> return f.l;
> }
>
> -static inline int isden(float64 d)
> -{
> - CPU_DoubleU u;
> -
> - u.d = d;
> -
> - return ((u.ll >> 52) & 0x7FF) == 0;
> -}
> -
> static inline int ppc_float32_get_unbiased_exp(float32 f)
> {
> return ((f >> 23) & 0xFF) - 127;
> @@ -96,7 +87,7 @@ void helper_compute_fprf(CPUPPCState *env, float64 arg)
> fprf = 0x02;
> }
> } else {
> - if (isden(arg)) {
> + if (float64_is_zero_or_denormal(arg)) {
> /* Denormalized numbers */
> fprf = 0x10;
> } else {
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature
- [Qemu-ppc] [PATCH 00/14] POWER9 TCG enablements - part10, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 02/14] target-ppc: Add xxinsertw instruction, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 06/14] target-ppc: Add xsaddqp instructions, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 01/14] target-ppc: Add xxextractuw instruction, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 09/14] target-ppc: Add xscvdpqp instruction, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 08/14] target-ppc: Use correct precision for FPRF setting, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 04/14] target-ppc: Replace isden by float64_is_zero_or_denormal, Nikunj A Dadhania, 2017/01/05
- Re: [Qemu-ppc] [PATCH 04/14] target-ppc: Replace isden by float64_is_zero_or_denormal,
David Gibson <=
- [Qemu-ppc] [PATCH 07/14] target-ppc: Add xscvdphp, xscvhpdp, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 10/14] target-ppc: Add xscvqpdp instruction, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 03/14] target-ppc: Use float64 arg in helper_compute_fprf(), Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 13/14] target-ppc: Add xsxsigdp instruction, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 14/14] target-ppc: Add xsxsigqp instructions, Nikunj A Dadhania, 2017/01/05
- [Qemu-ppc] [PATCH 12/14] target-ppc: Add xsxexpqp instruction, Nikunj A Dadhania, 2017/01/05