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

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

Issue 2627543003: [wasm] Prerequisites for WebAssembly Table.Grow (Closed)
Patch Set: Rename update function Created 3 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 | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/wasm-compiler.h » ('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 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 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after
2398 __ ld(temp, src); 2398 __ ld(temp, src);
2399 __ sd(temp, g.ToMemOperand(destination)); 2399 __ sd(temp, g.ToMemOperand(destination));
2400 } 2400 }
2401 } else if (source->IsConstant()) { 2401 } else if (source->IsConstant()) {
2402 Constant src = g.ToConstant(source); 2402 Constant src = g.ToConstant(source);
2403 if (destination->IsRegister() || destination->IsStackSlot()) { 2403 if (destination->IsRegister() || destination->IsStackSlot()) {
2404 Register dst = 2404 Register dst =
2405 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 2405 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
2406 switch (src.type()) { 2406 switch (src.type()) {
2407 case Constant::kInt32: 2407 case Constant::kInt32:
2408 if (src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) { 2408 if (RelocInfo::IsWasmSizeReference(src.rmode())) {
2409 __ li(dst, Operand(src.ToInt32(), src.rmode())); 2409 __ li(dst, Operand(src.ToInt32(), src.rmode()));
2410 } else { 2410 } else {
2411 __ li(dst, Operand(src.ToInt32())); 2411 __ li(dst, Operand(src.ToInt32()));
2412 } 2412 }
2413 break; 2413 break;
2414 case Constant::kFloat32: 2414 case Constant::kFloat32:
2415 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 2415 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
2416 break; 2416 break;
2417 case Constant::kInt64: 2417 case Constant::kInt64:
2418 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || 2418 if (RelocInfo::IsWasmPtrReference(src.rmode())) {
2419 src.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE) {
2420 __ li(dst, Operand(src.ToInt64(), src.rmode())); 2419 __ li(dst, Operand(src.ToInt64(), src.rmode()));
2421 } else { 2420 } else {
2422 DCHECK(src.rmode() != RelocInfo::WASM_MEMORY_SIZE_REFERENCE); 2421 DCHECK(!RelocInfo::IsWasmSizeReference(src.rmode()));
2423 __ li(dst, Operand(src.ToInt64())); 2422 __ li(dst, Operand(src.ToInt64()));
2424 } 2423 }
2425 break; 2424 break;
2426 case Constant::kFloat64: 2425 case Constant::kFloat64:
2427 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 2426 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
2428 break; 2427 break;
2429 case Constant::kExternalReference: 2428 case Constant::kExternalReference:
2430 __ li(dst, Operand(src.ToExternalReference())); 2429 __ li(dst, Operand(src.ToExternalReference()));
2431 break; 2430 break;
2432 case Constant::kHeapObject: { 2431 case Constant::kHeapObject: {
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2586 padding_size -= v8::internal::Assembler::kInstrSize; 2585 padding_size -= v8::internal::Assembler::kInstrSize;
2587 } 2586 }
2588 } 2587 }
2589 } 2588 }
2590 2589
2591 #undef __ 2590 #undef __
2592 2591
2593 } // namespace compiler 2592 } // namespace compiler
2594 } // namespace internal 2593 } // namespace internal
2595 } // namespace v8 2594 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/code-generator-mips.cc ('k') | src/compiler/wasm-compiler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698