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 2662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2738 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2736 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2739 __ Nop(padding_size); | 2737 __ Nop(padding_size); |
2740 } | 2738 } |
2741 } | 2739 } |
2742 | 2740 |
2743 #undef __ | 2741 #undef __ |
2744 | 2742 |
2745 } // namespace compiler | 2743 } // namespace compiler |
2746 } // namespace internal | 2744 } // namespace internal |
2747 } // namespace v8 | 2745 } // namespace v8 |
OLD | NEW |