[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~
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, (continued)
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Alex Bennée, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Philippe Mathieu-Daudé, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Peter Maydell, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Philippe Mathieu-Daudé, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Peter Maydell, 2018/01/18
- Re: [Qemu-devel] [PATCH v2 10/20] fpu/softfloat: define decompose structures, Alex Bennée, 2018/01/23
[Qemu-devel] [PATCH v2 11/20] fpu/softfloat: re-factor add/sub, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 14/20] fpu/softfloat: re-factor muladd, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 16/20] fpu/softfloat: re-factor float to int/uint, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 19/20] fpu/softfloat: re-factor minmax, Alex Bennée, 2018/01/09
[Qemu-devel] [PATCH v2 18/20] fpu/softfloat: re-factor scalbn, Alex Bennée, 2018/01/09