We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f383473 commit cd99161Copy full SHA for cd99161
src/v8/v8.cc
@@ -441,7 +441,11 @@ bool V8::setWord(uint64_t pointer, Word word) {
441
if (pointer + size > memory_->data_size()) {
442
return false;
443
}
444
+#if defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
445
+ uint32_t word32 = __builtin_bswap32(word.u32());
446
+#else
447
uint32_t word32 = word.u32();
448
+#endif
449
::memcpy(memory_->data() + pointer, &word32, size);
450
return true;
451
0 commit comments