[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v8 15/35] Hexagon (target/hexagon/arch.[ch]) utility function
From: |
Richard Henderson |
Subject: |
Re: [PATCH v8 15/35] Hexagon (target/hexagon/arch.[ch]) utility functions |
Date: |
Sun, 14 Feb 2021 12:13:16 -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:
> +uint32_t carry_from_add64(uint64_t a, uint64_t b, uint32_t c)
> +{
> + uint64_t tmpa, tmpb, tmpc;
> + tmpa = fGETUWORD(0, a);
> + tmpb = fGETUWORD(0, b);
> + tmpc = tmpa + tmpb + c;
> + tmpa = fGETUWORD(1, a);
> + tmpb = fGETUWORD(1, b);
> + tmpc = tmpa + tmpb + fGETUWORD(1, tmpc);
> + tmpc = fGETUWORD(1, tmpc);
> + return tmpc;
> +}
I presume this is intended to compute carry-out from 64-bit addition with
carry-in?
uint64_t r = a + b;
return c ? r <= a : r < a;
> +static const int softfloat_roundingmodes[] = {
FloatRoundMode
> +static float32 float32_mul_pow2(float32 a, uint32_t p, float_status
> *fp_status)
> +{
> + float32 b = make_float32((SF_BIAS + p) << SF_MANTBITS);
> + return float32_mul(a, b, fp_status);
> +}
This is float32_scalbn.
r~
- Re: [PATCH v8 19/35] Hexagon (target/hexagon) generator phase 1 - C preprocessor for semantics, (continued)
- [PATCH v8 06/35] Hexagon (target/hexagon) register names, Taylor Simpson, 2021/02/08
- [PATCH v8 09/35] Hexagon (target/hexagon) architecture types, Taylor Simpson, 2021/02/08
- [PATCH v8 26/35] Hexagon (target/hexagon) TCG generation, Taylor Simpson, 2021/02/08
- [PATCH v8 10/35] Hexagon (target/hexagon) instruction and packet types, Taylor Simpson, 2021/02/08
- [PATCH v8 15/35] Hexagon (target/hexagon/arch.[ch]) utility functions, Taylor Simpson, 2021/02/08
- Re: [PATCH v8 15/35] Hexagon (target/hexagon/arch.[ch]) utility functions,
Richard Henderson <=
- [PATCH v8 25/35] Hexagon (target/hexagon) instruction classes, Taylor Simpson, 2021/02/08
- [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