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

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: Rebased on bleeding_edge (af4c4b04). Created 5 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
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 C function. 107 // Returns {true} if this descriptor is a call to a C function.
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 if (index == 0) return target_type_; 151 if (index == 0) return target_type_;
150 return machine_sig_->GetParam(index - 1); 152 return machine_sig_->GetParam(index - 1);
151 } 153 }
152 154
153 // Operator properties describe how this call can be optimized, if at all. 155 // Operator properties describe how this call can be optimized, if at all.
154 Operator::Properties properties() const { return properties_; } 156 Operator::Properties properties() const { return properties_; }
155 157
156 // Get the callee-saved registers, if any, across this call. 158 // Get the callee-saved registers, if any, across this call.
157 RegList CalleeSavedRegisters() const { return callee_saved_registers_; } 159 RegList CalleeSavedRegisters() const { return callee_saved_registers_; }
158 160
161 // Get the callee-saved FP registers, if any, across this call.
162 RegList CalleeSavedFPRegisters() const { return callee_saved_fp_registers_; }
163
159 const char* debug_name() const { return debug_name_; } 164 const char* debug_name() const { return debug_name_; }
160 165
161 bool UsesOnlyRegisters() const; 166 bool UsesOnlyRegisters() const;
162 167
163 bool HasSameReturnLocationsAs(const CallDescriptor* other) const; 168 bool HasSameReturnLocationsAs(const CallDescriptor* other) const;
164 169
165 private: 170 private:
166 friend class Linkage; 171 friend class Linkage;
167 172
168 const Kind kind_; 173 const Kind kind_;
169 const MachineType target_type_; 174 const MachineType target_type_;
170 const LinkageLocation target_loc_; 175 const LinkageLocation target_loc_;
171 const MachineSignature* const machine_sig_; 176 const MachineSignature* const machine_sig_;
172 const LocationSignature* const location_sig_; 177 const LocationSignature* const location_sig_;
173 const size_t js_param_count_; 178 const size_t js_param_count_;
174 const Operator::Properties properties_; 179 const Operator::Properties properties_;
175 const RegList callee_saved_registers_; 180 const RegList callee_saved_registers_;
181 const RegList callee_saved_fp_registers_;
176 const Flags flags_; 182 const Flags flags_;
177 const char* const debug_name_; 183 const char* const debug_name_;
178 184
179 DISALLOW_COPY_AND_ASSIGN(CallDescriptor); 185 DISALLOW_COPY_AND_ASSIGN(CallDescriptor);
180 }; 186 };
181 187
182 DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags) 188 DEFINE_OPERATORS_FOR_FLAGS(CallDescriptor::Flags)
183 189
184 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d); 190 std::ostream& operator<<(std::ostream& os, const CallDescriptor& d);
185 std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k); 191 std::ostream& operator<<(std::ostream& os, const CallDescriptor::Kind& k);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 CallDescriptor* const incoming_; 269 CallDescriptor* const incoming_;
264 270
265 DISALLOW_COPY_AND_ASSIGN(Linkage); 271 DISALLOW_COPY_AND_ASSIGN(Linkage);
266 }; 272 };
267 273
268 } // namespace compiler 274 } // namespace compiler
269 } // namespace internal 275 } // namespace internal
270 } // namespace v8 276 } // namespace v8
271 277
272 #endif // V8_COMPILER_LINKAGE_H_ 278 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698