From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 28741 invoked from network); 20 Jun 2020 03:20:52 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 20 Jun 2020 03:20:52 -0000 Received: (qmail 32588 invoked by uid 550); 20 Jun 2020 03:20:47 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Reply-To: musl@lists.openwall.com Received: (qmail 32564 invoked from network); 20 Jun 2020 03:20:46 -0000 Date: Fri, 19 Jun 2020 23:20:34 -0400 From: Rich Felker To: sidneym@codeaurora.org Cc: musl@lists.openwall.com, 'Szabolcs Nagy' Message-ID: <20200620032032.GR6430@brightrain.aerifal.cx> References: <20200415192940.GJ11469@brightrain.aerifal.cx> <005a01d61f40$dc8cc7b0$95a65710$@codeaurora.org> <20200430235109.GJ21576@brightrain.aerifal.cx> <8c3611dcf8e2c59885fecd9ebdc70d79@codeaurora.org> <20200506005929.GG21576@brightrain.aerifal.cx> <1a0301d6458e$b4264d90$1c72e8b0$@codeaurora.org> <20200618214247.GD2048759@port70.net> <096001d64684$d322d0f0$796872d0$@codeaurora.org> <20200619224624.GO6430@brightrain.aerifal.cx> <0a7201d646aa$921b84f0$b6528ed0$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <0a7201d646aa$921b84f0$b6528ed0$@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [musl] Hexagon DSP support On Fri, Jun 19, 2020 at 09:29:04PM -0500, sidneym@codeaurora.org wrote: > > > > -----Original Message----- > > From: Rich Felker > > Sent: Friday, June 19, 2020 5:46 PM > > To: sidneym@codeaurora.org > > Cc: 'Szabolcs Nagy' ; musl@lists.openwall.com > > Subject: Re: [musl] Hexagon DSP support > > > > On Fri, Jun 19, 2020 at 04:58:53PM -0500, sidneym@codeaurora.org wrote: > > > > > > > -----Original Message----- > > > > From: Szabolcs Nagy > > > > Sent: Thursday, June 18, 2020 4:43 PM > > > > To: sidneym@codeaurora.org > > > > Cc: musl@lists.openwall.com > > > > Subject: Re: [musl] Hexagon DSP support > > > > > > > > * sidneym@codeaurora.org [2020-06-18 > > > > 11:37:05 > > > > -0500]: > > > > > I attached the updated REPORT with warning output disabled, -w and > > > > > -fno-rounding-math (See > > > > > https://bugs.llvm.org/show_bug.cgi?id=45329) > > > > > along with the patch. I've rebased a couple of times without any > > > > > conflicts and the git repo is here: > > > > > https://github.com/quic/musl/tree/hexagon > > > > > > > > the fmal failures are a bit concerning: > > > > > > > > fmal should be a tail call to fma if long double has the same > > > representation as > > > > double. (can you please verify this? there should be a single branch > > > instruction > > > > in fmal) > > > > > > > > there are no fma failures with the same tests so fmal should work > > > > fine > > > too. > > > > > > In the case of fma the selected function comes from > compiler-rt-builtins. > > > It looks like since fmal calls fma within the context of the c-library > > > the c-library's version is branched to. > > > > Are you talking about how libc-test was built or how musl was built? > > This kind of replacement is not valid in either place. musl is built with > - > > ffreestanding, and libc-test is expected to be built with -fno-builtin. > > > The link order is the reason. The clang driver places > -lclang_rt.builtins-hexagon ahead of -lc and it happens that this library > includes an implementation of fma. I think fma is something that was > introduced in error in compiler-rt.builtins because hexagon is the only arch > that has it. Yes, that's a bug. compiler-rt cannot define libc functions. Rich