[libc-commits] [libc] [libc][stdfix] fix idiv* doc table and remove duplicate bitsuk source (PR #206729)
via libc-commits
libc-commits at lists.llvm.org
Tue Jun 30 06:27:41 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: sohail (sohail103)
<details>
<summary>Changes</summary>
Two small cleanups in libc/src/stdfix.
1. `idiv*` in `stdfix.rst` was marked as implemented for all 12 type variants but only the 8 non-short width variants (ur, r, ulr, lr, uk, k, ulk, lk) exist in the directory and are built. Updated the table to match.
2. Removed `bitusk.cpp` which is an orphaned duplicate of `bitsuk.cpp` with a typo in the file name. It isn't referenced in the CMakeLists.txt and has no corresponding .h file.
---
Full diff: https://github.com/llvm/llvm-project/pull/206729.diff
2 Files Affected:
- (modified) libc/docs/headers/stdfix.rst (+1-1)
- (removed) libc/src/stdfix/bitusk.cpp (-22)
``````````diff
diff --git a/libc/docs/headers/stdfix.rst b/libc/docs/headers/stdfix.rst
index 76ac7e7b71c95..c3ac4d97650f4 100644
--- a/libc/docs/headers/stdfix.rst
+++ b/libc/docs/headers/stdfix.rst
@@ -75,7 +75,7 @@ The following functions are included in the ISO/IEC TR 18037:2008 standard.
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
| divi\* | | | | | | | | | | | | |
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
-| idiv\* | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| | |check| |
+| idiv\* | | | |check| | |check| | |check| | |check| | | | |check| | |check| | |check| | |check| |
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
| muli | | | | | | | | | | | | |
+---------------+----------------+-------------+---------------+------------+----------------+-------------+----------------+-------------+---------------+------------+----------------+-------------+
diff --git a/libc/src/stdfix/bitusk.cpp b/libc/src/stdfix/bitusk.cpp
deleted file mode 100755
index 8309927f9ed82..0000000000000
--- a/libc/src/stdfix/bitusk.cpp
+++ /dev/null
@@ -1,22 +0,0 @@
-//===-- Implementation for bitsuk function --------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "bitsuk.h"
-#include "include/llvm-libc-macros/stdfix-macros.h" // unsigned accum
-#include "include/llvm-libc-types/uint_uk_t.h"
-#include "src/__support/common.h" // LLVM_LIBC_FUNCTION
-#include "src/__support/fixed_point/fx_bits.h" // fixed_point
-#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
-
-namespace LIBC_NAMESPACE_DECL {
-
-LLVM_LIBC_FUNCTION(uint_uk_t, bitsuk, (unsigned accum f)) {
- return fixed_point::bitsfx<unsigned accum, uint_uk_t>(f);
-}
-
-} // namespace LIBC_NAMESPACE_DECL
``````````
</details>
https://github.com/llvm/llvm-project/pull/206729
More information about the libc-commits
mailing list