[libc-commits] [libc] [libc][stdfix] Implement fixed point `countlsfx` functions in llvm-libc (PR #125356)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Fri Feb 7 11:11:08 PST 2025
================
@@ -163,6 +176,26 @@ template <typename T> LIBC_INLINE constexpr T round(T x, int n) {
return bit_and((x + round_bit), rounding_mask);
}
+// count leading sign bits
+template <typename T>
+LIBC_INLINE constexpr cpp::enable_if_t<cpp::is_fixed_point_v<T>, int>
+countls(T f) {
----------------
nickdesaulniers wrote:
```
libc/src/__support/fixed_point/fx_bits.h:182:11: error: unused parameter 'f' [-Werror,-Wunused-parameter]
182 | countls(T f) {
| ^
```
guessing `x` below was supposed to be `f`?
https://github.com/llvm/llvm-project/pull/125356
More information about the libc-commits
mailing list