OLD | NEW |
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/compilation-info.h" | 7 #include "src/compilation-info.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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 } | 53 } |
54 | 54 |
55 Operand HighOperand(InstructionOperand* op) { | 55 Operand HighOperand(InstructionOperand* op) { |
56 DCHECK(op->IsFPStackSlot()); | 56 DCHECK(op->IsFPStackSlot()); |
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 && | 62 if (constant.type() == Constant::kInt32 && |
63 (constant.rmode() == RelocInfo::WASM_MEMORY_REFERENCE || | 63 RelocInfo::IsWasmReference(constant.rmode())) { |
64 constant.rmode() == RelocInfo::WASM_GLOBAL_REFERENCE || | |
65 constant.rmode() == RelocInfo::WASM_MEMORY_SIZE_REFERENCE)) { | |
66 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), | 64 return Immediate(reinterpret_cast<Address>(constant.ToInt32()), |
67 constant.rmode()); | 65 constant.rmode()); |
68 } | 66 } |
69 switch (constant.type()) { | 67 switch (constant.type()) { |
70 case Constant::kInt32: | 68 case Constant::kInt32: |
71 return Immediate(constant.ToInt32()); | 69 return Immediate(constant.ToInt32()); |
72 case Constant::kFloat32: | 70 case Constant::kFloat32: |
73 return Immediate( | 71 return Immediate( |
74 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); | 72 isolate()->factory()->NewNumber(constant.ToFloat32(), TENURED)); |
75 case Constant::kFloat64: | 73 case Constant::kFloat64: |
(...skipping 2638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2714 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2712 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2715 __ Nop(padding_size); | 2713 __ Nop(padding_size); |
2716 } | 2714 } |
2717 } | 2715 } |
2718 | 2716 |
2719 #undef __ | 2717 #undef __ |
2720 | 2718 |
2721 } // namespace compiler | 2719 } // namespace compiler |
2722 } // namespace internal | 2720 } // namespace internal |
2723 } // namespace v8 | 2721 } // namespace v8 |
OLD | NEW |