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=DKIM_SIGNED,DKIM_VALID, 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 20506 invoked from network); 24 Jul 2020 17:50:02 -0000 Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with ESMTPUTF8; 24 Jul 2020 17:50:02 -0000 Received: (qmail 7450 invoked by uid 550); 24 Jul 2020 17:49:57 -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 7432 invoked from network); 24 Jul 2020 17:49:57 -0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1595612997; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: Cc: To: From: Sender; bh=U/ExYTKej3xhWbTC73y2IY1tqpRAJj1Obg1s+V4n+Rg=; b=VhLbpjmJFdvWwEi+9eOugudOCIV344BiEv34JPbCvp86oQLIFuBMKebiaAe3DTqWwD2N2LB2 UJyZ+cWwvbSyYCNdPdTk6jdOvGTXCtAqs6/sBvW5650Q0IbFXLaYAkuS3FJyNGXXMXk9+Ig+ YKenqukrorNOMRxZ+NfZi3ydMPY= X-Mailgun-Sending-Ip: 104.130.122.29 X-Mailgun-Sid: WyI1MGQzMyIsICJtdXNsQGxpc3RzLm9wZW53YWxsLmNvbSIsICJiZTllNGEiXQ== Sender: sidneym=codeaurora.org@mg.codeaurora.org DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org AA3A9C433C9 Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: aws-us-west-2-caf-mail-1.web.codeaurora.org; spf=none smtp.mailfrom=sidneym@codeaurora.org From: To: "'Szabolcs Nagy'" Cc: "'Rich Felker'" , References: <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> <20200620032032.GR6430@brightrain.aerifal.cx> <078f01d65edc$80e892f0$82b9b8d0$@codeaurora.org> <20200723215603.GA755469@port70.net> In-Reply-To: <20200723215603.GA755469@port70.net> Date: Fri, 24 Jul 2020 12:49:42 -0500 Message-ID: <21d501d661e2$d059fd70$710df850$@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQITbC+6xE1Q7TE9kqvPqv9uwQJ0TQJmvdBAAVfRAeoCQt23wgIW6VRJAX1stKkBoLffngKKfuZmAh2x56MC/BF0FgHdLCtsp/cnV6A= Content-Language: en-us Subject: RE: [musl] Hexagon DSP support > -----Original Message----- > From: Szabolcs Nagy > Sent: Thursday, July 23, 2020 4:56 PM > To: sidneym@codeaurora.org > Cc: 'Rich Felker' ; musl@lists.openwall.com > Subject: Re: [musl] Hexagon DSP support > > * sidneym@codeaurora.org [2020-07-20 > 16:26:58 -0500]: > > I removed fma/fmal/fmax/fmin/fabs from compiler-rt-builtins, > > https://reviews.llvm.org/D82263 > > The comparison with musl can be found here: > > https://github.com/quic/musl/compare/hexagon but I've also attached > > the patch. > > > > An assert in clang when building both musl and libc-test for hexagon > > was fixed by, https://reviews.llvm.org/D80952 prior to this change > > -frounding-math had to be used. > > > > The test-results are also attached. Everything is built with the > > tip-of-tree llvm so sometimes results vary but these are the results I > > got from this morning's clone. The only notable difference in the > > results would be that both fma and fmal fail and this is because of > > the compiler-rt change. I didn't add fma to musl because it require > > more complex assembly, along the lines you saw in an earlier version with > sqrt. > > > the fma and sqrt failures are still not fully explained, e.g. this looks wrong: > > src/math/special/fma.h:42: RN fma(0x1p+0,0x1p+0,-0x1p-1074) want 0x1p+0 > got -0x1.fffffp-43 ulperr -4503599627370496.000 = -0x1p+52 + 0x0p+0 > > the only target specific bit in fma is a_clz_64 so i would check that. > > e.g. a_clz_64(1ULL << 42) should give 21 (this computation happens during > the fma test case above). Hexagon didn't have a_clz_64 implemented however I added this morning it and noticed no differences. I will update the patch with that routine included. I did notice a compiler regression in how it compiled fma and have asked a compiler person to take a look. An older version of our internally maintained compiler does produce the expected results for the values I used but later versions do not. Unfortunately changing optimization levels will produce different results as well. Thanks,