On 7/3/24 3:59 AM, Sébastien Michelland wrote:
libgcc's fp-bit.c is quite slow and most modern/developed architectures
have switched to using the soft-fp library. This patch does so for
free-standing/unknown-OS SH3/SH4 builds, using soft-fp's default parameters
for the most part, most notably no exceptions.

A quick run of Whetstone (built with OpenLibm) on an SH4 machine shows
about x3 speedup (~320 -> 1050 Kwhets/s).

I'm sending this as RFC because I'm quite unsure about testing. I built
the compiler and ran the benchmark, but I don't know if GCC has a test
for soft-fp correctness and whether I can run that in my non-hosted
environment. Any advice?

Cheers,
Sébastien

libgcc/ChangeLog:

         * config.host: Use soft-fp library for non-hosted SH3/SH4
         instead of fpdbit.
         * config/sh/sfp-machine.h: New.
I'd really like to hear from Oleg on this, though given we're using the soft-fp library on other targets it seems reasonable at a high level.

As far as testing, the GCC testsuite has some FP components which would implicitly test soft fp on any target that doesn't have hardware floating point.



Jeff

Reply via email to