[libc-commits] [libc] [libc][fenv] Refactor x86 fenv implementations to make it work for various fenv_t. (PR #165015)
via libc-commits
libc-commits at lists.llvm.org
Fri Oct 24 10:26:33 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h libc/src/__support/FPUtil/x86_64/fenv_x86_common.h libc/src/__support/FPUtil/x86_64/fenv_x87_only.h libc/src/__support/FPUtil/x86_64/fenv_x87_utils.h libc/src/__support/CPP/bit.h libc/src/__support/FPUtil/FEnvImpl.h libc/src/__support/FPUtil/x86_64/FEnvImpl.h libc/src/__support/macros/properties/compiler.h libc/test/UnitTest/FEnvSafeTest.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h b/libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h
index 022a27479..43f927fe3 100644
--- a/libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h
+++ b/libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h
@@ -72,7 +72,9 @@ LIBC_INLINE static uint16_t test_except(uint16_t excepts) {
LIBC_INLINE static uint16_t get_except() {
uint32_t mxcsr = get_mxcsr();
- return static_cast<uint16_t>((mxcsr >> ExceptionFlags::MXCSR_EXCEPTION_MASK_BIT_POSITION) & ExceptionFlags::ALL_F);
+ return static_cast<uint16_t>(
+ (mxcsr >> ExceptionFlags::MXCSR_EXCEPTION_MASK_BIT_POSITION) &
+ ExceptionFlags::ALL_F);
}
LIBC_INLINE static void set_except(uint16_t excepts) {
``````````
</details>
https://github.com/llvm/llvm-project/pull/165015
More information about the libc-commits
mailing list