Skip to content

Commit e8171f3

Browse files
committed
Address comments.
1 parent 35d0e82 commit e8171f3

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

libc/src/__support/CPP/bit.h

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,9 @@ LIBC_INLINE constexpr cpp::enable_if_t<
6868
void>
6969
bit_copy(const From &from, To &to) {
7070
MSAN_UNPOISON(&from, sizeof(From));
71-
if constexpr (sizeof(To) == sizeof(From)) {
72-
to = bit_cast<To>(from);
73-
} else {
74-
char *dst = reinterpret_cast<char *>(&to);
75-
const char *src = reinterpret_cast<const char *>(&from);
76-
inline_copy<sizeof(From)>(src, dst);
77-
}
71+
char *dst = reinterpret_cast<char *>(&to);
72+
const char *src = reinterpret_cast<const char *>(&from);
73+
inline_copy<sizeof(From)>(src, dst);
7874
}
7975

8076
template <typename T>

libc/src/__support/FPUtil/x86_64/fenv_mxcsr_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ LIBC_INLINE static void raise_except(uint16_t excepts) {
114114
[[maybe_unused]] volatile float z = EXCEPTION_INPUTS[idx][0];
115115
z /= EXCEPTION_INPUTS[idx][1];
116116
} else {
117-
// For the remaining exceptions, we floating point multiplications.
117+
// For the remaining exceptions, we use floating point multiplications.
118118
[[maybe_unused]] volatile float z = EXCEPTION_INPUTS[idx][0];
119119
z *= EXCEPTION_INPUTS[idx][1];
120120
}

libc/src/__support/FPUtil/x86_64/fenv_x86_common.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ struct RoundingControl {
7878
static constexpr uint16_t ERROR = 0xFFFF;
7979
};
8080

81-
static constexpr uint16_t MXCSR_ROUNDING_CONTROL_BIT_POSITION = 13;
82-
8381
// Exception flags are individual bits in the corresponding registers.
8482
// So, we just OR the bit values to get the full set of exceptions.
8583
LIBC_INLINE static uint16_t get_status_value_from_except(int excepts) {

0 commit comments

Comments
 (0)