Page MenuHomeFreeBSD

riscv: Add a soft-float implementation of fabs()
ClosedPublic

Authored by arichardson on Mar 1 2021, 11:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jun 10, 7:17 PM
Unknown Object (File)
Tue, Jun 9, 5:05 AM
Unknown Object (File)
Mon, Jun 1, 8:50 PM
Unknown Object (File)
Mon, Jun 1, 4:16 PM
Unknown Object (File)
Mon, Jun 1, 3:01 AM
Unknown Object (File)
Sat, May 30, 2:17 PM
Unknown Object (File)
May 13 2026, 9:39 PM
Unknown Object (File)
May 11 2026, 10:03 PM
Subscribers

Details

Summary

We could just use a C implementation using __builtin_fabs(), but using
this assembly version guarantees that there is no additional prolog/epilog
code. Additionally, clang generates worse code for masking off the top bit
than GCC: https://bugs.llvm.org/show_bug.cgi?id=49377.

Test Plan

Should fix RISCV64 softfloat world build

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable