From: "Alex Bennée" <alex.bennee@linaro.org>
To: luoyonggang@gmail.com
Cc: Richard Henderson <richard.henderson@linaro.org>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
Programmingkid <programmingkidx@gmail.com>,
"qemu-ppc@nongnu.org" <qemu-ppc@nongnu.org>,
Howard Spoelstra <hsp.cat7@gmail.com>,
Dino Papararo <skizzato73@msn.com>
Subject: Re: R: R: About hardfloat in ppc
Date: Thu, 30 Apr 2020 09:11:45 +0100 [thread overview]
Message-ID: <87lfmdjsu6.fsf@linaro.org> (raw)
In-Reply-To: <CAE2XoE-MM6AR8fmExnst7o9wL4Q_nZkw=gyemMJmZSdPd_ydmg@mail.gmail.com>
罗勇刚(Yonggang Luo) <luoyonggang@gmail.com> writes:
> On Thu, Apr 30, 2020 at 10:18 AM Richard Henderson <
> richard.henderson@linaro.org> 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
next prev parent reply other threads:[~2020-04-30 8:12 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-27 6:39 About hardfloat in ppc 罗勇刚(Yonggang Luo)
2020-04-27 9:42 ` Alex Bennée
2020-04-27 10:34 ` BALATON Zoltan
2020-04-27 11:10 ` Alex Bennée
2020-04-27 21:18 ` 罗勇刚(Yonggang Luo)
2020-04-28 8:36 ` Alex Bennée
2020-04-28 14:29 ` 罗勇刚(Yonggang Luo)
2020-04-29 10:17 ` R: " Dino Papararo
2020-04-29 10:31 ` Dino Papararo
2020-04-29 11:57 ` Alex Bennée
2020-04-29 12:33 ` 罗勇刚(Yonggang Luo)
2020-04-29 13:38 ` Alex Bennée
2020-04-29 14:31 ` R: " Dino Papararo
2020-04-29 14:49 ` Peter Maydell
2020-04-29 18:25 ` R: " Alex Bennée
2020-04-30 0:20 ` 罗勇刚(Yonggang Luo)
2020-04-30 2:18 ` Richard Henderson
2020-04-30 7:26 ` 罗勇刚(Yonggang Luo)
2020-04-30 8:11 ` Alex Bennée [this message]
2020-04-30 8:13 ` 罗勇刚(Yonggang Luo)
2020-04-30 15:35 ` BALATON Zoltan
2020-04-30 16:34 ` R: " Dino Papararo
2020-05-01 1:59 ` Programmingkid
2020-05-01 2:21 ` 罗勇刚(Yonggang Luo)
2020-05-01 11:58 ` BALATON Zoltan
2020-05-01 12:04 ` 罗勇刚(Yonggang Luo)
2020-05-01 13:10 ` Alex Bennée
2020-05-01 13:39 ` BALATON Zoltan
2020-05-01 14:01 ` Alex Bennée
2020-05-01 14:18 ` Richard Henderson
2020-05-01 16:25 ` 罗勇刚(Yonggang Luo)
2020-05-01 19:33 ` Alex Bennée
2020-05-01 16:29 ` 罗勇刚(Yonggang Luo)
2020-05-01 16:51 ` Richard Henderson
2020-05-01 17:49 ` 罗勇刚(Yonggang Luo)
2020-05-01 20:35 ` Richard Henderson
2020-04-29 23:12 ` R: " 罗勇刚(Yonggang Luo)
2020-04-30 15:16 ` BALATON Zoltan
2020-04-30 18:59 ` Alex Bennée
2020-04-30 20:17 ` BALATON Zoltan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lfmdjsu6.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=hsp.cat7@gmail.com \
--cc=luoyonggang@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=programmingkidx@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=skizzato73@msn.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).