[llvm-branch-commits] [libc] [AArch64] - cannot build from release/18.x (PR #101358)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 31 09:19:42 PDT 2024
https://github.com/catull created https://github.com/llvm/llvm-project/pull/101358
Ran into the same problem reported in the mailing list at https://www.mail-archive.com/llvm-bugs@lists.llvm.org/msg73342.html.
The PR fixes the build.
>From 4996721848c2e8118542d85c988661adae8c8045 Mon Sep 17 00:00:00 2001
From: Carlo Dapor <carlo.dapor at mimacom.com>
Date: Wed, 31 Jul 2024 18:15:35 +0200
Subject: [PATCH] [AArch64] fix bug 82205 - can't build in release 18.1.8
---
libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h b/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
index ea1fd68a5fcdf..efd956f14a8a2 100644
--- a/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
+++ b/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
@@ -161,8 +161,8 @@ LIBC_INLINE int set_except(int excepts) {
LIBC_INLINE int raise_except(int excepts) {
float zero = 0.0f;
float one = 1.0f;
- float large_value = FPBits<float>::max_normal();
- float small_value = FPBits<float>::min_normal();
+ float large_value = FPBits<float>::max_normal().get_val();
+ float small_value = FPBits<float>::min_normal().get_val();
auto divfunc = [](float a, float b) {
__asm__ __volatile__("ldr s0, %0\n\t"
"ldr s1, %1\n\t"
@@ -277,8 +277,10 @@ LIBC_INLINE int set_env(const fenv_t *envp) {
return 0;
}
const FEnv::FPState *state = reinterpret_cast<const FEnv::FPState *>(envp);
- FEnv::set_control_word(state->ControlWord);
- FEnv::set_status_word(state->StatusWord);
+ uint32_t control_word = static_cast<uint32_t>(state->ControlWord);
+ uint32_t status_word = static_cast<uint32_t>(state->StatusWord);
+ FEnv::set_control_word(control_word);
+ FEnv::set_status_word(status_word);
return 0;
}
More information about the llvm-branch-commits
mailing list