OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 // Return the code of the n-th caller-saved register available to JavaScript | 52 // Return the code of the n-th caller-saved register available to JavaScript |
53 // e.g. JSCallerSavedReg(0) returns a0.code() == 4. | 53 // e.g. JSCallerSavedReg(0) returns a0.code() == 4. |
54 int JSCallerSavedCode(int n); | 54 int JSCallerSavedCode(int n); |
55 | 55 |
56 | 56 |
57 // Callee-saved registers preserved when switching from C to JavaScript. | 57 // Callee-saved registers preserved when switching from C to JavaScript. |
58 static const RegList kCalleeSaved = | 58 static const RegList kCalleeSaved = |
59 // Saved temporaries. | 59 // Saved temporaries. |
60 1 << 16 | 1 << 17 | 1 << 18 | 1 << 19 | | 60 1 << 16 | 1 << 17 | 1 << 18 | 1 << 19 | |
61 1 << 20 | 1 << 21 | 1 << 22 | 1 << 23 | | 61 1 << 20 | 1 << 21 | 1 << 22 | 1 << 23 | |
62 // gp, sp, fp | 62 // gp, sp, fp. |
63 1 << 28 | 1 << 29 | 1 << 30; | 63 1 << 28 | 1 << 29 | 1 << 30; |
64 | 64 |
65 static const int kNumCalleeSaved = 11; | 65 static const int kNumCalleeSaved = 11; |
66 | 66 |
67 | 67 |
68 // Number of registers for which space is reserved in safepoints. Must be a | 68 // Number of registers for which space is reserved in safepoints. Must be a |
69 // multiple of 8. | 69 // multiple of 8. |
70 // TODO(mips): Only 8 registers may actually be sufficient. Revisit. | 70 // TODO(mips): Only 8 registers may actually be sufficient. Revisit. |
71 static const int kNumSafepointRegisters = 16; | 71 static const int kNumSafepointRegisters = 16; |
72 | 72 |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 static const int kCallerFPOffset = 0 * kPointerSize; | 128 static const int kCallerFPOffset = 0 * kPointerSize; |
129 static const int kCallerPCOffset = +1 * kPointerSize; | 129 static const int kCallerPCOffset = +1 * kPointerSize; |
130 static const int kCallerSPOffset = +2 * kPointerSize; | 130 static const int kCallerSPOffset = +2 * kPointerSize; |
131 | 131 |
132 // Size of the MIPS 4 32-bit argument slots. | 132 // Size of the MIPS 4 32-bit argument slots. |
133 // This is just an alias with a shorter name. Use it from now on. | 133 // This is just an alias with a shorter name. Use it from now on. |
134 static const int kRArgsSlotsSize = 4 * kPointerSize; | 134 static const int kRArgsSlotsSize = 4 * kPointerSize; |
135 static const int kRegularArgsSlotsSize = kRArgsSlotsSize; | 135 static const int kRegularArgsSlotsSize = kRArgsSlotsSize; |
136 | 136 |
137 // C/C++ argument slots size. | 137 // C/C++ argument slots size. |
138 static const int kCArgsSlotsSize = 4 * kPointerSize; | 138 static const int kCArgSlotCount = 4; |
| 139 static const int kCArgsSlotsSize = kCArgSlotCount * kPointerSize; |
139 // JS argument slots size. | 140 // JS argument slots size. |
140 static const int kJSArgsSlotsSize = 0 * kPointerSize; | 141 static const int kJSArgsSlotsSize = 0 * kPointerSize; |
141 // Assembly builtins argument slots size. | 142 // Assembly builtins argument slots size. |
142 static const int kBArgsSlotsSize = 0 * kPointerSize; | 143 static const int kBArgsSlotsSize = 0 * kPointerSize; |
143 }; | 144 }; |
144 | 145 |
145 | 146 |
146 class JavaScriptFrameConstants : public AllStatic { | 147 class JavaScriptFrameConstants : public AllStatic { |
147 public: | 148 public: |
148 // FP-relative. | 149 // FP-relative. |
(...skipping 21 matching lines...) Expand all Loading... |
170 | 171 |
171 inline Object* JavaScriptFrame::function_slot_object() const { | 172 inline Object* JavaScriptFrame::function_slot_object() const { |
172 const int offset = JavaScriptFrameConstants::kFunctionOffset; | 173 const int offset = JavaScriptFrameConstants::kFunctionOffset; |
173 return Memory::Object_at(fp() + offset); | 174 return Memory::Object_at(fp() + offset); |
174 } | 175 } |
175 | 176 |
176 | 177 |
177 } } // namespace v8::internal | 178 } } // namespace v8::internal |
178 | 179 |
179 #endif | 180 #endif |
OLD | NEW |