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

Side by Side Diff: src/compiler/x87/code-generator-x87.cc

Issue 2416543002: [wasm] Fix bounds check for zero initial memory. (Closed)
Patch Set: Created 4 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 unified diff | Download patch
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/compilation-info.h" 7 #include "src/compilation-info.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 Operand HighOperand(InstructionOperand* op) { 55 Operand HighOperand(InstructionOperand* op) {
56 DCHECK(op->IsFPStackSlot()); 56 DCHECK(op->IsFPStackSlot());
57 return ToOperand(op, kPointerSize); 57 return ToOperand(op, kPointerSize);
58 } 58 }
59 59
60 Immediate ToImmediate(InstructionOperand* operand) { 60 Immediate ToImmediate(InstructionOperand* operand) {
61 Constant constant = ToConstant(operand); 61 Constant constant = ToConstant(operand);
62 if (constant.type() == Constant::kInt32 && 62 if (constant.type() == Constant::kInt32 &&
63 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || 63 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
64 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || 64 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE ||
65 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) { 65 RelocInfo::IsWasmMemorySizeReference(constant.rmode()))) {
66 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), 66 return Immediate(reinterpret_cast<Address>(constant.ToInt32()),
67 constant.rmode()); 67 constant.rmode());
68 } 68 }
69 switch (constant.type()) { 69 switch (constant.type()) {
70 case Constant::kInt32: 70 case Constant::kInt32:
71 return Immediate(constant.ToInt32()); 71 return Immediate(constant.ToInt32());
72 case Constant::kFloat32: 72 case Constant::kFloat32:
73 return Immediate( 73 return Immediate(
74 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); 74 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
75 case Constant::kFloat64: 75 case Constant::kFloat64:
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after
2714 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2714 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2715 __ Nop(padding_size); 2715 __ Nop(padding_size);
2716 } 2716 }
2717 } 2717 }
2718 2718
2719 #undef __ 2719 #undef __
2720 2720
2721 } // namespace compiler 2721 } // namespace compiler
2722 } // namespace internal 2722 } // namespace internal
2723 } // namespace v8 2723 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698