v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
frame-constants-arm64.cc
Go to the documentation of this file.
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
3// found in the LICENSE file.
4
6
7#if V8_TARGET_ARCH_ARM64
8
10
14
15namespace v8 {
16namespace internal {
17
18Register JavaScriptFrame::fp_register() { return v8::internal::fp; }
21
23 static_assert(InterpreterFrameConstants::kFixedFrameSize % 16 == 0);
24 // Round up to a multiple of two, to make the frame a multiple of 16 bytes.
25 return RoundUp(register_count, 2);
26}
27
29 // Round the total slot count up to a multiple of two, to make the frame a
30 // multiple of 16 bytes.
31 int slot_count = kFixedSlotCount + register_count;
32 int rounded_slot_count = RoundUp(slot_count, 2);
33 return rounded_slot_count - slot_count;
34}
35
36// static
37intptr_t MaglevFrame::StackGuardFrameSize(int register_input_count) {
38 // Include any paddings from kFixedFrameSizeFromFp, an extra slot + padding
39 // for the single argument into StackGuardWithGap and finally padded register
40 // input count.
42 2 /* argument */ + RoundUp(register_input_count, 2);
43 return slot_count * kSystemPointerSize;
44}
45
46} // namespace internal
47} // namespace v8
48
49#endif // V8_TARGET_ARCH_ARM64
static Register constant_pool_pointer_register()
static intptr_t StackGuardFrameSize(int register_input_count)
static int RegisterStackSlotCount(int register_count)
constexpr int kSystemPointerSize
Definition globals.h:410
constexpr Register cp
constexpr T RoundUp(T x, intptr_t m)
Definition macros.h:387