Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Fri, 28 Sep 2018 13:43:24 +0200
From: Szabolcs Nagy <nsz@...t70.net>
To: musl@...ts.openwall.com
Subject: Re: riscv port for review

> 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)

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.