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

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

Issue 2416543002: [wasm] Fix bounds check for zero initial memory. (Closed)
Patch Set: Add aTODO 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 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 __ lw(temp, src); 2018 __ lw(temp, src);
2019 __ sw(temp, g.ToMemOperand(destination)); 2019 __ sw(temp, g.ToMemOperand(destination));
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 (RelocInfo::IsWasmReference(src.rmode())) {
2029 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE ||
2030 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
2031 __ li(dst, Operand(src.ToInt32(), src.rmode())); 2029 __ li(dst, Operand(src.ToInt32(), src.rmode()));
2032 } else { 2030 } else {
2033 __ li(dst, Operand(src.ToInt32())); 2031 __ li(dst, Operand(src.ToInt32()));
2034 } 2032 }
2035 break; 2033 break;
2036 case Constant::kFloat32: 2034 case Constant::kFloat32:
2037 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 2035 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
2038 break; 2036 break;
2039 case Constant::kInt64: 2037 case Constant::kInt64:
2040 UNREACHABLE(); 2038 UNREACHABLE();
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2249 padding_size -= v8::internal::Assembler::kInstrSize; 2247 padding_size -= v8::internal::Assembler::kInstrSize;
2250 } 2248 }
2251 } 2249 }
2252 } 2250 }
2253 2251
2254 #undef __ 2252 #undef __
2255 2253
2256 } // namespace compiler 2254 } // namespace compiler
2257 } // namespace internal 2255 } // namespace internal
2258 } // namespace v8 2256 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698