| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 int JSCallerSavedCode(int n); | 61 int JSCallerSavedCode(int n); |
| 62 | 62 |
| 63 | 63 |
| 64 // Callee-saved registers preserved when switching from C to JavaScript | 64 // Callee-saved registers preserved when switching from C to JavaScript |
| 65 static const RegList kCalleeSaved = | 65 static const RegList kCalleeSaved = |
| 66 1 << 4 | // r4 v1 | 66 1 << 4 | // r4 v1 |
| 67 1 << 5 | // r5 v2 | 67 1 << 5 | // r5 v2 |
| 68 1 << 6 | // r6 v3 | 68 1 << 6 | // r6 v3 |
| 69 1 << 7 | // r7 v4 | 69 1 << 7 | // r7 v4 |
| 70 1 << 8 | // r8 v5 (cp in JavaScript code) | 70 1 << 8 | // r8 v5 (cp in JavaScript code) |
| 71 kR9Available | 71 kR9Available << 9 | // r9 v6 |
| 72 << 9 | // r9 v6 | |
| 73 1 << 10 | // r10 v7 | 72 1 << 10 | // r10 v7 |
| 74 1 << 11; // r11 v8 (fp in JavaScript code) | 73 1 << 11; // r11 v8 (fp in JavaScript code) |
| 75 | 74 |
| 76 static const int kNumCalleeSaved = 7 + kR9Available; | 75 static const int kNumCalleeSaved = 7 + kR9Available; |
| 77 | 76 |
| 78 | 77 |
| 79 // Number of registers for which space is reserved in safepoints. Must be a | 78 // Number of registers for which space is reserved in safepoints. Must be a |
| 80 // multiple of 8. | 79 // multiple of 8. |
| 81 // TODO(regis): Only 8 registers may actually be sufficient. Revisit. | 80 // TODO(regis): Only 8 registers may actually be sufficient. Revisit. |
| 82 static const int kNumSafepointRegisters = 16; | 81 static const int kNumSafepointRegisters = 16; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 103 | 102 |
| 104 | 103 |
| 105 class EntryFrameConstants : public AllStatic { | 104 class EntryFrameConstants : public AllStatic { |
| 106 public: | 105 public: |
| 107 static const int kCallerFPOffset = -3 * kPointerSize; | 106 static const int kCallerFPOffset = -3 * kPointerSize; |
| 108 }; | 107 }; |
| 109 | 108 |
| 110 | 109 |
| 111 class ExitFrameConstants : public AllStatic { | 110 class ExitFrameConstants : public AllStatic { |
| 112 public: | 111 public: |
| 113 static const int kCodeOffset = -1 * kPointerSize; | 112 static const int kCodeOffset = -2 * kPointerSize; |
| 114 static const int kSPOffset = -1 * kPointerSize; | 113 static const int kSPOffset = -1 * kPointerSize; |
| 115 | 114 |
| 116 // TODO(regis): Use a patched sp value on the stack instead. | |
| 117 // A marker of 0 indicates that double registers are saved. | |
| 118 static const int kMarkerOffset = -2 * kPointerSize; | |
| 119 | |
| 120 // The caller fields are below the frame pointer on the stack. | 115 // The caller fields are below the frame pointer on the stack. |
| 121 static const int kCallerFPOffset = +0 * kPointerSize; | 116 static const int kCallerFPOffset = 0 * kPointerSize; |
| 122 // The calling JS function is between FP and PC. | 117 // The calling JS function is below FP. |
| 123 static const int kCallerPCOffset = +2 * kPointerSize; | 118 static const int kCallerPCOffset = 1 * kPointerSize; |
| 124 | 119 |
| 125 // FP-relative displacement of the caller's SP. It points just | 120 // FP-relative displacement of the caller's SP. It points just |
| 126 // below the saved PC. | 121 // below the saved PC. |
| 127 static const int kCallerSPDisplacement = +3 * kPointerSize; | 122 static const int kCallerSPDisplacement = 2 * kPointerSize; |
| 128 }; | 123 }; |
| 129 | 124 |
| 130 | 125 |
| 131 class StandardFrameConstants : public AllStatic { | 126 class StandardFrameConstants : public AllStatic { |
| 132 public: | 127 public: |
| 133 static const int kExpressionsOffset = -3 * kPointerSize; | 128 static const int kExpressionsOffset = -3 * kPointerSize; |
| 134 static const int kMarkerOffset = -2 * kPointerSize; | 129 static const int kMarkerOffset = -2 * kPointerSize; |
| 135 static const int kContextOffset = -1 * kPointerSize; | 130 static const int kContextOffset = -1 * kPointerSize; |
| 136 static const int kCallerFPOffset = 0 * kPointerSize; | 131 static const int kCallerFPOffset = 0 * kPointerSize; |
| 137 static const int kCallerPCOffset = +1 * kPointerSize; | 132 static const int kCallerPCOffset = 1 * kPointerSize; |
| 138 static const int kCallerSPOffset = +2 * kPointerSize; | 133 static const int kCallerSPOffset = 2 * kPointerSize; |
| 139 }; | 134 }; |
| 140 | 135 |
| 141 | 136 |
| 142 class JavaScriptFrameConstants : public AllStatic { | 137 class JavaScriptFrameConstants : public AllStatic { |
| 143 public: | 138 public: |
| 144 // FP-relative. | 139 // FP-relative. |
| 145 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; | 140 static const int kLocal0Offset = StandardFrameConstants::kExpressionsOffset; |
| 146 static const int kSavedRegistersOffset = +2 * kPointerSize; | 141 static const int kSavedRegistersOffset = +2 * kPointerSize; |
| 147 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; | 142 static const int kFunctionOffset = StandardFrameConstants::kMarkerOffset; |
| 148 | 143 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 166 | 161 |
| 167 inline Object* JavaScriptFrame::function_slot_object() const { | 162 inline Object* JavaScriptFrame::function_slot_object() const { |
| 168 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 163 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
| 169 return Memory::Object_at(fp() + offset); | 164 return Memory::Object_at(fp() + offset); |
| 170 } | 165 } |
| 171 | 166 |
| 172 | 167 |
| 173 } } // namespace v8::internal | 168 } } // namespace v8::internal |
| 174 | 169 |
| 175 #endif // V8_ARM_FRAMES_ARM_H_ | 170 #endif // V8_ARM_FRAMES_ARM_H_ |
| OLD | NEW |