qemu-ppc
[Top][All Lists]
Advanced

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

Re: R: R: About hardfloat in ppc


From: Alex Bennée
Subject: Re: R: R: About hardfloat in ppc
Date: Thu, 30 Apr 2020 09:11:45 +0100
User-agent: mu4e 1.4.1; emacs 28.0.50

罗勇刚(Yonggang Luo) <address@hidden> writes:

> On Thu, Apr 30, 2020 at 10:18 AM Richard Henderson <
> address@hidden> wrote:
>
>> 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;
>>         }
>>     }
>>
> I means remove of all thse exceptional cases, and detecting float
> exception by hard float operation.

When this was originally done it was found to be faster testing for the
float conditions in software (which are basically bitops) than reading
the FP exception register which can be a high latency operation.

-- 
Alex Bennée



reply via email to

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