Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: src/crankshaft/arm64/lithium-gap-resolver-arm64.h

Issue 2092413002: [RegisterConfiguration] Streamline access to arch defaults, simplify Registers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 // Emit a move from one stack slot to another. 59 // Emit a move from one stack slot to another.
60 void EmitStackSlotMove(int index) { 60 void EmitStackSlotMove(int index) {
61 masm_.StackSlotMove(moves_[index].source(), moves_[index].destination()); 61 masm_.StackSlotMove(moves_[index].source(), moves_[index].destination());
62 } 62 }
63 63
64 // Verify the move list before performing moves. 64 // Verify the move list before performing moves.
65 void Verify(); 65 void Verify();
66 66
67 // Registers used to solve cycles. 67 // Registers used to solve cycles.
68 const Register& SavedValueRegister() { 68 const Register& SavedValueRegister() {
69 DCHECK(!masm_.ScratchRegister().IsAllocatable()); 69 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(
70 masm_.ScratchRegister().code()));
70 return masm_.ScratchRegister(); 71 return masm_.ScratchRegister();
71 } 72 }
72 // 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.
73 // These two methods switch from one mode to the other. 74 // These two methods switch from one mode to the other.
74 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); } 75 void AcquireSavedValueRegister() { masm_.AcquireScratchRegister(); }
75 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); } 76 void ReleaseSavedValueRegister() { masm_.ReleaseScratchRegister(); }
76 const FPRegister& SavedFPValueRegister() { 77 const FPRegister& SavedFPValueRegister() {
77 // 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
78 // 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
79 // operations performed by the gap resolver. 80 // operations performed by the gap resolver.
80 DCHECK(!crankshaft_fp_scratch.IsAllocatable()); 81 DCHECK(!RegisterConfiguration::Crankshaft()->IsAllocatableGeneralCode(
82 crankshaft_fp_scratch.code()));
81 return crankshaft_fp_scratch; 83 return crankshaft_fp_scratch;
82 } 84 }
83 85
84 LCodeGen* cgen_; 86 LCodeGen* cgen_;
85 DelayedGapMasm masm_; 87 DelayedGapMasm masm_;
86 88
87 // List of moves not yet resolved. 89 // List of moves not yet resolved.
88 ZoneList<LMoveOperands> moves_; 90 ZoneList<LMoveOperands> moves_;
89 91
90 int root_index_; 92 int root_index_;
91 bool in_cycle_; 93 bool in_cycle_;
92 LOperand* saved_destination_; 94 LOperand* saved_destination_;
93 }; 95 };
94 96
95 } // namespace internal 97 } // namespace internal
96 } // namespace v8 98 } // namespace v8
97 99
98 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_ 100 #endif // V8_CRANKSHAFT_ARM64_LITHIUM_GAP_RESOLVER_ARM64_H_
OLDNEW
« no previous file with comments | « src/crankshaft/arm64/lithium-codegen-arm64.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698