qemu-devel
[Top][All Lists]
Advanced

[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~



reply via email to

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