Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Thu, 16 Apr 2020 11:26:52 -0500
From: <sidneym@...eaurora.org>
To: "'Rich Felker'" <dalias@...c.org>,
	<musl@...ts.openwall.com>
Subject: RE: Hexagon DSP support



> -----Original Message-----
> From: Rich Felker <dalias@...c.org>
> Sent: Thursday, April 16, 2020 10:34 AM
> To: sidneym@...eaurora.org; musl@...ts.openwall.com
> Subject: Re: [musl] Hexagon DSP support
> 
> On Thu, Apr 16, 2020 at 11:36:38AM +0200, Szabolcs Nagy wrote:
> > * sidneym@...eaurora.org <sidneym@...eaurora.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

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.