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

Side by Side Diff: runtime/vm/constants_mips.h

Issue 14076005: Supports FrameLookup vm test on MIPS (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #ifndef VM_CONSTANTS_MIPS_H_ 5 #ifndef VM_CONSTANTS_MIPS_H_
6 #define VM_CONSTANTS_MIPS_H_ 6 #define VM_CONSTANTS_MIPS_H_
7 7
8 namespace dart { 8 namespace dart {
9 9
10 enum Register { 10 enum Register {
(...skipping 17 matching lines...) Expand all
28 R16 = 16, 28 R16 = 16,
29 R17 = 17, 29 R17 = 17,
30 R18 = 18, 30 R18 = 18,
31 R19 = 19, 31 R19 = 19,
32 R20 = 20, 32 R20 = 20,
33 R21 = 21, 33 R21 = 21,
34 R22 = 22, 34 R22 = 22,
35 R23 = 23, 35 R23 = 23,
36 R24 = 24, 36 R24 = 24,
37 R25 = 25, 37 R25 = 25,
38 kLastFreeCpuRegister = 25, 38 kLastFreeCpuRegister = 25,
regis 2013/04/10 20:53:00 You can move this one up to = 21, now that you als
zra 2013/04/10 21:59:05 Done.
39 R26 = 26, 39 R26 = 26,
40 R27 = 27, 40 R27 = 27,
41 R28 = 28, 41 R28 = 28,
42 R29 = 29, 42 R29 = 29,
43 R30 = 30, 43 R30 = 30,
44 R31 = 31, 44 R31 = 31,
45 kNumberOfCpuRegisters = 32, 45 kNumberOfCpuRegisters = 32,
46 kNoRegister = -1, 46 kNoRegister = -1,
47 47
48 // Register aliases. 48 // Register aliases.
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 // Register aliases. 137 // Register aliases.
138 const Register TMP1 = AT; // Used as scratch register by assembler. 138 const Register TMP1 = AT; // Used as scratch register by assembler.
139 const Register TMP2 = T9; // Used as scratch register by assembler. 139 const Register TMP2 = T9; // Used as scratch register by assembler.
140 const Register TMP = TMP1; // Arch independent flow graph compiler needs a 140 const Register TMP = TMP1; // Arch independent flow graph compiler needs a
141 // Register called TMP. 141 // Register called TMP.
142 const Register CTX = S6; // Caches current context in generated code. 142 const Register CTX = S6; // Caches current context in generated code.
143 const Register PP = S7; // Caches object pool pointer in generated code. 143 const Register PP = S7; // Caches object pool pointer in generated code.
144 const Register SPREG = SP; // Stack pointer register. 144 const Register SPREG = SP; // Stack pointer register.
145 const Register FPREG = FP; // Frame pointer register. 145 const Register FPREG = FP; // Frame pointer register.
146 146
147 // The code that generates a comparison can be far away from the code that
148 // generates the branch that uses the result of that comparison. In this case,
149 // CMPRES is used for the result of the comparison.
150 const Register CMPRES = T8;
147 151
148 typedef uint32_t RegList; 152 typedef uint32_t RegList;
149 const RegList kAllCpuRegistersList = 0xFFFFFFFF; 153 const RegList kAllCpuRegistersList = 0xFFFFFFFF;
150 154
151 155
152 const RegList kAbiArgumentCpuRegs = 156 const RegList kAbiArgumentCpuRegs =
153 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3); 157 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3);
154 const RegList kAbiPreservedCpuRegs = 158 const RegList kAbiPreservedCpuRegs =
155 (1 << S0) | (1 << S1) | (1 << S2) | (1 << S3) | 159 (1 << S0) | (1 << S1) | (1 << S2) | (1 << S3) |
156 (1 << S4) | (1 << S5) | (1 << S6) | (1 << S7); 160 (1 << S4) | (1 << S5) | (1 << S6) | (1 << S7);
157 const int kAbiPreservedCpuRegCount = 8; 161 const int kAbiPreservedCpuRegCount = 8;
158 162
159 163
160 // Dart stack frame layout. 164 // Dart stack frame layout.
161 static const int kLastParamSlotIndex = 3; 165 static const int kLastParamSlotIndex = 3;
162 static const int kFirstLocalSlotIndex = -2; 166 static const int kFirstLocalSlotIndex = -2;
163 167
164 168
165 // Values for the condition field. // UNIMPLEMENTED. 169 // Values for the condition field.
170 // There is no condition field on MIPS, but Conditions are used and passed
171 // around by the intermediate language, so we need them here, too.
166 enum Condition { 172 enum Condition {
167 kNoCondition = -1, 173 EQ, // equal
168 kMaxCondition = 16, 174 NE, // not equal
regis 2013/04/10 20:53:00 I am not sure this will work once you get other co
169 }; 175 };
170 176
171 177
172 // Constants used for the decoding or encoding of the individual fields of 178 // Constants used for the decoding or encoding of the individual fields of
173 // instructions. Based on the "Table 4.25 CPU Instruction Format Fields". 179 // instructions. Based on the "Table 4.25 CPU Instruction Format Fields".
174 enum InstructionFields { 180 enum InstructionFields {
175 kOpcodeShift = 26, 181 kOpcodeShift = 26,
176 kOpcodeBits = 6, 182 kOpcodeBits = 6,
177 kRsShift = 21, 183 kRsShift = 21,
178 kRsBits = 5, 184 kRsBits = 5,
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } 407 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); }
402 408
403 private: 409 private:
404 DISALLOW_ALLOCATION(); 410 DISALLOW_ALLOCATION();
405 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); 411 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr);
406 }; 412 };
407 413
408 } // namespace dart 414 } // namespace dart
409 415
410 #endif // VM_CONSTANTS_MIPS_H_ 416 #endif // VM_CONSTANTS_MIPS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698