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