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

Side by Side 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, 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 unified diff | Download patch
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-445858.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/code-generator.h" 5 #include "src/compiler/code-generator.h"
6 6
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/node-properties-inl.h" 10 #include "src/compiler/node-properties-inl.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 Register buffer, Register index1, int32_t index2, \ 347 Register buffer, Register index1, int32_t index2, \
348 int32_t length) \ 348 int32_t length) \
349 : OutOfLineCode(gen), \ 349 : OutOfLineCode(gen), \
350 result_(result), \ 350 result_(result), \
351 buffer_(buffer), \ 351 buffer_(buffer), \
352 index1_(index1), \ 352 index1_(index1), \
353 index2_(index2), \ 353 index2_(index2), \
354 length_(length) {} \ 354 length_(length) {} \
355 \ 355 \
356 void Generate() FINAL { \ 356 void Generate() FINAL { \
357 Label oob; \
357 __ leal(kScratchRegister, Operand(index1_, index2_)); \ 358 __ leal(kScratchRegister, Operand(index1_, index2_)); \
358 __ xorl(result_, result_); \
359 __ cmpl(kScratchRegister, Immediate(length_)); \ 359 __ cmpl(kScratchRegister, Immediate(length_)); \
360 __ j(above_equal, exit()); \ 360 __ j(above_equal, &oob, Label::kNear); \
361 __ asm_instr(result_, \ 361 __ asm_instr(result_, \
362 Operand(buffer_, kScratchRegister, times_1, 0)); \ 362 Operand(buffer_, kScratchRegister, times_1, 0)); \
363 __ jmp(exit()); \
364 __ bind(&oob); \
365 __ xorl(result_, result_); \
363 } \ 366 } \
364 \ 367 \
365 private: \ 368 private: \
366 Register const result_; \ 369 Register const result_; \
367 Register const buffer_; \ 370 Register const buffer_; \
368 Register const index1_; \ 371 Register const index1_; \
369 int32_t const index2_; \ 372 int32_t const index2_; \
370 int32_t const length_; \ 373 int32_t const length_; \
371 }; \ 374 }; \
372 ool = new (zone()) \ 375 ool = new (zone()) \
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 } 1414 }
1412 } 1415 }
1413 MarkLazyDeoptSite(); 1416 MarkLazyDeoptSite();
1414 } 1417 }
1415 1418
1416 #undef __ 1419 #undef __
1417 1420
1418 } // namespace internal 1421 } // namespace internal
1419 } // namespace compiler 1422 } // namespace compiler
1420 } // namespace v8 1423 } // namespace v8
OLDNEW
« 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