OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_ARM_FRAMES_ARM_H_ | 5 #ifndef V8_ARM_FRAMES_ARM_H_ |
6 #define V8_ARM_FRAMES_ARM_H_ | 6 #define V8_ARM_FRAMES_ARM_H_ |
7 | 7 |
8 namespace v8 { | 8 namespace v8 { |
9 namespace internal { | 9 namespace internal { |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 | 59 |
60 // Double registers d8 to d15 are callee-saved. | 60 // Double registers d8 to d15 are callee-saved. |
61 const int kNumDoubleCalleeSaved = 8; | 61 const int kNumDoubleCalleeSaved = 8; |
62 | 62 |
63 | 63 |
64 // Number of registers for which space is reserved in safepoints. Must be a | 64 // Number of registers for which space is reserved in safepoints. Must be a |
65 // multiple of 8. | 65 // multiple of 8. |
66 // TODO(regis): Only 8 registers may actually be sufficient. Revisit. | 66 // TODO(regis): Only 8 registers may actually be sufficient. Revisit. |
67 const int kNumSafepointRegisters = 16; | 67 const int kNumSafepointRegisters = 16; |
68 | 68 |
| 69 // The embedded constant pool pointer (r8/pp) is not included in the safepoint |
| 70 // since it is not tagged. This register is preserved in the stack frame where |
| 71 // its value will be updated if GC code movement occurs. Including it in the |
| 72 // safepoint (where it will not be relocated) would cause a stale value to be |
| 73 // restored. |
| 74 const RegList kConstantPointerRegMask = |
| 75 FLAG_enable_embedded_constant_pool ? (1 << 8) : 0; |
| 76 const int kNumConstantPoolPointerReg = |
| 77 FLAG_enable_embedded_constant_pool ? 1 : 0; |
| 78 |
69 // Define the list of registers actually saved at safepoints. | 79 // Define the list of registers actually saved at safepoints. |
70 // Note that the number of saved registers may be smaller than the reserved | 80 // Note that the number of saved registers may be smaller than the reserved |
71 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. | 81 // space, i.e. kNumSafepointSavedRegisters <= kNumSafepointRegisters. |
72 const RegList kSafepointSavedRegisters = kJSCallerSaved | kCalleeSaved; | 82 const RegList kSafepointSavedRegisters = |
73 const int kNumSafepointSavedRegisters = kNumJSCallerSaved + kNumCalleeSaved; | 83 kJSCallerSaved | (kCalleeSaved & ~kConstantPointerRegMask); |
| 84 const int kNumSafepointSavedRegisters = |
| 85 kNumJSCallerSaved + kNumCalleeSaved - kNumConstantPoolPointerReg; |
74 | 86 |
75 // ---------------------------------------------------- | 87 // ---------------------------------------------------- |
76 | 88 |
77 | 89 |
78 class EntryFrameConstants : public AllStatic { | 90 class EntryFrameConstants : public AllStatic { |
79 public: | 91 public: |
80 static const int kCallerFPOffset = | 92 static const int kCallerFPOffset = |
81 -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); | 93 -(StandardFrameConstants::kFixedFrameSizeFromFp + kPointerSize); |
82 }; | 94 }; |
83 | 95 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 160 |
149 inline Object* JavaScriptFrame::function_slot_object() const { | 161 inline Object* JavaScriptFrame::function_slot_object() const { |
150 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 162 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
151 return Memory::Object_at(fp() + offset); | 163 return Memory::Object_at(fp() + offset); |
152 } | 164 } |
153 | 165 |
154 | 166 |
155 } } // namespace v8::internal | 167 } } // namespace v8::internal |
156 | 168 |
157 #endif // V8_ARM_FRAMES_ARM_H_ | 169 #endif // V8_ARM_FRAMES_ARM_H_ |
OLD | NEW |