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

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

Issue 1921203002: Add new relocation type WASM_MEMORY_SIZE_REFERENCE, use relocatable pointers to update wasm memory … (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
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 26 matching lines...) Expand all
37 } 37 }
38 38
39 Operand OutputOperand() { return ToOperand(instr_->Output()); } 39 Operand OutputOperand() { return ToOperand(instr_->Output()); }
40 40
41 Immediate ToImmediate(InstructionOperand* operand) { 41 Immediate ToImmediate(InstructionOperand* operand) {
42 Constant constant = ToConstant(operand); 42 Constant constant = ToConstant(operand);
43 if (constant.type() == Constant::kFloat64) { 43 if (constant.type() == Constant::kFloat64) {
44 DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64())); 44 DCHECK_EQ(0, bit_cast<int64_t>(constant.ToFloat64()));
45 return Immediate(0); 45 return Immediate(0);
46 } 46 }
47 if (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE ||
48 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE) {
49 return Immediate(constant.ToInt32(), constant.rmode());
50 }
47 return Immediate(constant.ToInt32()); 51 return Immediate(constant.ToInt32());
48 } 52 }
49 53
50 Operand ToOperand(InstructionOperand* op, int extra = 0) { 54 Operand ToOperand(InstructionOperand* op, int extra = 0) {
51 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot()); 55 DCHECK(op->IsStackSlot() || op->IsDoubleStackSlot());
52 return SlotToOperand(AllocatedOperand::cast(op)->index(), extra); 56 return SlotToOperand(AllocatedOperand::cast(op)->index(), extra);
53 } 57 }
54 58
55 Operand SlotToOperand(int slot_index, int extra = 0) { 59 Operand SlotToOperand(int slot_index, int extra = 0) {
56 FrameOffset offset = frame_access_state()->GetFrameOffset(slot_index); 60 FrameOffset offset = frame_access_state()->GetFrameOffset(slot_index);
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2289 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2293 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2290 __ Nop(padding_size); 2294 __ Nop(padding_size);
2291 } 2295 }
2292 } 2296 }
2293 2297
2294 #undef __ 2298 #undef __
2295 2299
2296 } // namespace compiler 2300 } // namespace compiler
2297 } // namespace internal 2301 } // namespace internal
2298 } // namespace v8 2302 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698