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

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

Issue 1494123002: [turbofan, arm64] Fix native stack parameters on arm64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Minor changes according to comments. Created 5 years 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 146
147 enum Flag { 147 enum Flag {
148 kNoFlags = 0u, 148 kNoFlags = 0u,
149 kNeedsFrameState = 1u << 0, 149 kNeedsFrameState = 1u << 0,
150 kPatchableCallSite = 1u << 1, 150 kPatchableCallSite = 1u << 1,
151 kNeedsNopAfterCall = 1u << 2, 151 kNeedsNopAfterCall = 1u << 2,
152 kHasExceptionHandler = 1u << 3, 152 kHasExceptionHandler = 1u << 3,
153 kHasLocalCatchHandler = 1u << 4, 153 kHasLocalCatchHandler = 1u << 4,
154 kSupportsTailCalls = 1u << 5, 154 kSupportsTailCalls = 1u << 5,
155 kCanUseRoots = 1u << 6, 155 kCanUseRoots = 1u << 6,
156 // Indicates that the native stack should be used for a code object. This
157 // information is important for native calls on arm64.
158 kUseNativeStack = 1u << 7,
156 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall 159 kPatchableCallSiteWithNop = kPatchableCallSite | kNeedsNopAfterCall
157 }; 160 };
158 typedef base::Flags<Flag> Flags; 161 typedef base::Flags<Flag> Flags;
159 162
160 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc, 163 CallDescriptor(Kind kind, MachineType target_type, LinkageLocation target_loc,
161 const MachineSignature* machine_sig, 164 const MachineSignature* machine_sig,
162 LocationSignature* location_sig, size_t stack_param_count, 165 LocationSignature* location_sig, size_t stack_param_count,
163 Operator::Properties properties, 166 Operator::Properties properties,
164 RegList callee_saved_registers, 167 RegList callee_saved_registers,
165 RegList callee_saved_fp_registers, Flags flags, 168 RegList callee_saved_fp_registers, Flags flags,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 // receiver, context, etc. 214 // receiver, context, etc.
212 // TODO(titzer): this should input the framestate input too. 215 // TODO(titzer): this should input the framestate input too.
213 size_t InputCount() const { return 1 + machine_sig_->parameter_count(); } 216 size_t InputCount() const { return 1 + machine_sig_->parameter_count(); }
214 217
215 size_t FrameStateCount() const { return NeedsFrameState() ? 1 : 0; } 218 size_t FrameStateCount() const { return NeedsFrameState() ? 1 : 0; }
216 219
217 Flags flags() const { return flags_; } 220 Flags flags() const { return flags_; }
218 221
219 bool NeedsFrameState() const { return flags() & kNeedsFrameState; } 222 bool NeedsFrameState() const { return flags() & kNeedsFrameState; }
220 bool SupportsTailCalls() const { return flags() & kSupportsTailCalls; } 223 bool SupportsTailCalls() const { return flags() & kSupportsTailCalls; }
224 bool UseNativeStack() const { return flags() & kUseNativeStack; }
221 225
222 LinkageLocation GetReturnLocation(size_t index) const { 226 LinkageLocation GetReturnLocation(size_t index) const {
223 return location_sig_->GetReturn(index); 227 return location_sig_->GetReturn(index);
224 } 228 }
225 229
226 LinkageLocation GetInputLocation(size_t index) const { 230 LinkageLocation GetInputLocation(size_t index) const {
227 if (index == 0) return target_loc_; 231 if (index == 0) return target_loc_;
228 return location_sig_->GetParam(index - 1); 232 return location_sig_->GetParam(index - 1);
229 } 233 }
230 234
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 CallDescriptor* const incoming_; 395 CallDescriptor* const incoming_;
392 396
393 DISALLOW_COPY_AND_ASSIGN(Linkage); 397 DISALLOW_COPY_AND_ASSIGN(Linkage);
394 }; 398 };
395 399
396 } // namespace compiler 400 } // namespace compiler
397 } // namespace internal 401 } // namespace internal
398 } // namespace v8 402 } // namespace v8
399 403
400 #endif // V8_COMPILER_LINKAGE_H_ 404 #endif // V8_COMPILER_LINKAGE_H_
OLDNEW
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.cc ('k') | test/cctest/compiler/test-run-native-calls.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698