Implement __flt_rounds() for RISC-V. RISC-V is "interesting" since it
authorkettenis <kettenis@openbsd.org>
Wed, 28 Apr 2021 15:38:59 +0000 (15:38 +0000)
committerkettenis <kettenis@openbsd.org>
Wed, 28 Apr 2021 15:38:59 +0000 (15:38 +0000)
commit0bcd3eeb4adbf1b8039f4f7f536d66f59ccf461f
tree33839c3ceaa41dfdb2089a52179ae666abc6230b
parent52d74504d702880624d72c7bacf91a2e3a045172
Implement __flt_rounds() for RISC-V.  RISC-V is "interesting" since it
implements a variation on the traditional "to nearest" rounding mode that
rounds away from zero when tied.  The upcoming C2x includes support for that
and LLVM already implements this so provide an implementation that matches
our system compiler.

ok drahn@
lib/libc/arch/riscv64/gen/flt_rounds.c [new file with mode: 0644]