Skip to content

Commit 89dd2e4

Browse files
committed
Fix for windows.
1 parent cfb88e7 commit 89dd2e4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,9 @@ LIBC_INLINE static int get_env(fenv_t *env) {
142142
// we merge sse data to x87 state.
143143
internal::mxcsr_to_x87_state(static_cast<uint16_t>(mxcsr), x87_state);
144144
// Copy the state data;
145-
cpp::bit_copy(x87_state, *env);
145+
const char *x87_state_ptr = reinterpret_cast<const char *>(&x87_state);
146+
char *fenv_ptr = reinterpret_cast<char *>(env);
147+
cpp::inline_copy<sizeof(x87_state)>(x87_state_ptr, fenv_ptr);
146148
} else {
147149
// We expect to have at least extra 32-bit for mxcsr register in the
148150
// fenv_t.

0 commit comments

Comments
 (0)