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 #ifndef V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 5 #ifndef V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
6 #define V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 6 #define V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
7 | 7 |
8 #include "src/crankshaft/arm64/delayed-masm-arm64.h" | 8 #include "src/crankshaft/arm64/delayed-masm-arm64.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 | 10 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 // Registers used to solve cycles. | 61 // Registers used to solve cycles. |
62 const Register& SavedValueRegister() { | 62 const Register& SavedValueRegister() { |
63 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode( | 63 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode( |
64 masm_.ScratchRegister().code())); | 64 masm_.ScratchRegister().code())); |
65 return masm_.ScratchRegister(); | 65 return masm_.ScratchRegister(); |
66 } | 66 } |
67 // The scratch register is used to break cycles and to store constant. | 67 // The scratch register is used to break cycles and to store constant. |
68 // These two methods switch from one mode to the other. | 68 // These two methods switch from one mode to the other. |
69 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); } | 69 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); } |
70 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); } | 70 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); } |
71 const FPRegister& SavedFPValueRegister() { | 71 const VRegister& SavedFPValueRegister() { |
72 // We use the Crankshaft floating-point scratch register to break a cycle | 72 // We use the Crankshaft floating-point scratch register to break a cycle |
73 // involving double values as the MacroAssembler will not need it for the | 73 // involving double values as the MacroAssembler will not need it for the |
74 // operations performed by the gap resolver. | 74 // operations performed by the gap resolver. |
75 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode( | 75 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode( |
76 crankshaft_fp_scratch.code())); | 76 crankshaft_fp_scratch.code())); |
77 return crankshaft_fp_scratch; | 77 return crankshaft_fp_scratch; |
78 } | 78 } |
79 | 79 |
80 LCodeGen* cgen_; | 80 LCodeGen* cgen_; |
81 DelayedGapMasm masm_; | 81 DelayedGapMasm masm_; |
82 | 82 |
83 // List of moves not yet resolved. | 83 // List of moves not yet resolved. |
84 ZoneList<LMoveOperands> moves_; | 84 ZoneList<LMoveOperands> moves_; |
85 | 85 |
86 int root_index_; | 86 int root_index_; |
87 bool in_cycle_; | 87 bool in_cycle_; |
88 LOperand* saved_destination_; | 88 LOperand* saved_destination_; |
89 }; | 89 }; |
90 | 90 |
91 } // namespace internal | 91 } // namespace internal |
92 } // namespace v8 | 92 } // namespace v8 |
93 | 93 |
94 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 94 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
OLD | NEW |