From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/13328 Path: news.gmane.org!.POSTED!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: riscv port for review Date: Fri, 28 Sep 2018 13:43:24 +0200 Message-ID: <20180928114324.GL10209@port70.net> References: <20180928022404.GQ17995@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1538134892 10202 195.159.176.226 (28 Sep 2018 11:41:32 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Fri, 28 Sep 2018 11:41:32 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) To: musl@lists.openwall.com Original-X-From: musl-return-13344-gllmg-musl=m.gmane.org@lists.openwall.com Fri Sep 28 13:41:28 2018 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1g5r9D-0002XW-GG for gllmg-musl@m.gmane.org; Fri, 28 Sep 2018 13:41:27 +0200 Original-Received: (qmail 18334 invoked by uid 550); 28 Sep 2018 11:43:36 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 18316 invoked from network); 28 Sep 2018 11:43:36 -0000 Mail-Followup-To: musl@lists.openwall.com Content-Disposition: inline In-Reply-To: <20180928022404.GQ17995@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:13328 Archived-At: > 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.) 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)