Skip to content

Commit

Permalink
[libc][NFC] Simplify FPBits expressions (#78590)
Browse files Browse the repository at this point in the history
  • Loading branch information
gchatelet committed Jan 19, 2024
1 parent 8b4bb15 commit 28d64c1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions libc/src/__support/FPUtil/aarch64/FEnvImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ LIBC_INLINE int set_except(int excepts) {
LIBC_INLINE int raise_except(int excepts) {
float zero = 0.0f;
float one = 1.0f;
float largeValue = float(FPBits<float>(FPBits<float>::MAX_NORMAL));
float smallValue = float(FPBits<float>(FPBits<float>::MIN_NORMAL));
float largeValue = FPBits<float>::max_normal();
float smallValue = FPBits<float>::min_normal();
auto divfunc = [](float a, float b) {
__asm__ __volatile__("ldr s0, %0\n\t"
"ldr s1, %1\n\t"
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 = float(FPBits<float>(FPBits<float>::MAX_NORMAL));
float small_value = float(FPBits<float>(FPBits<float>::MIN_NORMAL));
float large_value = FPBits<float>::max_normal();
float small_value = FPBits<float>::min_normal();
auto divfunc = [](float a, float b) {
__asm__ __volatile__("ldr s0, %0\n\t"
"ldr s1, %1\n\t"
Expand Down
4 changes: 2 additions & 2 deletions libc/src/__support/FPUtil/arm/FEnvImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,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 = float(FPBits<float>(FPBits<float>::MAX_NORMAL));
float small_value = float(FPBits<float>(FPBits<float>::MIN_NORMAL));
float large_value = FPBits<float>::max_normal();
float small_value = FPBits<float>::min_normal();
auto divfunc = [](float a, float b) {
__asm__ __volatile__("flds s0, %0\n\t"
"flds s1, %1\n\t"
Expand Down

0 comments on commit 28d64c1

Please sign in to comment.