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

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

Issue 1959653002: MIPS: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm m… (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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 | src/compiler/mips64/code-generator-mips64.cc » ('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/ast/scopes.h" 5 #include "src/ast/scopes.h"
6 #include "src/compiler/code-generator.h" 6 #include "src/compiler/code-generator.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 1785 matching lines...) Expand 10 before | Expand all | Expand 10 after
1796 __ lw(temp, src); 1796 __ lw(temp, src);
1797 __ sw(temp, g.ToMemOperand(destination)); 1797 __ sw(temp, g.ToMemOperand(destination));
1798 } 1798 }
1799 } else if (source->IsConstant()) { 1799 } else if (source->IsConstant()) {
1800 Constant src = g.ToConstant(source); 1800 Constant src = g.ToConstant(source);
1801 if (destination->IsRegister() || destination->IsStackSlot()) { 1801 if (destination->IsRegister() || destination->IsStackSlot()) {
1802 Register dst = 1802 Register dst =
1803 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 1803 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
1804 switch (src.type()) { 1804 switch (src.type()) {
1805 case Constant::kInt32: 1805 case Constant::kInt32:
1806 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { 1806 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
1807 src.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
1807 __ li(dst, Operand(src.ToInt32(), src.rmode())); 1808 __ li(dst, Operand(src.ToInt32(), src.rmode()));
1808 } else { 1809 } else {
1809 __ li(dst, Operand(src.ToInt32())); 1810 __ li(dst, Operand(src.ToInt32()));
1810 } 1811 }
1811 break; 1812 break;
1812 case Constant::kFloat32: 1813 case Constant::kFloat32:
1813 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 1814 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
1814 break; 1815 break;
1815 case Constant::kInt64: 1816 case Constant::kInt64:
1816 UNREACHABLE(); 1817 UNREACHABLE();
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
1976 padding_size -= v8::internal::Assembler::kInstrSize; 1977 padding_size -= v8::internal::Assembler::kInstrSize;
1977 } 1978 }
1978 } 1979 }
1979 } 1980 }
1980 1981
1981 #undef __ 1982 #undef __
1982 1983
1983 } // namespace compiler 1984 } // namespace compiler
1984 } // namespace internal 1985 } // namespace internal
1985 } // namespace v8 1986 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/mips64/code-generator-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698