From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mengyan1223.wang (mengyan1223.wang [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id 519F93858437 for ; Wed, 2 Feb 2022 03:51:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 519F93858437 Received: from [192.168.0.105] (unknown [111.52.90.207]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384) server-digest SHA384) (Client did not present a certificate) (Authenticated sender: xry111@mengyan1223.wang) by mengyan1223.wang (Postfix) with ESMTPSA id 95FF565A5D; Tue, 1 Feb 2022 22:51:18 -0500 (EST) Message-ID: <72e28f4e55b7ceeba6e9f70792e4b5487d5688c4.camel@mengyan1223.wang> Subject: Re: [PATCH v2 00/14] GLIBC LoongArch PATCHES From: Xi Ruoyao To: libc-alpha@sourceware.org, Adhemerval Zanella , caiyinyu@loongson.cn Date: Wed, 02 Feb 2022 11:51:11 +0800 In-Reply-To: <3951a15e7b737d33cf20425dc81fcf1c4dbc4c00.camel@mengyan1223.wang> References: <65f49596-18eb-ef04-a89b-2f384f23e7d9 () linaro ! org> <3951a15e7b737d33cf20425dc81fcf1c4dbc4c00.camel@mengyan1223.wang> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3029.9 required=5.0 tests=BAYES_00, BODY_8BITS, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, JMQ_SPF_NEUTRAL, KAM_SHORT, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Feb 2022 03:51:25 -0000 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 # , tmp847, tmp847 b .L63 # # ... ... .LC19: .word 0 .word 2146435072 .align 3 Which is, literally, inf/inf. -- Xi Ruoyao School of Aerospace Science and Technology, Xidian University