From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: (qmail 6006 invoked from network); 16 Apr 2020 16:27:20 -0000 Received-SPF: pass (mother.openwall.net: domain of lists.openwall.com designates 195.42.179.200 as permitted sender) receiver=inbox.vuxu.org; client-ip=195.42.179.200 envelope-from= Received: from mother.openwall.net (195.42.179.200) by inbox.vuxu.org with UTF8ESMTPZ; 16 Apr 2020 16:27:20 -0000 Received: (qmail 26079 invoked by uid 550); 16 Apr 2020 16:27:18 -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 26044 invoked from network); 16 Apr 2020 16:27:16 -0000 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1587054437; h=Content-Transfer-Encoding: Content-Type: MIME-Version: Message-ID: Date: Subject: In-Reply-To: References: To: From: Sender; bh=MJoFhQt73b6wOtCMWuSO0zeoqWef3PQf30m+elC3GBo=; b=QIcwba8k9ruoPxYhXF0uKuaC4ZZtyfF1CaGJD1io532OYx06JQrlzR4rzeV/FqTgiYSdx1TE DLrTR6QCFwFbsmKMi+4nH+E8r83Gtf6HJxsPHY0ayI4EC5uWrvuD4LQVcNkTrsSaaZee8ZmL Ly3Q4QgzH6RBp5moV99N0pCkzG4= X-Mailgun-Sending-Ip: 104.130.122.27 X-Mailgun-Sid: WyI1MGQzMyIsICJtdXNsQGxpc3RzLm9wZW53YWxsLmNvbSIsICJiZTllNGEiXQ== Sender: sidneym=codeaurora.org@mg.codeaurora.org DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 4D250C433CB 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: "'Rich Felker'" , References: <000a01d61328$7f2614b0$7d723e10$@codeaurora.org> <20200415163015.GG11469@brightrain.aerifal.cx> <029101d6134e$56d4ece0$047ec6a0$@codeaurora.org> <20200415180620.GA23945@port70.net> <02b601d61352$d3d8b8d0$7b8a2a70$@codeaurora.org> <20200416093637.GB23945@port70.net> <20200416153403.GS11469@brightrain.aerifal.cx> In-Reply-To: <20200416153403.GS11469@brightrain.aerifal.cx> Date: Thu, 16 Apr 2020 11:26:52 -0500 Message-ID: <0d3901d6140b$d6e49a30$84adce90$@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: AQHkV58ScAdBNwj630CIo9BoWbE/LAG/C8uTAgnT0b4CPVarLQFiWsQJAcOTyfABnlgTIKgJDugQ Content-Language: en-us Subject: RE: [musl] Hexagon DSP support > -----Original Message----- > From: Rich Felker > Sent: Thursday, April 16, 2020 10:34 AM > To: sidneym@codeaurora.org; musl@lists.openwall.com > Subject: Re: [musl] Hexagon DSP support > > On Thu, Apr 16, 2020 at 11:36:38AM +0200, Szabolcs Nagy wrote: > > * sidneym@codeaurora.org [2020-04-15 > 13:22:29 -0500]: > > > > sqrt/sqrtf should work too (you may want to implement them if > > > > there is a single instruction) other math failures are not target specific. > > > > > > In fact that does go away if I used the hardware accelerated routine that > is > > > part of compiler-rt.builtins (__hexagon_sqrt) Creating an explicit > > > reference to compiler-rt-builtins vs just copying the assembly, > > > which is preferred? > > > > the preferred is like on other targets an inline asm block. > > i think using __builtin_sqrt may be fine too if you know that all > > hexagon compilers support that and doesnt generate an actual sqrt call > > (e.g. on gcc that needs -fno-math-errno). > > __builtin_sqrt is explicitly allowed to compile to an external call to sqrt (at > compiler discretion), and thus can't be used to implement the sqrt function. > If you're implementing a native sqrt it should be inline asm. But the C sqrt > should work too. If it's not working that indicates a bug in the compiler, in the > code in musl, or in qemu, and whichever it is we should track that down and > get it fixed. I will add the assembly version for sqrt. There was an issue in qemu when using the assembly version but that is fixed. FWIW when I use the soft version with clang for hexagon I still see errors, mostly looking for INEXACT but not seeing it. > > Rich