Skip to content

Conversation

@vdonaldson
Copy link
Contributor

Place floating point environment calls under '#ifdef __USE_GNU'.

Place floating point environment calls under '#ifdef __USE_GNU'.
@llvmbot llvmbot added flang:runtime flang Flang issues not falling into any other category labels Dec 24, 2024
@llvmbot
Copy link
Member

llvmbot commented Dec 24, 2024

@llvm/pr-subscribers-flang-runtime

Author: None (vdonaldson)

Changes

Place floating point environment calls under '#ifdef __USE_GNU'.


Full diff: https://github.com/llvm/llvm-project/pull/121032.diff

1 Files Affected:

  • (modified) flang/runtime/exceptions.cpp (+1-1)
diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 1ed00538fef396..2fa2baa2ec84a2 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -84,7 +84,7 @@ uint32_t RTNAME(MapException)(uint32_t excepts) {
 // Check if the processor has the ability to control whether to halt or
 // continue execution when a given exception is raised.
 bool RTNAME(SupportHalting)([[maybe_unused]] uint32_t except) {
-#if (defined(__arm__) || defined(__aarch64__)) && !defined(_WIN32)
+#ifdef __USE_GNU
   except = RTNAME(MapException)(except);
   int currentSet = fegetexcept(), flipSet, ok;
   if (currentSet & except) {

@vdonaldson vdonaldson merged commit df12983 into llvm:main Dec 24, 2024
11 checks passed
@vdonaldson vdonaldson deleted the vkd1 branch January 6, 2025 19:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

flang:runtime flang Flang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants