public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt
@ 2020-09-03 20:54 Keith Packard
  2020-09-03 20:54 ` [PATCH 1/2] libm/riscv: Fix machine-specific sqrt build process Keith Packard
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Keith Packard @ 2020-09-03 20:54 UTC (permalink / raw)
  To: newlib

RISC-V has a couple of acceleration paths that are designed to repace
the general code for sqrt and fma.

The sqrt code was using the wrong filenames and ended up replacing the
wrong functions (sqrt instead of __ieee754_sqrt). For builds that
disabled errno, that code provided an alias for sqrt mapping to
__ieee754_sqrt so things "worked".

The fma code had the right filenames, but because it only generated
code on machines with hardware support, machines lacking it ended up
replacing the useful general implementation with an empty object file.

To fix this, I've renamed the RISC-V sqrt files then fixed both sqrt
and fma to #include the general code when the machine-specific code
wasn't used.

I tested the result by making sure every libm.a generated for RISC-V
contained exactly one of each relevant function.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-09-07 22:52 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-03 20:54 [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt Keith Packard
2020-09-03 20:54 ` [PATCH 1/2] libm/riscv: Fix machine-specific sqrt build process Keith Packard
2020-09-03 20:54 ` [PATCH 2/2] libm/riscv: Use common fma code when necessary Keith Packard
2020-09-04  3:07 ` [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt Kito Cheng
2020-09-04  4:51   ` Keith Packard
2020-09-07 17:41     ` Joseph Myers
2020-09-07 22:52       ` Keith Packard
2020-09-04 13:11 ` Corinna Vinschen

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 read-only IMAP folder(s) and NNTP newsgroup(s).