qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v2 11/20] fpu/softfloat: re-factor add/sub


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH v2 11/20] fpu/softfloat: re-factor add/sub
Date: Thu, 18 Jan 2018 08:47:57 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

On 01/18/2018 08:43 AM, Alex Bennée wrote:
>   /* Expand fields based on the size of exponent and fraction */
>   #define FRAC_PARAMS(E, F)                                            \
>       .exp_size       = E,                                             \
>       .frac_size      = F,                                             \
>       .frac_shift     = DECOMPOSED_BINARY_POINT - F,                   \
>       .frac_lsb       = 1ull << (DECOMPOSED_BINARY_POINT - F),         \
>       .frac_lsbm1     = 1ull << ((DECOMPOSED_BINARY_POINT - F) - 1),   \
>       .round_mask     = (1ull << (DECOMPOSED_BINARY_POINT - F)) - 1,   \
>       .roundeven_mask = (2ull << (DECOMPOSED_BINARY_POINT - F)) - 1
> 
>   static const FloatFmt float16_params = {
>       .exp_bias       = 0x0f,
>       .exp_max        = 0x1f,
>       FRAC_PARAMS(5, 10)
>   };

You can compute exp_bias and exp_max from E as well.


r~



reply via email to

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