[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility func
From: |
Richard Henderson |
Subject: |
Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions |
Date: |
Sun, 14 Feb 2021 12:57:22 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 2/7/21 9:46 PM, Taylor Simpson wrote:
> +uint64_t conv_sf_to_8u(float32 in, float_status *fp_status);
> +uint32_t conv_sf_to_4u(float32 in, float_status *fp_status);
> +int64_t conv_sf_to_8s(float32 in, float_status *fp_status);
> +int32_t conv_sf_to_4s(float32 in, float_status *fp_status);
> +
> +uint64_t conv_df_to_8u(float64 in, float_status *fp_status);
> +uint32_t conv_df_to_4u(float64 in, float_status *fp_status);
> +int64_t conv_df_to_8s(float64 in, float_status *fp_status);
> +int32_t conv_df_to_4s(float64 in, float_status *fp_status);
You need to either use the normal float conversion routines, or document what
the differences are.
> +static uint64_t conv_f64_to_8u_n(float64 in, int will_negate,
> + float_status *fp_status)
> +{
> + uint8_t sign = float64_is_neg(in);
> + if (float64_is_infinity(in)) {
> + float_raise(float_flag_invalid, fp_status);
> + if (float64_is_neg(in)) {
> + return 0ULL;
This isn't right for will_negate.
r~
- [PATCH v8 17/35] Hexagon (target/hexagon/fma_emu.[ch]) utility functions, (continued)
- [PATCH v8 17/35] Hexagon (target/hexagon/fma_emu.[ch]) utility functions, Taylor Simpson, 2021/02/08
- [PATCH v8 20/35] Hexagon (target/hexagon) generator phase 2 - generate header files, Taylor Simpson, 2021/02/08
- [PATCH v8 23/35] Hexagon (target/hexagon) opcode data structures, Taylor Simpson, 2021/02/08
- [PATCH v8 07/35] Hexagon (target/hexagon) scalar core helpers, Taylor Simpson, 2021/02/08
- [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions, Taylor Simpson, 2021/02/08
- Re: [PATCH v8 16/35] Hexagon (target/hexagon/conv_emu.[ch]) utility functions,
Richard Henderson <=
- [PATCH v8 24/35] Hexagon (target/hexagon) macros, Taylor Simpson, 2021/02/08
- [PATCH v8 18/35] Hexagon (target/hexagon/imported) arch import, Taylor Simpson, 2021/02/08
- [PATCH v8 28/35] Hexagon (target/hexagon) TCG for floating point instructions, Taylor Simpson, 2021/02/08
- [PATCH v8 27/35] Hexagon (target/hexagon) TCG for instructions with multiple definitions, Taylor Simpson, 2021/02/08
- [PATCH v8 31/35] Hexagon (tests/tcg/hexagon) TCG tests - multiarch, Taylor Simpson, 2021/02/08