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

Unified Diff: src/ia32/assembler-ia32.cc

Issue 763963002: [turbofan] Add checked load/store operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Reapply fix. Created 6 years 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 | « src/ia32/assembler-ia32.h ('k') | test/cctest/compiler/simplified-graph-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/assembler-ia32.cc
diff --git a/src/ia32/assembler-ia32.cc b/src/ia32/assembler-ia32.cc
index 50c834f7c22138962c6ad9f8679dc0f2bcf1eb44..9fd01def46f98fbcdbca55378cfadf1561af1665 100644
--- a/src/ia32/assembler-ia32.cc
+++ b/src/ia32/assembler-ia32.cc
@@ -457,11 +457,11 @@ void Assembler::mov_b(Register dst, const Operand& src) {
}
-void Assembler::mov_b(const Operand& dst, int8_t imm8) {
+void Assembler::mov_b(const Operand& dst, const Immediate& src) {
EnsureSpace ensure_space(this);
EMIT(0xC6);
emit_operand(eax, dst);
- EMIT(imm8);
+ EMIT(static_cast<int8_t>(src.x_));
}
@@ -489,13 +489,13 @@ void Assembler::mov_w(const Operand& dst, Register src) {
}
-void Assembler::mov_w(const Operand& dst, int16_t imm16) {
+void Assembler::mov_w(const Operand& dst, const Immediate& src) {
EnsureSpace ensure_space(this);
EMIT(0x66);
EMIT(0xC7);
emit_operand(eax, dst);
- EMIT(static_cast<int8_t>(imm16 & 0xff));
- EMIT(static_cast<int8_t>(imm16 >> 8));
+ EMIT(static_cast<int8_t>(src.x_ & 0xff));
+ EMIT(static_cast<int8_t>(src.x_ >> 8));
}
« no previous file with comments | « src/ia32/assembler-ia32.h ('k') | test/cctest/compiler/simplified-graph-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698