On 4/29/20 5:20 PM, 罗勇刚(Yonggang Luo) wrote:
> Question, in hard-float, if we don't want to read the fp register.
> for example: If we wanna compute c = a + b in fp32
> if c = a + b In hard float
> and if b1 = c - a in hard float
> if b1 != b at bitwise level, the we se the inexat to 1, otherwsie 
> we set inexat bit to 0? are this valid?
> 
> we can also do it for a * b, a - b, a / b. 
> 

That does seem plausible, for all of the normal values for which we would apply
the hard-float optimization anyway.  But we already check for the exceptional
cases:

    if (unlikely(f32_is_inf(ur))) {
        s->float_exception_flags |= float_flag_overflow;
    } else if (unlikely(fabsf(ur.h) <= FLT_MIN)) {
        if (post == NULL || post(ua, ub)) {
            goto soft;
        }
    }


r~

Reply via email to