OLD | NEW |
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_PPC_FRAMES_PPC_H_ | 5 #ifndef V8_PPC_FRAMES_PPC_H_ |
6 #define V8_PPC_FRAMES_PPC_H_ | 6 #define V8_PPC_FRAMES_PPC_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 1 << 28 | // r28 | 50 1 << 28 | // r28 |
51 1 << 29 | // r29 | 51 1 << 29 | // r29 |
52 1 << 30 | // r20 | 52 1 << 30 | // r20 |
53 1 << 31; // r31 | 53 1 << 31; // r31 |
54 | 54 |
55 | 55 |
56 const int kNumCalleeSaved = 18; | 56 const int kNumCalleeSaved = 18; |
57 | 57 |
58 // Number of registers for which space is reserved in safepoints. Must be a | 58 // Number of registers for which space is reserved in safepoints. Must be a |
59 // multiple of 8. | 59 // multiple of 8. |
60 // TODO(regis): Only 8 registers may actually be sufficient. Revisit. | |
61 const int kNumSafepointRegisters = 32; | 60 const int kNumSafepointRegisters = 32; |
62 | 61 |
63 // Define the list of registers actually saved at safepoints. | |
64 // Note that the number of saved registers may be smaller than the reserved | |
65 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. | |
66 const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; | |
67 const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved; | |
68 | |
69 // The following constants describe the stack frame linkage area as | 62 // The following constants describe the stack frame linkage area as |
70 // defined by the ABI. Note that kNumRequiredStackFrameSlots must | 63 // defined by the ABI. Note that kNumRequiredStackFrameSlots must |
71 // satisfy alignment requirements (rounding up if required). | 64 // satisfy alignment requirements (rounding up if required). |
72 #if V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN | 65 #if V8_TARGET_ARCH_PPC64 && V8_TARGET_LITTLE_ENDIAN |
73 // [0] back chain | 66 // [0] back chain |
74 // [1] condition register save area | 67 // [1] condition register save area |
75 // [2] link register save area | 68 // [2] link register save area |
76 // [3] TOC save area | 69 // [3] TOC save area |
77 // [4] Parameter1 save area | 70 // [4] Parameter1 save area |
78 // ... | 71 // ... |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 | 109 |
117 class EntryFrameConstants : public AllStatic { | 110 class EntryFrameConstants : public AllStatic { |
118 public: | 111 public: |
119 static const int kCallerFPOffset = | 112 static const int kCallerFPOffset = |
120 -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); | 113 -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); |
121 }; | 114 }; |
122 | 115 |
123 | 116 |
124 class ExitFrameConstants : public AllStatic { | 117 class ExitFrameConstants : public AllStatic { |
125 public: | 118 public: |
126 #if V8_OOL_CONSTANT_POOL | |
127 static const int kFrameSize = 3 * kPointerSize; | |
128 static const int kConstantPoolOffset = -3 * kPointerSize; | |
129 #else | |
130 static const int kFrameSize = 2 * kPointerSize; | 119 static const int kFrameSize = 2 * kPointerSize; |
131 static const int kConstantPoolOffset = 0; // Not used. | 120 static const int kConstantPoolOffset = 0; // Not used. |
132 #endif | |
133 static const int kCodeOffset = -2 * kPointerSize; | 121 static const int kCodeOffset = -2 * kPointerSize; |
134 static const int kSPOffset = -1 * kPointerSize; | 122 static const int kSPOffset = -1 * kPointerSize; |
135 | 123 |
136 // The caller fields are below the frame pointer on the stack. | 124 // The caller fields are below the frame pointer on the stack. |
137 static const int kCallerFPOffset = 0 * kPointerSize; | 125 static const int kCallerFPOffset = 0 * kPointerSize; |
138 // The calling JS function is below FP. | 126 // The calling JS function is below FP. |
139 static const int kCallerPCOffset = 1 * kPointerSize; | 127 static const int kCallerPCOffset = 1 * kPointerSize; |
140 | 128 |
141 // FP-relative displacement of the caller's SP. It points just | 129 // FP-relative displacement of the caller's SP. It points just |
142 // below the saved PC. | 130 // below the saved PC. |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 } | 181 } |
194 | 182 |
195 | 183 |
196 inline void StackHandler::SetFp(Address slot, Address fp) { | 184 inline void StackHandler::SetFp(Address slot, Address fp) { |
197 Memory::Address_at(slot) = fp; | 185 Memory::Address_at(slot) = fp; |
198 } | 186 } |
199 } | 187 } |
200 } // namespace v8::internal | 188 } // namespace v8::internal |
201 | 189 |
202 #endif // V8_PPC_FRAMES_PPC_H_ | 190 #endif // V8_PPC_FRAMES_PPC_H_ |
OLD | NEW |