Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "[flang] arm build fix" #124569

Merged
merged 1 commit into from
Jan 27, 2025
Merged

Revert "[flang] arm build fix" #124569

merged 1 commit into from
Jan 27, 2025

Conversation

vdonaldson
Copy link
Contributor

Reverts #124562

@llvmbot llvmbot added flang:runtime flang Flang issues not falling into any other category labels Jan 27, 2025
@vdonaldson vdonaldson merged commit 20f72d1 into main Jan 27, 2025
8 of 9 checks passed
@llvmbot
Copy link
Member

llvmbot commented Jan 27, 2025

@llvm/pr-subscribers-flang-runtime

Author: None (vdonaldson)

Changes

Reverts llvm/llvm-project#124562


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

1 Files Affected:

  • (modified) flang/runtime/exceptions.cpp (+3-3)
diff --git a/flang/runtime/exceptions.cpp b/flang/runtime/exceptions.cpp
index 4ea11aa6ee8fc0..7fca0c431f8cd0 100644
--- a/flang/runtime/exceptions.cpp
+++ b/flang/runtime/exceptions.cpp
@@ -108,7 +108,7 @@ bool RTNAME(GetUnderflowMode)(void) {
   return _MM_GET_FLUSH_ZERO_MODE() == _MM_FLUSH_ZERO_OFF;
 #elif defined(_FPU_GETCW)
   uint32_t fpcr;
-  __asm__ __volatile__("mrs    %w0, fpcr" : "=r"(fpcr));
+  _FPU_GETCW(fpcr);
   return (fpcr & _FPU_FPCR_FZ_MASK_) != _FPU_FPCR_FZ_MASK_;
 #else
   return false;
@@ -119,13 +119,13 @@ void RTNAME(SetUnderflowMode)(bool flag) {
   _MM_SET_FLUSH_ZERO_MODE(flag ? _MM_FLUSH_ZERO_OFF : _MM_FLUSH_ZERO_ON);
 #elif defined(_FPU_GETCW)
   uint32_t fpcr;
-  __asm__ __volatile__("mrs    %w0, fpcr" : "=r"(fpcr));
+  _FPU_GETCW(fpcr);
   if (flag) {
     fpcr &= ~_FPU_FPCR_FZ_MASK_;
   } else {
     fpcr |= _FPU_FPCR_FZ_MASK_;
   }
-  __asm__ __volatile__("msr    fpcr, %w0" : : "r"(fpcr));
+  _FPU_SETCW(fpcr);
 #endif
 }
 

@vdonaldson vdonaldson deleted the revert-124562-vkd1 branch January 27, 2025 15:38
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