diff options
author | Moshe <moshberm@Gmail.com> | 2024-02-20 17:52:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 16:52:07 -0600 |
commit | be8b2d1ea54f964603b89ab9d4dfad26afebb347 (patch) | |
tree | d83951f8fa0e1486c688057120c5284275c3dda9 /libc | |
parent | 563ef306017a47d387f1c36dd562b172c1ad0626 (diff) | |
download | llvm-be8b2d1ea54f964603b89ab9d4dfad26afebb347.zip llvm-be8b2d1ea54f964603b89ab9d4dfad26afebb347.tar.gz llvm-be8b2d1ea54f964603b89ab9d4dfad26afebb347.tar.bz2 |
Add explicit conversion to fix arm64 builds. (#82429)
Fixes issue preventing builds on ARM-based Macs.
https://github.com/llvm/llvm-project/issues/82205.
Co-authored-by: Moshe Berman <mosheberman@users.noreply.github.com>
Diffstat (limited to 'libc')
-rw-r--r-- | libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h | 8 |
1 files changed, 4 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 ea1fd68..fd91537 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,8 @@ 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); + FEnv::set_control_word(static_cast<uint32_t>(state->ControlWord)); + FEnv::set_status_word(static_cast<uint32_t>(state->StatusWord)); return 0; } |