qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 25/72] softfloat: Rearrange FloatParts64


From: Alex Bennée
Subject: Re: [PATCH 25/72] softfloat: Rearrange FloatParts64
Date: Tue, 11 May 2021 14:57:55 +0100
User-agent: mu4e 1.5.13; emacs 28.0.50

Richard Henderson <richard.henderson@linaro.org> writes:

> Shuffle the fraction to the end, otherwise sort by size.
> Add frac_hi and frac_lo members to alias frac.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  fpu/softfloat.c | 13 +++++++++++--
>  1 file changed, 11 insertions(+), 2 deletions(-)
>
> diff --git a/fpu/softfloat.c b/fpu/softfloat.c
> index 2123453d40..2d6f61ee7a 100644
> --- a/fpu/softfloat.c
> +++ b/fpu/softfloat.c
> @@ -511,10 +511,19 @@ static inline __attribute__((unused)) bool 
> is_qnan(FloatClass c)
>   */
>  
>  typedef struct {
> -    uint64_t frac;
> -    int32_t  exp;
>      FloatClass cls;
>      bool sign;
> +    int32_t exp;
> +    union {
> +        /* Routines that know the structure may reference the singular name. 
> */
> +        uint64_t frac;
> +        /*
> +         * Routines expanded with multiple structures reference "hi" and 
> "lo".
> +         * In this structure, the one word is both highest and lowest.
> +         */
> +        uint64_t frac_hi;
> +        uint64_t frac_lo;

This confuses me. Is this because it could be frac_hi or frac_lo at the
"top" of the structure because of endian issues?

> +    };
>  } FloatParts64;
>  
>  #define DECOMPOSED_BINARY_POINT    63


-- 
Alex Bennée



reply via email to

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