V8 Project
frames-arm64.h
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 
7 
8 #ifndef V8_ARM64_FRAMES_ARM64_H_
9 #define V8_ARM64_FRAMES_ARM64_H_
10 
11 namespace v8 {
12 namespace internal {
13 
14 const int kNumRegs = kNumberOfRegisters;
15 // Registers x0-x17 are caller-saved.
16 const int kNumJSCallerSaved = 18;
17 const RegList kJSCallerSaved = 0x3ffff;
18 
19 // Number of registers for which space is reserved in safepoints. Must be a
20 // multiple of eight.
21 // TODO(all): Refine this number.
22 const int kNumSafepointRegisters = 32;
23 
24 // Define the list of registers actually saved at safepoints.
25 // Note that the number of saved registers may be smaller than the reserved
26 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters.
27 #define kSafepointSavedRegisters CPURegList::GetSafepointSavedRegisters().list()
28 #define kNumSafepointSavedRegisters \
29  CPURegList::GetSafepointSavedRegisters().Count();
30 
31 class EntryFrameConstants : public AllStatic {
32  public:
33  static const int kCallerFPOffset =
35 };
36 
37 
38 class ExitFrameConstants : public AllStatic {
39  public:
40  static const int kFrameSize = 2 * kPointerSize;
41 
42  static const int kCallerSPDisplacement = 2 * kPointerSize;
43  static const int kCallerPCOffset = 1 * kPointerSize;
44  static const int kCallerFPOffset = 0 * kPointerSize; // <- fp
45  static const int kSPOffset = -1 * kPointerSize;
46  static const int kCodeOffset = -2 * kPointerSize;
47  static const int kLastExitFrameField = kCodeOffset;
48 
49  static const int kConstantPoolOffset = 0; // Not used
50 };
51 
52 
53 class JavaScriptFrameConstants : public AllStatic {
54  public:
55  // FP-relative.
57 
58  // There are two words on the stack (saved fp and saved lr) between fp and
59  // the arguments.
60  static const int kLastParameterOffset = 2 * kPointerSize;
61 
63 };
64 
65 
66 class ArgumentsAdaptorFrameConstants : public AllStatic {
67  public:
68  // FP-relative.
70 
71  static const int kFrameSize =
73 };
74 
75 
76 class ConstructFrameConstants : public AllStatic {
77  public:
78  // FP-relative.
80  static const int kLengthOffset = -4 * kPointerSize;
81  static const int kConstructorOffset = -5 * kPointerSize;
82  static const int kImplicitReceiverOffset = -6 * kPointerSize;
83 
84  static const int kFrameSize =
86 };
87 
88 
89 class InternalFrameConstants : public AllStatic {
90  public:
91  // FP-relative.
93 };
94 
95 
98  return Memory::Object_at(fp() + offset);
99 }
100 
101 
102 inline void StackHandler::SetFp(Address slot, Address fp) {
103  Memory::Address_at(slot) = fp;
104 }
105 
106 
107 } } // namespace v8::internal
108 
109 #endif // V8_ARM64_FRAMES_ARM64_H_
static const int kImplicitReceiverOffset
Definition: frames-arm.h:132
static const int kCallerFPOffset
Definition: frames-arm.h:80
static const int kCallerSPDisplacement
Definition: frames-arm.h:102
static const int kCallerPCOffset
Definition: frames-arm.h:98
static const int kLastExitFrameField
Definition: frames-arm64.h:47
static const int kCodeOffset
Definition: frames-arm.h:92
static const int kConstantPoolOffset
Definition: frames-arm.h:90
static const int kCallerFPOffset
Definition: frames-arm.h:96
Object * function_slot_object() const
Definition: frames-arm.h:149
static Object *& Object_at(Address addr)
Definition: v8memory.h:60
static Address & Address_at(Address addr)
Definition: v8memory.h:56
static const int kFixedFrameSizeFromFp
Definition: frames.h:157
static const int kFixedFrameSize
Definition: frames.h:158
static const int kExpressionsOffset
Definition: frames.h:160
static const int kMarkerOffset
Definition: frames.h:161
const int kPointerSize
Definition: globals.h:129
const RegList kJSCallerSaved
Definition: frames-arm.h:24
const int kNumSafepointRegisters
Definition: frames-arm.h:67
const Register fp
kSerializedDataOffset Object
Definition: objects-inl.h:5322
uint32_t RegList
Definition: frames.h:18
byte * Address
Definition: globals.h:101
const int kNumJSCallerSaved
Definition: frames-arm.h:30
const unsigned kNumberOfRegisters
const int kNumRegs
Definition: frames-arm.h:20
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20