From: Xi Ruoyao <xry111@mengyan1223.wang>
To: libc-alpha@sourceware.org,
Adhemerval Zanella <adhemerval.zanella@linaro.com>,
caiyinyu@loongson.cn
Subject: Re: [PATCH v2 00/14] GLIBC LoongArch PATCHES
Date: Wed, 02 Feb 2022 11:51:11 +0800 [thread overview]
Message-ID: <72e28f4e55b7ceeba6e9f70792e4b5487d5688c4.camel@mengyan1223.wang> (raw)
In-Reply-To: <3951a15e7b737d33cf20425dc81fcf1c4dbc4c00.camel@mengyan1223.wang>
On Sun, 2022-01-30 at 08:43 +0800, Xi Ruoyao wrote:
> On Tue, 2022-01-04 at 13:27 +0000, Adhemerval Zanella via Libc-alpha
> wrote:
> > On 31/12/2021 03:44, caiyinyu wrote:
>
> /* snip */
>
> > > FAIL: math/test-double-acos
> > > FAIL: math/test-double-asin
> > > FAIL: math/test-float32x-acos
> > > FAIL: math/test-float32x-asin
> > > FAIL: math/test-float64-acos
> > > FAIL: math/test-float64-asin
> > >
> > > These fails are caused by gcc optimizations. if we use -O0
> > > options, these fails
> > > will pass.
>
> /* snip */
>
> > > 338 else {
> > > 339 u.i[HIGH_HALF]=0x7ff00000;
> > > 340 v.i[HIGH_HALF]=0x7ff00000;
> > > 341 u.i[LOW_HALF]=0;
> > > 342 v.i[LOW_HALF]=0;
> > > 343 return u.x/v.x; /////////
> > > optimized out
> > >
> > > 0x00007ffff7f4dad8 <+1432>: pcaddu12i $t0, 63(0x3f)
> > > 0x00007ffff7f4dadc <+1436>: addi.d $t0, $t0, -
> > > 1248(0xb20)
> > > 0x00007ffff7f4dae0 <+1440>: fld.d $fa0, $t0, 0
> > > 0x00007ffff7f4dae4 <+1444>: b -812(0xffffcd4) #
> > > 0x7ffff7f4d7b8 <__ieee754_acos+632>
>
> /* snip */
>
> > Is this being tracked by a GCC bug report? We need to understand if
> > we
> > require to use math_force_eval to avoid such issue on other ports as
> > well.
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95115
>
> This one has been haunting RISC-V for a while.
Fixed for GCC 12 at r12-6959. Now the generated LoongArch assembly is:
.L98:
# ../sysdeps/ieee754/dbl-64/e_asin.c:343: return u.x/v.x;
la.local $r12,.LC19 # tmp848,
fld.d $f0,$r12,0 # tmp847,
fdiv.d $f0,$f0,$f0 # <retval>, tmp847, tmp847
b .L63 #
# ... ...
.LC19:
.word 0
.word 2146435072
.align 3
Which is, literally, inf/inf.
--
Xi Ruoyao <xry111@mengyan1223.wang>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2022-02-02 3:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <65f49596-18eb-ef04-a89b-2f384f23e7d9 () linaro ! org>
2022-01-30 0:43 ` Xi Ruoyao
2022-02-02 3:51 ` Xi Ruoyao [this message]
2021-12-31 6:44 caiyinyu
2021-12-31 17:34 ` Joseph Myers
2022-04-15 1:27 ` caiyinyu
2022-01-04 13:27 ` Adhemerval Zanella
2022-04-15 1:28 ` caiyinyu
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=72e28f4e55b7ceeba6e9f70792e4b5487d5688c4.camel@mengyan1223.wang \
--to=xry111@mengyan1223.wang \
--cc=adhemerval.zanella@linaro.com \
--cc=caiyinyu@loongson.cn \
--cc=libc-alpha@sourceware.org \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).