mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Szabolcs Nagy <nsz@port70.net>
To: musl@lists.openwall.com
Subject: Re: [PATCH] aarch64: add single instruction math functions
Date: Sun, 19 Mar 2017 15:51:34 +0100	[thread overview]
Message-ID: <20170319145134.GR2082@port70.net> (raw)
In-Reply-To: <CAGWvnymCQGPgoxNGgnpSZmsKXN7-Ut6+U2AuWT=48uYU1auEWA@mail.gmail.com>

* David Edelsohn <dje.gcc@gmail.com> [2017-03-19 08:55:58 -0400]:
> I thought that the goal of musl was "Minimal machine-specific code".
> Does musl want to start a new arms race?

this is not ideal, but the generic code is not ideal either.
gcc will inline most calls and those will behave differently
compared to the generic code as explained (at least for some
of the rounding functions and fma)

i plan to add FP_FAST_FMA support in math.h but for that
targets with fma should have a single instruction implementation.
(it turns out gcc does not set __FP_FAST_FMA correctly so
the libc has to work harder)

another approach i thought of but did not implement was

math/builtin/foo.c has '.. return __builtin_foo(); ..' and
math/arch/foo.c has '#include "../builtin/foo.c"' ifdefed if the
compiler has support for the builtin and it is known to be not a
call libc.  (then the maintenance is minimized on the musl side,
it's on the compiler to get it right, but we need much more
configure check machinery)


  reply	other threads:[~2017-03-19 14:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-19  4:26 Szabolcs Nagy
2017-03-19 12:55 ` David Edelsohn
2017-03-19 14:51   ` Szabolcs Nagy [this message]
2017-03-19 15:05   ` Rich Felker
2017-03-21 16:50     ` David Edelsohn
2017-03-21 16:58       ` Rich Felker
2017-03-21 16:50 ` Rich Felker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170319145134.GR2082@port70.net \
    --to=nsz@port70.net \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).