[libc-commits] [libc] [libc][fenv] Refactor x86 fenv implementations to make it work for various fenv_t. (PR #165015)
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Oct 30 11:06:43 PDT 2025
================
@@ -0,0 +1,259 @@
+//===-- x87 floating point env manipulation functions -----------*- C++ -*-===//
+//
+// 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
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef LLVM_LIBC_SRC___SUPPORT_FPUTIL_X86_64_FENV_X86_COMMON_H
+#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_X86_64_FENV_X86_COMMON_H
+
+#include "hdr/stdint_proxy.h"
+#include "hdr/types/fenv_t.h"
+#include "src/__support/macros/attributes.h"
+#include "src/__support/macros/config.h"
+#include "src/__support/macros/properties/architectures.h"
+#include "src/__support/macros/properties/compiler.h"
+#include "src/__support/macros/properties/cpu_features.h"
+
+namespace LIBC_NAMESPACE_DECL {
+namespace fputil {
+
+namespace internal {
+
+// Default order of floating point exception flags in x87 and mxcsr registers:
+// - Bit 1: Invalid Operations
----------------
michaelrj-google wrote:
below you call the first bit `0` and here you call the first bit `1`. These should probably be consistent
https://github.com/llvm/llvm-project/pull/165015
More information about the libc-commits
mailing list