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

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

Issue 1895673002: X87: [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/x87/instruction-selector-x87.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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/ast/scopes.h" 7 #include "src/ast/scopes.h"
8 #include "src/compiler/code-generator-impl.h" 8 #include "src/compiler/code-generator-impl.h"
9 #include "src/compiler/gap-resolver.h" 9 #include "src/compiler/gap-resolver.h"
10 #include "src/compiler/node-matchers.h" 10 #include "src/compiler/node-matchers.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 offset.offset() + extra); 52 offset.offset() + extra);
53 } 53 }
54 54
55 Operand HighOperand(InstructionOperand* op) { 55 Operand HighOperand(InstructionOperand* op) {
56 DCHECK(op->IsDoubleStackSlot()); 56 DCHECK(op->IsDoubleStackSlot());
57 return ToOperand(op, kPointerSize); 57 return ToOperand(op, kPointerSize);
58 } 58 }
59 59
60 Immediate ToImmediate(InstructionOperand* operand) { 60 Immediate ToImmediate(InstructionOperand* operand) {
61 Constant constant = ToConstant(operand); 61 Constant constant = ToConstant(operand);
62 if (constant.type() == Constant::kInt32 &&
63 constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE) {
64 return Immediate(reinterpret_cast<Address>(constant.ToInt32()),
65 constant.rmode());
66 }
62 switch (constant.type()) { 67 switch (constant.type()) {
63 case Constant::kInt32: 68 case Constant::kInt32:
64 return Immediate(constant.ToInt32()); 69 return Immediate(constant.ToInt32());
65 case Constant::kFloat32: 70 case Constant::kFloat32:
66 return Immediate( 71 return Immediate(
67 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); 72 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED));
68 case Constant::kFloat64: 73 case Constant::kFloat64:
69 return Immediate( 74 return Immediate(
70 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED)); 75 isolate()->factory()->NewNumber(constant.ToFloat64(), TENURED));
71 case Constant::kExternalReference: 76 case Constant::kExternalReference:
(...skipping 2367 matching lines...) Expand 10 before | Expand all | Expand 10 after
2439 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2444 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2440 __ Nop(padding_size); 2445 __ Nop(padding_size);
2441 } 2446 }
2442 } 2447 }
2443 2448
2444 #undef __ 2449 #undef __
2445 2450
2446 } // namespace compiler 2451 } // namespace compiler
2447 } // namespace internal 2452 } // namespace internal
2448 } // namespace v8 2453 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/x87/instruction-selector-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698