[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 10/19] fpu/softfloat: re-factor add/sub
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v1 10/19] fpu/softfloat: re-factor add/sub |
Date: |
Mon, 18 Dec 2017 14:18:47 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 |
On 12/11/2017 04:56 AM, Alex Bennée wrote:
> We can now add float16_add/sub and use the common decompose and
> canonicalize functions to have a single implementation for
> float16/32/64 add and sub functions.
>
> Signed-off-by: Alex Bennée <address@hidden>
I was involved in writing this, so
Signed-off-by: Richard Henderson <address@hidden>
However,
> +/*
> + * Returns the result of adding the absolute values of the
> + * floating-point values `a' and `b'. If `subtract' is set, the sum is
> + * negated before being returned. `subtract' is ignored if the result
> + * is a NaN. The addition is performed according to the IEC/IEEE
> + * Standard for Binary Floating-Point Arithmetic.
> + */
> +
> +static decomposed_parts add_decomposed(decomposed_parts a, decomposed_parts
> b,
> + bool subtract, float_status *s)
The comment does not accurately describe what the function does, particularly
wrt subtract.
> + if (a.cls >= float_class_qnan
> + ||
> + b.cls >= float_class_qnan)
Would you please fix this up throughout the patch set?
While I prefer the GNU
(X
|| Y)
I'm also ok with
(X ||
Y)
but || on a line by itself is just weird.
r~
- Re: [Qemu-devel] [PATCH v1 08/19] fpu/softfloat: move the extract functions to the top of the file, (continued)
- [Qemu-devel] [PATCH v1 07/19] fpu/softfloat: improve comments on ARM NaN propagation, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 09/19] fpu/softfloat: define decompose structures, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 14/19] fpu/softfloat: re-factor round_to_int, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 19/19] fpu/softfloat: re-factor compare, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 17/19] fpu/softfloat: re-factor scalbn, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 10/19] fpu/softfloat: re-factor add/sub, Alex Bennée, 2017/12/11
- Re: [Qemu-devel] [PATCH v1 10/19] fpu/softfloat: re-factor add/sub,
Richard Henderson <=
- [Qemu-devel] [PATCH v1 13/19] fpu/softfloat: re-factor muladd, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 15/19] fpu/softfloat: re-factor float to int/uint, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 11/19] fpu/softfloat: re-factor mul, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 16/19] fpu/softfloat: re-factor int/uint to float, Alex Bennée, 2017/12/11
- [Qemu-devel] [PATCH v1 18/19] fpu/softfloat: re-factor minmax, Alex Bennée, 2017/12/11