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

Side by Side Diff: src/compiler/linkage.h

Issue 1191513003: [turbofan] Add CalleeSavedFPRegisters to CallDescriptor. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Nits. Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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_COMPILER_LINKAGE_H_ 5 #ifndef V8_COMPILER_LINKAGE_H_
6 #define V8_COMPILER_LINKAGE_H_ 6 #define V8_COMPILER_LINKAGE_H_
7 7
8 #include "src/base/flags.h" 8 #include "src/base/flags.h"
9 #include "src/compiler/frame.h" 9 #include "src/compiler/frame.h"
10 #include "src/compiler/machine-type.h" 10 #include "src/compiler/machine-type.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 kHasLocalCatchHandler = 1u << 4, 76 kHasLocalCatchHandler = 1u << 4,
77 kSupportsTailCalls = 1u << 5, 77 kSupportsTailCalls = 1u << 5,
78 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall 78 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
79 }; 79 };
80 typedef base::Flags<Flag> Flags; 80 typedef base::Flags<Flag> Flags;
81 81
82 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, 82 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc,
83 const MachineSignature* machine_sig, 83 const MachineSignature* machine_sig,
84 LocationSignature* location_sig, size_t js_param_count, 84 LocationSignature* location_sig, size_t js_param_count,
85 Operator::Properties properties, 85 Operator::Properties properties,
86 RegList callee_saved_registers, Flags flags, 86 RegList callee_saved_registers,
87 RegList callee_saved_fp_registers, Flags flags,
87 const char* debug_name = "") 88 const char* debug_name = "")
88 : kind_(kind), 89 : kind_(kind),
89 target_type_(target_type), 90 target_type_(target_type),
90 target_loc_(target_loc), 91 target_loc_(target_loc),
91 machine_sig_(machine_sig), 92 machine_sig_(machine_sig),
92 location_sig_(location_sig), 93 location_sig_(location_sig),
93 js_param_count_(js_param_count), 94 js_param_count_(js_param_count),
94 properties_(properties), 95 properties_(properties),
95 callee_saved_registers_(callee_saved_registers), 96 callee_saved_registers_(callee_saved_registers),
97 callee_saved_fp_registers_(callee_saved_fp_registers),
96 flags_(flags), 98 flags_(flags),
97 debug_name_(debug_name) { 99 debug_name_(debug_name) {
98 DCHECK(machine_sig->return_count() == location_sig->return_count()); 100 DCHECK(machine_sig->return_count() == location_sig->return_count());
99 DCHECK(machine_sig->parameter_count() == location_sig->parameter_count()); 101 DCHECK(machine_sig->parameter_count() == location_sig->parameter_count());
100 } 102 }
101 103
102 // Returns the kind of this call. 104 // Returns the kind of this call.
103 Kind kind() const { return kind_; } 105 Kind kind() const { return kind_; }
104 106
105 // Returns {true} if this descriptor is a call to a JSFunction. 107 // Returns {true} if this descriptor is a call to a JSFunction.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 if (index == 0) return target_type_; 145 if (index == 0) return target_type_;
144 return machine_sig_->GetParam(index - 1); 146 return machine_sig_->GetParam(index - 1);
145 } 147 }
146 148
147 // Operator properties describe how this call can be optimized, if at all. 149 // Operator properties describe how this call can be optimized, if at all.
148 Operator::Properties properties() const { return properties_; } 150 Operator::Properties properties() const { return properties_; }
149 151
150 // Get the callee-saved registers, if any, across this call. 152 // Get the callee-saved registers, if any, across this call.
151 RegList CalleeSavedRegisters() const { return callee_saved_registers_; } 153 RegList CalleeSavedRegisters() const { return callee_saved_registers_; }
152 154
155 // Get the callee-saved FP registers, if any, across this call.
156 RegList CalleeSavedFPRegisters() const { return callee_saved_fp_registers_; }
157
153 const char* debug_name() const { return debug_name_; } 158 const char* debug_name() const { return debug_name_; }
154 159
155 bool UsesOnlyRegisters() const; 160 bool UsesOnlyRegisters() const;
156 161
157 bool HasSameReturnLocationsAs(const CallDescriptor* other) const; 162 bool HasSameReturnLocationsAs(const CallDescriptor* other) const;
158 163
159 private: 164 private:
160 friend class Linkage; 165 friend class Linkage;
161 166
162 const Kind kind_; 167 const Kind kind_;
163 const MachineType target_type_; 168 const MachineType target_type_;
164 const LinkageLocation target_loc_; 169 const LinkageLocation target_loc_;
165 const MachineSignature* const machine_sig_; 170 const MachineSignature* const machine_sig_;
166 const LocationSignature* const location_sig_; 171 const LocationSignature* const location_sig_;
167 const size_t js_param_count_; 172 const size_t js_param_count_;
168 const Operator::Properties properties_; 173 const Operator::Properties properties_;
169 const RegList callee_saved_registers_; 174 const RegList callee_saved_registers_;
175 const RegList callee_saved_fp_registers_;
170 const Flags flags_; 176 const Flags flags_;
171 const char* const debug_name_; 177 const char* const debug_name_;
172 178
173 DISALLOW_COPY_AND_ASSIGN(CallDescriptor); 179 DISALLOW_COPY_AND_ASSIGN(CallDescriptor);
174 }; 180 };
175 181
176 DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags) 182 DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags)
177 183
178 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d); 184 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d);
179 std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k); 185 std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 CallDescriptor* const incoming_; 263 CallDescriptor* const incoming_;
258 264
259 DISALLOW_COPY_AND_ASSIGN(Linkage); 265 DISALLOW_COPY_AND_ASSIGN(Linkage);
260 }; 266 };
261 267
262 } // namespace compiler 268 } // namespace compiler
263 } // namespace internal 269 } // namespace internal
264 } // namespace v8 270 } // namespace v8
265 271
266 #endif // V8_COMPILER_LINKAGE_H_ 272 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698