[libre-riscv-dev] fp special functions

Luke Kenneth Casson Leighton lkcl at lkcl.net
Mon Aug 5 04:49:13 BST 2019


(taking grant and atif off the cc list)

On Mon, Aug 5, 2019 at 1:46 AM Jacob Lifshay <programmerjake at gmail.com> wrote:

> > https://libre-riscv.org/rv_major_opcode_1010011/#transcendentals_1op
> atan2/atan2pi are 2-input 1-output ops.

oh, duh. ok, that moves them to the top level (FADD, FPOW):
https://libre-riscv.org/rv_major_opcode_1010011/#index15h2

> Not sure that reciprocal is needed,

FRCP?

> for correctly rounded results it's the same as fdiv.

ok.  does it save anything?  are there any situations where it would
save something, over using a sequence LOAD-IMM f3, #1 FDIV f3, f4, f4
for example?

> if we want it to not be correctly rounded, I think we should specify
> the exact results to promote repeatability.

am a fan of just saying "IEEE754" here.  exact results.  makes testing
easier, yes.  my feeling is: if people *really want* inaccuracy, it
should be as a sub-extension.

l.



More information about the libre-riscv-dev mailing list