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

Unified Diff: src/compiler/x64/code-generator-x64.cc

Issue 828303002: [x64] Rearrange code for OOB integer loads. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 12 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 | test/mjsunit/compiler/regress-445858.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/x64/code-generator-x64.cc
diff --git a/src/compiler/x64/code-generator-x64.cc b/src/compiler/x64/code-generator-x64.cc
index 40f3247fd44309bde975221f804a4249d0fd63db..0480f9dc90e34745161d37eb4efd8c8cc7e1d469 100644
--- a/src/compiler/x64/code-generator-x64.cc
+++ b/src/compiler/x64/code-generator-x64.cc
@@ -354,12 +354,15 @@ class OutOfLineTruncateDoubleToI FINAL : public OutOfLineCode {
length_(length) {} \
\
void Generate() FINAL { \
+ Label oob; \
__ leal(kScratchRegister, Operand(index1_, index2_)); \
- __ xorl(result_, result_); \
__ cmpl(kScratchRegister, Immediate(length_)); \
- __ j(above_equal, exit()); \
+ __ j(above_equal, &oob, Label::kNear); \
__ asm_instr(result_, \
Operand(buffer_, kScratchRegister, times_1, 0)); \
+ __ jmp(exit()); \
+ __ bind(&oob); \
+ __ xorl(result_, result_); \
} \
\
private: \
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-445858.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698