Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1829)

Unified Diff: src/wasm/encoder.cc

Issue 1581223002: MIPS: Fix unaligned read/write operations in wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/wasm/encoder.cc
diff --git a/src/wasm/encoder.cc b/src/wasm/encoder.cc
index d8d36338b127fba815904d994b2de07f17192b5a..dfdc6cf6c3fde39e9ba027936b6a280386606cba 100644
--- a/src/wasm/encoder.cc
+++ b/src/wasm/encoder.cc
@@ -30,13 +30,13 @@ void EmitUint8(byte** b, uint8_t x) {
void EmitUint16(byte** b, uint16_t x) {
- Memory::uint16_at(*b) = x;
+ WriteUnalignedUInt16(*b, x);
*b += 2;
}
void EmitUint32(byte** b, uint32_t x) {
- Memory::uint32_at(*b) = x;
+ WriteUnalignedUInt32(*b, x);
*b += 4;
}
« src/utils.h ('K') | « src/wasm/ast-decoder.cc ('k') | test/cctest/wasm/wasm-run-utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698