| 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_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 5 #ifndef V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
| 6 #define V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 6 #define V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/arm64/delayed-masm-arm64.h" | 10 #include "src/arm64/delayed-masm-arm64.h" |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 // Emit a move from one stack slot to another. | 61 // Emit a move from one stack slot to another. |
| 62 void EmitStackSlotMove(int index) { | 62 void EmitStackSlotMove(int index) { |
| 63 masm_.StackSlotMove(moves_[index].source(), moves_[index].destination()); | 63 masm_.StackSlotMove(moves_[index].source(), moves_[index].destination()); |
| 64 } | 64 } |
| 65 | 65 |
| 66 // Verify the move list before performing moves. | 66 // Verify the move list before performing moves. |
| 67 void Verify(); | 67 void Verify(); |
| 68 | 68 |
| 69 // Registers used to solve cycles. | 69 // Registers used to solve cycles. |
| 70 const Register& SavedValueRegister() { | 70 const Register& SavedValueRegister() { |
| 71 ASSERT(!masm_.ScratchRegister().IsAllocatable()); | 71 DCHECK(!masm_.ScratchRegister().IsAllocatable()); |
| 72 return masm_.ScratchRegister(); | 72 return masm_.ScratchRegister(); |
| 73 } | 73 } |
| 74 // The scratch register is used to break cycles and to store constant. | 74 // The scratch register is used to break cycles and to store constant. |
| 75 // These two methods switch from one mode to the other. | 75 // These two methods switch from one mode to the other. |
| 76 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); } | 76 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); } |
| 77 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); } | 77 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); } |
| 78 const FPRegister& SavedFPValueRegister() { | 78 const FPRegister& SavedFPValueRegister() { |
| 79 // We use the Crankshaft floating-point scratch register to break a cycle | 79 // We use the Crankshaft floating-point scratch register to break a cycle |
| 80 // involving double values as the MacroAssembler will not need it for the | 80 // involving double values as the MacroAssembler will not need it for the |
| 81 // operations performed by the gap resolver. | 81 // operations performed by the gap resolver. |
| 82 ASSERT(!crankshaft_fp_scratch.IsAllocatable()); | 82 DCHECK(!crankshaft_fp_scratch.IsAllocatable()); |
| 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 v8::internal | 97 } } // namespace v8::internal |
| 98 | 98 |
| 99 #endif // V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ | 99 #endif // V8_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ |
| OLD | NEW |