Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: src/mips/frames-mips.h

Issue 7060010: Merge bleeding edge into the GC branch up to 7948. The asserts (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/disasm-mips.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 21 matching lines...) Expand all
94 94
95 95
96 class EntryFrameConstants : public AllStatic { 96 class EntryFrameConstants : public AllStatic {
97 public: 97 public:
98 static const int kCallerFPOffset = -3 * kPointerSize; 98 static const int kCallerFPOffset = -3 * kPointerSize;
99 }; 99 };
100 100
101 101
102 class ExitFrameConstants : public AllStatic { 102 class ExitFrameConstants : public AllStatic {
103 public: 103 public:
104 static const int kDebugMarkOffset = -1 * kPointerSize; 104 // See some explanation in MacroAssembler::EnterExitFrame.
105 // Must be the same as kDebugMarkOffset. Alias introduced when upgrading. 105 // This marks the top of the extra allocated stack space.
106 static const int kCodeOffset = -1 * kPointerSize; 106 static const int kStackSpaceOffset = -3 * kPointerSize;
107
108 static const int kCodeOffset = -2 * kPointerSize;
109
107 static const int kSPOffset = -1 * kPointerSize; 110 static const int kSPOffset = -1 * kPointerSize;
108 111
109 // TODO(mips): Use a patched sp value on the stack instead.
110 // A marker of 0 indicates that double registers are saved.
111 static const int kMarkerOffset = -2 * kPointerSize;
112
113 // The caller fields are below the frame pointer on the stack. 112 // The caller fields are below the frame pointer on the stack.
114 static const int kCallerFPOffset = +0 * kPointerSize; 113 static const int kCallerFPOffset = +0 * kPointerSize;
115 // The calling JS function is between FP and PC. 114 // The calling JS function is between FP and PC.
116 static const int kCallerPCOffset = +1 * kPointerSize; 115 static const int kCallerPCOffset = +1 * kPointerSize;
117 116
117 // MIPS-specific: a pointer to the old sp to avoid unnecessary calculations.
118 static const int kCallerSPOffset = +2 * kPointerSize;
119
118 // FP-relative displacement of the caller's SP. 120 // FP-relative displacement of the caller's SP.
119 static const int kCallerSPDisplacement = +3 * kPointerSize; 121 static const int kCallerSPDisplacement = +2 * kPointerSize;
120 }; 122 };
121 123
122 124
123 class StandardFrameConstants : public AllStatic { 125 class StandardFrameConstants : public AllStatic {
124 public: 126 public:
125 static const int kExpressionsOffset = -3 * kPointerSize; 127 static const int kExpressionsOffset = -3 * kPointerSize;
126 static const int kMarkerOffset = -2 * kPointerSize; 128 static const int kMarkerOffset = -2 * kPointerSize;
127 static const int kContextOffset = -1 * kPointerSize; 129 static const int kContextOffset = -1 * kPointerSize;
128 static const int kCallerFPOffset = 0 * kPointerSize; 130 static const int kCallerFPOffset = 0 * kPointerSize;
129 static const int kCallerPCOffset = +1 * kPointerSize; 131 static const int kCallerPCOffset = +1 * kPointerSize;
130 static const int kCallerSPOffset = +2 * kPointerSize; 132 static const int kCallerSPOffset = +2 * kPointerSize;
131 133
132 // Size of the MIPS 4 32-bit argument slots. 134 // Size of the MIPS 4 32-bit argument slots.
133 // This is just an alias with a shorter name. Use it from now on. 135 // This is just an alias with a shorter name. Use it from now on.
134 static const int kRArgsSlotsSize = 4 * kPointerSize; 136 static const int kRArgsSlotsSize = 4 * kPointerSize;
135 static const int kRegularArgsSlotsSize = kRArgsSlotsSize; 137 static const int kRegularArgsSlotsSize = kRArgsSlotsSize;
136 138
137 // C/C++ argument slots size. 139 // C/C++ argument slots size.
138 static const int kCArgsSlotsSize = 4 * kPointerSize; 140 static const int kCArgSlotCount = 4;
141 static const int kCArgsSlotsSize = kCArgSlotCount * kPointerSize;
139 // JS argument slots size. 142 // JS argument slots size.
140 static const int kJSArgsSlotsSize = 0 * kPointerSize; 143 static const int kJSArgsSlotsSize = 0 * kPointerSize;
141 // Assembly builtins argument slots size. 144 // Assembly builtins argument slots size.
142 static const int kBArgsSlotsSize = 0 * kPointerSize; 145 static const int kBArgsSlotsSize = 0 * kPointerSize;
143 }; 146 };
144 147
145 148
146 class JavaScriptFrameConstants : public AllStatic { 149 class JavaScriptFrameConstants : public AllStatic {
147 public: 150 public:
148 // FP-relative. 151 // FP-relative.
(...skipping 21 matching lines...) Expand all
170 173
171 inline Object* JavaScriptFrame::function_slot_object() const { 174 inline Object* JavaScriptFrame::function_slot_object() const {
172 const int offset = JavaScriptFrameConstants::kFunctionOffset; 175 const int offset = JavaScriptFrameConstants::kFunctionOffset;
173 return Memory::Object_at(fp() + offset); 176 return Memory::Object_at(fp() + offset);
174 } 177 }
175 178
176 179
177 } } // namespace v8::internal 180 } } // namespace v8::internal
178 181
179 #endif 182 #endif
OLDNEW
« no previous file with comments | « src/mips/disasm-mips.cc ('k') | src/mips/frames-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698