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

Unified Diff: src/interpreter/bytecodes.cc

Issue 1423373004: MIPS: Fix unaligned read of bytecodes in interpreter. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed nits and typos. Created 5 years, 2 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
« no previous file with comments | « no previous file | src/utils.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.cc
diff --git a/src/interpreter/bytecodes.cc b/src/interpreter/bytecodes.cc
index 8b99f4fb1ce97bc46763a45d71e85117ae015a86..ccb340273d532c49bfa45a3c46c2ab0857ffea90 100644
--- a/src/interpreter/bytecodes.cc
+++ b/src/interpreter/bytecodes.cc
@@ -183,13 +183,13 @@ bool Bytecodes::IsJumpConstant(Bytecode bytecode) {
// static
uint16_t Bytecodes::ShortOperandFromBytes(const uint8_t* bytes) {
- return *reinterpret_cast<const uint16_t*>(bytes);
+ return ReadShortValue(bytes);
rmcilroy 2015/11/05 18:12:01 Could you call this ReadUnalignedUInt16 and get ri
akos.palfi.imgtec 2015/11/05 23:18:00 Done.
}
// static
void Bytecodes::ShortOperandToBytes(uint16_t operand, uint8_t* bytes_out) {
- *reinterpret_cast<uint16_t*>(bytes_out) = operand;
+ WriteShortValue(bytes_out, operand);
}
« no previous file with comments | « no previous file | src/utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698