llvm-project
6c8c816b - [libc] Fix feature check for riscv (#145169)

Commit
102 days ago
[libc] Fix feature check for riscv (#145169) This PR fixes the feature detection for RISC-V floating-point support in LLVM's libc implementation. The `__riscv_flen` macro represents the floating-point register width in bits (32, 64, or 128). Since Extension D is specifically documented as implying F, we can use simple >= comparisons to detect them. For half-precision support, the implementation checks for the Zfhmin extension as RVA22 and RVA23 profiles only require Zfhmin rather than the full Zfh extension. Zfh also implies Zfhmin, so checking for Zfhmin should cover all cases.
Parents
Loading