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

Side by Side Diff: src/compiler/mips/code-generator-mips.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
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/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after
2020 } 2020 }
2021 } else if (source->IsConstant()) { 2021 } else if (source->IsConstant()) {
2022 Constant src = g.ToConstant(source); 2022 Constant src = g.ToConstant(source);
2023 if (destination->IsRegister() || destination->IsStackSlot()) { 2023 if (destination->IsRegister() || destination->IsStackSlot()) {
2024 Register dst = 2024 Register dst =
2025 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 2025 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
2026 switch (src.type()) { 2026 switch (src.type()) {
2027 case Constant::kInt32: 2027 case Constant::kInt32:
2028 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || 2028 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
2029 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || 2029 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE ||
2030 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { 2030 RelocInfo::IsWasmMemorySizeReference(src.rmode())) {
2031 __ li(dst, Operand(src.ToInt32(), src.rmode())); 2031 __ li(dst, Operand(src.ToInt32(), src.rmode()));
2032 } else { 2032 } else {
2033 __ li(dst, Operand(src.ToInt32())); 2033 __ li(dst, Operand(src.ToInt32()));
2034 } 2034 }
2035 break; 2035 break;
2036 case Constant::kFloat32: 2036 case Constant::kFloat32:
2037 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 2037 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
2038 break; 2038 break;
2039 case Constant::kInt64: 2039 case Constant::kInt64:
2040 UNREACHABLE(); 2040 UNREACHABLE();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 padding_size -= v8::internal::Assembler::kInstrSize; 2249 padding_size -= v8::internal::Assembler::kInstrSize;
2250 } 2250 }
2251 } 2251 }
2252 } 2252 }
2253 2253
2254 #undef __ 2254 #undef __
2255 2255
2256 } // namespace compiler 2256 } // namespace compiler
2257 } // namespace internal 2257 } // namespace internal
2258 } // namespace v8 2258 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698