From: Kito Cheng <kito.cheng@gmail.com>
To: Keith Packard <keithp@keithp.com>
Cc: Newlib <newlib@sourceware.org>
Subject: Re: [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt
Date: Fri, 4 Sep 2020 11:07:22 +0800 [thread overview]
Message-ID: <CA+yXCZARaAT6ZgWu=XKzKur_DgkBvCRhY9WE4OM-aE0cXQ61Qw@mail.gmail.com> (raw)
In-Reply-To: <20200903205433.2108717-1-keithp@keithp.com>
Hi Keith:
Thanks! and it's LGTM.
Seems like those issues can't be captured by GCC testsuite, I should
add more tests to my regular patch review test list :)
On Fri, Sep 4, 2020 at 4:55 AM Keith Packard via Newlib
<newlib@sourceware.org> wrote:
>
> 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.
>
>
next prev parent reply other threads:[~2020-09-04 3:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
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
2020-09-03 20:54 ` [PATCH 2/2] libm/riscv: Use common fma code when necessary Keith Packard
2020-09-04 3:07 ` Kito Cheng [this message]
2020-09-04 4:51 ` [PATCH 0/2] libm/riscv: Fixing machine-specific fma/sqrt Keith Packard
2020-09-07 17:41 ` Joseph Myers
2020-09-07 22:52 ` Keith Packard
2020-09-04 13:11 ` Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CA+yXCZARaAT6ZgWu=XKzKur_DgkBvCRhY9WE4OM-aE0cXQ61Qw@mail.gmail.com' \
--to=kito.cheng@gmail.com \
--cc=keithp@keithp.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).