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

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

Issue 1846083005: Revert of [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 | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/common-node-cache.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 6
7 #include "src/arm64/frames-arm64.h" 7 #include "src/arm64/frames-arm64.h"
8 #include "src/arm64/macro-assembler-arm64.h" 8 #include "src/arm64/macro-assembler-arm64.h"
9 #include "src/ast/scopes.h" 9 #include "src/ast/scopes.h"
10 #include "src/compiler/code-generator-impl.h" 10 #include "src/compiler/code-generator-impl.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 } 178 }
179 return ToImmediate(op); 179 return ToImmediate(op);
180 } 180 }
181 181
182 Operand ToImmediate(InstructionOperand* operand) { 182 Operand ToImmediate(InstructionOperand* operand) {
183 Constant constant = ToConstant(operand); 183 Constant constant = ToConstant(operand);
184 switch (constant.type()) { 184 switch (constant.type()) {
185 case Constant::kInt32: 185 case Constant::kInt32:
186 return Operand(constant.ToInt32()); 186 return Operand(constant.ToInt32());
187 case Constant::kInt64: 187 case Constant::kInt64:
188 if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) { 188 return Operand(constant.ToInt64());
189 return Operand(constant.ToInt64(), constant.rmode());
190 } else {
191 return Operand(constant.ToInt64());
192 }
193 case Constant::kFloat32: 189 case Constant::kFloat32:
194 return Operand( 190 return Operand(
195 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); 191 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
196 case Constant::kFloat64: 192 case Constant::kFloat64:
197 return Operand( 193 return Operand(
198 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); 194 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED));
199 case Constant::kExternalReference: 195 case Constant::kExternalReference:
200 return Operand(constant.ToExternalReference()); 196 return Operand(constant.ToExternalReference());
201 case Constant::kHeapObject: 197 case Constant::kHeapObject:
202 return Operand(constant.ToHeapObject()); 198 return Operand(constant.ToHeapObject());
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1806 padding_size -= kInstructionSize; 1802 padding_size -= kInstructionSize;
1807 } 1803 }
1808 } 1804 }
1809 } 1805 }
1810 1806
1811 #undef __ 1807 #undef __
1812 1808
1813 } // namespace compiler 1809 } // namespace compiler
1814 } // namespace internal 1810 } // namespace internal
1815 } // namespace v8 1811 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/arm/code-generator-arm.cc ('k') | src/compiler/common-node-cache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698