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

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

Issue 1886723003: MIPS: [compiler] Add relocatable pointer constants for wasm memory references. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 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 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1736 __ lw(temp, src); 1736 __ lw(temp, src);
1737 __ sw(temp, g.ToMemOperand(destination)); 1737 __ sw(temp, g.ToMemOperand(destination));
1738 } 1738 }
1739 } else if (source->IsConstant()) { 1739 } else if (source->IsConstant()) {
1740 Constant src = g.ToConstant(source); 1740 Constant src = g.ToConstant(source);
1741 if (destination->IsRegister() || destination->IsStackSlot()) { 1741 if (destination->IsRegister() || destination->IsStackSlot()) {
1742 Register dst = 1742 Register dst =
1743 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg; 1743 destination->IsRegister() ? g.ToRegister(destination) : kScratchReg;
1744 switch (src.type()) { 1744 switch (src.type()) {
1745 case Constant::kInt32: 1745 case Constant::kInt32:
1746 __ li(dst, Operand(src.ToInt32())); 1746 if (src.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
1747 __ li(dst, Operand(src.ToInt32(), src.rmode()));
1748 } else {
1749 __ li(dst, Operand(src.ToInt32()));
1750 }
1747 break; 1751 break;
1748 case Constant::kFloat32: 1752 case Constant::kFloat32:
1749 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED)); 1753 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat32(), TENURED));
1750 break; 1754 break;
1751 case Constant::kInt64: 1755 case Constant::kInt64:
1752 UNREACHABLE(); 1756 UNREACHABLE();
1753 break; 1757 break;
1754 case Constant::kFloat64: 1758 case Constant::kFloat64:
1755 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED)); 1759 __ li(dst, isolate()->factory()->NewNumber(src.ToFloat64(), TENURED));
1756 break; 1760 break;
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 padding_size -= v8::internal::Assembler::kInstrSize; 1923 padding_size -= v8::internal::Assembler::kInstrSize;
1920 } 1924 }
1921 } 1925 }
1922 } 1926 }
1923 1927
1924 #undef __ 1928 #undef __
1925 1929
1926 } // namespace compiler 1930 } // namespace compiler
1927 } // namespace internal 1931 } // namespace internal
1928 } // namespace v8 1932 } // 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