qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 4/4] target/loongarch: flogb_{s/d} add set float_flag_divb


From: Richard Henderson
Subject: Re: [PATCH v2 4/4] target/loongarch: flogb_{s/d} add set float_flag_divbyzero
Date: Wed, 28 Sep 2022 08:24:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/26/22 23:48, Song Gao wrote:
if fj ==0 or fj == INT32_MIN/INT64_MIN, LoongArch host set fcsr cause exception 
FP_DIV0,
So we need set exception flags float_flagdivbyzero if fj ==0.

You are correct that ieee754 says that logB(0) should raise divbyzero.
This should be fixed in softfloat-parts.c.inc, not here, within

        case float_class_zero:

            /* log2(0) = -inf */

            a->cls = float_class_inf;

            a->sign = 1;

            return;



r~



reply via email to

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