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: \ |