mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: riscv port for review
Date: Fri, 28 Sep 2018 10:28:14 -0400	[thread overview]
Message-ID: <20180928142814.GU17995@brightrain.aerifal.cx> (raw)
In-Reply-To: <20180928114324.GL10209@port70.net>

On Fri, Sep 28, 2018 at 01:43:24PM +0200, Szabolcs Nagy wrote:
> > diff --git a/src/math/riscv64/fmax.s b/src/math/riscv64/fmax.s
> > new file mode 100644
> > index 0000000..40655d3
> > --- /dev/null
> > +++ b/src/math/riscv64/fmax.s
> > @@ -0,0 +1,5 @@
> > +.global fmax
> > +.type   fmax, %function
> > +fmax:
> > +        fmax.d fa0, fa0, fa1
> > +        ret
> 
> this is ok, but note that
> 
> riscv fmax is ieee-754-2018 maximumNumber(x,y)
> iso c fmax (with ts 18661) is ieee-754-2008 maxNum(x,y)
> 
> (see http://754r.ucbtest.org/drafts/
> and http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1778.pdf )
> 
> they only differ in snan handling, current iso c (and musl)
> does not care about signaling nans, but that might change.
> (glibc cares and gcc has flags to make it care.)

Yes, for now I think it doesn't matter.

> musl is moving away from asm to c code with gcc style inline
> asm wherever possible (the drawback is the dependency on gcc
> asm syntax and constraints, the benefit is that pcs and
> prologue/epilogue are handled by the compiler so all sorts of
> instrumentations like debug info, -fstack-protector-all, etc
> just work).
> 
> so i'd prefer to convert all these asm to c code.
> (can be done after the port goes in)

Indeed, I'd rather do this later as a fixup for all archs at once than
try to work it out now as part of the riscv porting. They're logically
separate tasks.

Rich


  reply	other threads:[~2018-09-28 14:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-28  2:24 Rich Felker
2018-09-28  2:46 ` Rich Felker
2018-10-09 18:05   ` Rich Felker
2018-10-09 21:36     ` Michael Clark
2018-10-10  1:14       ` Khem Raj
2018-10-10  3:41         ` Michael Clark
2018-09-28  2:47 ` Rich Felker
2018-09-28  6:33   ` Michael Clark
2018-09-28  6:49     ` Michael Clark
2018-09-28 10:33     ` Szabolcs Nagy
2018-09-28 14:26       ` Rich Felker
2018-09-28 11:43 ` Szabolcs Nagy
2018-09-28 14:28   ` Rich Felker [this message]
2018-10-11  7:34 ` Michael Forney
2018-10-11 15:49   ` Rich Felker
2018-10-18 21:52   ` Michael Forney
2018-11-11  6:34     ` Michael Forney

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=20180928142814.GU17995@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --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).