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
F136125506: D28994.diff
Sat, Nov 15, 11:51 PM
Unknown Object (File)
Fri, Nov 14, 4:57 AM
Unknown Object (File)
Mon, Nov 10, 7:43 PM
Unknown Object (File)
Thu, Nov 6, 10:36 AM
Unknown Object (File)
Wed, Nov 5, 5:38 AM
Unknown Object (File)
Wed, Nov 5, 1:09 AM
Unknown Object (File)
Wed, Oct 29, 9:06 AM
Unknown Object (File)
Oct 16 2025, 6:33 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