OLD | NEW |
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 RUNTIME_VM_CONSTANTS_MIPS_H_ | 5 #ifndef RUNTIME_VM_CONSTANTS_MIPS_H_ |
6 #define RUNTIME_VM_CONSTANTS_MIPS_H_ | 6 #define RUNTIME_VM_CONSTANTS_MIPS_H_ |
7 | 7 |
8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
9 | 9 |
10 namespace dart { | 10 namespace dart { |
11 | 11 |
12 enum Register { | 12 enum Register { |
13 R0 = 0, | 13 R0 = 0, |
14 R1 = 1, // AT aka TMP | 14 R1 = 1, // AT aka TMP |
15 R2 = 2, | 15 R2 = 2, |
16 R3 = 3, | 16 R3 = 3, |
17 R4 = 4, | 17 R4 = 4, |
18 R5 = 5, | 18 R5 = 5, |
19 R6 = 6, | 19 R6 = 6, |
20 R7 = 7, | 20 R7 = 7, |
21 R8 = 8, | 21 R8 = 8, |
22 R9 = 9, | 22 R9 = 9, |
23 R10 = 10, | 23 R10 = 10, |
24 R11 = 11, | 24 R11 = 11, |
25 R12 = 12, | 25 R12 = 12, |
26 R13 = 13, | 26 R13 = 13, |
27 R14 = 14, | 27 R14 = 14, |
28 R15 = 15, | 28 R15 = 15, |
29 R16 = 16, | 29 R16 = 16, |
30 R17 = 17, | 30 R17 = 17, |
31 R18 = 18, | 31 R18 = 18, |
32 R19 = 19, // THR | 32 R19 = 19, // THR |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 GP = R28, | 86 GP = R28, |
87 SP = R29, | 87 SP = R29, |
88 FP = R30, | 88 FP = R30, |
89 RA = R31, | 89 RA = R31, |
90 }; | 90 }; |
91 | 91 |
92 | 92 |
93 // Values for floating point registers. | 93 // Values for floating point registers. |
94 // Double-precision values use register pairs. | 94 // Double-precision values use register pairs. |
95 enum FRegister { | 95 enum FRegister { |
96 F0 = 0, | 96 F0 = 0, |
97 F1 = 1, | 97 F1 = 1, |
98 F2 = 2, | 98 F2 = 2, |
99 F3 = 3, | 99 F3 = 3, |
100 F4 = 4, | 100 F4 = 4, |
101 F5 = 5, | 101 F5 = 5, |
102 F6 = 6, | 102 F6 = 6, |
103 F7 = 7, | 103 F7 = 7, |
104 F8 = 8, | 104 F8 = 8, |
105 F9 = 9, | 105 F9 = 9, |
106 F10 = 10, | 106 F10 = 10, |
107 F11 = 11, | 107 F11 = 11, |
108 F12 = 12, | 108 F12 = 12, |
109 F13 = 13, | 109 F13 = 13, |
110 F14 = 14, | 110 F14 = 14, |
111 F15 = 15, | 111 F15 = 15, |
112 F16 = 16, | 112 F16 = 16, |
113 F17 = 17, | 113 F17 = 17, |
114 F18 = 18, | 114 F18 = 18, |
115 F19 = 19, | 115 F19 = 19, |
(...skipping 12 matching lines...) Expand all Loading... |
128 kNumberOfFRegisters = 32, | 128 kNumberOfFRegisters = 32, |
129 kNoFRegister = -1, | 129 kNoFRegister = -1, |
130 }; | 130 }; |
131 | 131 |
132 // The double precision floating point registers are concatenated pairs of the | 132 // The double precision floating point registers are concatenated pairs of the |
133 // single precision registers, e.g. D0 is F1:F0, D1 is F3:F2, etc.. We only | 133 // single precision registers, e.g. D0 is F1:F0, D1 is F3:F2, etc.. We only |
134 // tell the architecture generic code about the double precision registers, then | 134 // tell the architecture generic code about the double precision registers, then |
135 // convert to the single precision registers when needed in the mips-specific | 135 // convert to the single precision registers when needed in the mips-specific |
136 // code. | 136 // code. |
137 enum DRegister { | 137 enum DRegister { |
138 D0 = 0, // Function return value 1. | 138 D0 = 0, // Function return value 1. |
139 D1 = 1, // Function return value 2. | 139 D1 = 1, // Function return value 2. |
140 D2 = 2, // Not preserved. | 140 D2 = 2, // Not preserved. |
141 D3 = 3, // Not preserved. | 141 D3 = 3, // Not preserved. |
142 D4 = 4, // Not preserved. | 142 D4 = 4, // Not preserved. |
143 D5 = 5, // Not preserved. | 143 D5 = 5, // Not preserved. |
144 D6 = 6, // Argument 1. | 144 D6 = 6, // Argument 1. |
145 D7 = 7, // Argument 2. | 145 D7 = 7, // Argument 2. |
146 D8 = 8, // Not preserved. | 146 D8 = 8, // Not preserved. |
147 D9 = 9, // Not preserved. | 147 D9 = 9, // Not preserved. |
148 D10 = 10, // Preserved. | 148 D10 = 10, // Preserved. |
149 D11 = 11, // Preserved. | 149 D11 = 11, // Preserved. |
150 D12 = 12, // Preserved. | 150 D12 = 12, // Preserved. |
151 D13 = 13, // Preserved. | 151 D13 = 13, // Preserved. |
152 D14 = 14, // Preserved. | 152 D14 = 14, // Preserved. |
153 D15 = 15, // Preserved. | 153 D15 = 15, // Preserved. |
154 kNumberOfDRegisters = 16, | 154 kNumberOfDRegisters = 16, |
155 kNoDRegister = -1, | 155 kNoDRegister = -1, |
156 }; | 156 }; |
157 | 157 |
(...skipping 10 matching lines...) Expand all Loading... |
168 const FRegister STMP2 = F19; | 168 const FRegister STMP2 = F19; |
169 | 169 |
170 // Architecture independent aliases. | 170 // Architecture independent aliases. |
171 typedef DRegister FpuRegister; | 171 typedef DRegister FpuRegister; |
172 const FpuRegister FpuTMP = DTMP; | 172 const FpuRegister FpuTMP = DTMP; |
173 const int kNumberOfFpuRegisters = kNumberOfDRegisters; | 173 const int kNumberOfFpuRegisters = kNumberOfDRegisters; |
174 const FpuRegister kNoFpuRegister = kNoDRegister; | 174 const FpuRegister kNoFpuRegister = kNoDRegister; |
175 | 175 |
176 | 176 |
177 // Register aliases. | 177 // Register aliases. |
178 const Register TMP = AT; // Used as scratch register by assembler. | 178 const Register TMP = AT; // Used as scratch register by assembler. |
179 const Register TMP2 = kNoRegister; // No second assembler scratch register. | 179 const Register TMP2 = kNoRegister; // No second assembler scratch register. |
180 const Register CTX = S6; // Location of current context at method entry. | 180 const Register CTX = S6; // Location of current context at method entry. |
181 const Register CODE_REG = S6; | 181 const Register CODE_REG = S6; |
182 const Register PP = S7; // Caches object pool pointer in generated code. | 182 const Register PP = S7; // Caches object pool pointer in generated code. |
183 const Register SPREG = SP; // Stack pointer register. | 183 const Register SPREG = SP; // Stack pointer register. |
184 const Register FPREG = FP; // Frame pointer register. | 184 const Register FPREG = FP; // Frame pointer register. |
185 const Register LRREG = RA; // Link register. | 185 const Register LRREG = RA; // Link register. |
186 const Register ICREG = S5; // IC data register. | 186 const Register ICREG = S5; // IC data register. |
187 const Register ARGS_DESC_REG = S4; | 187 const Register ARGS_DESC_REG = S4; |
188 const Register THR = S3; // Caches current thread in generated code. | 188 const Register THR = S3; // Caches current thread in generated code. |
189 const Register CALLEE_SAVED_TEMP = S5; | 189 const Register CALLEE_SAVED_TEMP = S5; |
190 | 190 |
191 // The code that generates a comparison can be far away from the code that | 191 // The code that generates a comparison can be far away from the code that |
192 // generates the branch that uses the result of that comparison. In this case, | 192 // generates the branch that uses the result of that comparison. In this case, |
193 // CMPRES1 and CMPRES2 are used for the results of the comparison. We need two | 193 // CMPRES1 and CMPRES2 are used for the results of the comparison. We need two |
194 // since TMP is clobbered by a far branch. | 194 // since TMP is clobbered by a far branch. |
195 const Register CMPRES1 = T8; | 195 const Register CMPRES1 = T8; |
196 const Register CMPRES2 = T9; | 196 const Register CMPRES2 = T9; |
197 | 197 |
198 // Exception object is passed in this register to the catch handlers when an | 198 // Exception object is passed in this register to the catch handlers when an |
199 // exception is thrown. | 199 // exception is thrown. |
200 const Register kExceptionObjectReg = V0; | 200 const Register kExceptionObjectReg = V0; |
201 | 201 |
202 // Stack trace object is passed in this register to the catch handlers when | 202 // Stack trace object is passed in this register to the catch handlers when |
203 // an exception is thrown. | 203 // an exception is thrown. |
204 const Register kStackTraceObjectReg = V1; | 204 const Register kStackTraceObjectReg = V1; |
205 | 205 |
206 | 206 |
207 typedef uint32_t RegList; | 207 typedef uint32_t RegList; |
208 const RegList kAllCpuRegistersList = 0xFFFFFFFF; | 208 const RegList kAllCpuRegistersList = 0xFFFFFFFF; |
209 | 209 |
210 const RegList kAbiArgumentCpuRegs = | 210 const RegList kAbiArgumentCpuRegs = |
211 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3); | 211 (1 << A0) | (1 << A1) | (1 << A2) | (1 << A3); |
212 const RegList kAbiPreservedCpuRegs = | 212 const RegList kAbiPreservedCpuRegs = (1 << S0) | (1 << S1) | (1 << S2) | |
213 (1 << S0) | (1 << S1) | (1 << S2) | (1 << S3) | | 213 (1 << S3) | (1 << S4) | (1 << S5) | |
214 (1 << S4) | (1 << S5) | (1 << S6) | (1 << S7); | 214 (1 << S6) | (1 << S7); |
215 const int kAbiPreservedCpuRegCount = 8; | 215 const int kAbiPreservedCpuRegCount = 8; |
216 | 216 |
217 // FPU registers 20 - 31 are preserved across calls. | 217 // FPU registers 20 - 31 are preserved across calls. |
218 const FRegister kAbiFirstPreservedFpuReg = F20; | 218 const FRegister kAbiFirstPreservedFpuReg = F20; |
219 const FRegister kAbiLastPreservedFpuReg = | 219 const FRegister kAbiLastPreservedFpuReg = |
220 static_cast<FRegister>(kNumberOfFRegisters - 1); | 220 static_cast<FRegister>(kNumberOfFRegisters - 1); |
221 const int kAbiPreservedFpuRegCount = 12; | 221 const int kAbiPreservedFpuRegCount = 12; |
222 | 222 |
223 const RegList kReservedCpuRegisters = | 223 const RegList kReservedCpuRegisters = |
224 (1 << SPREG) | | 224 (1 << SPREG) | (1 << FPREG) | (1 << TMP) | (1 << PP) | (1 << THR) | |
225 (1 << FPREG) | | 225 (1 << CTX) | (1 << ZR) | (1 << CMPRES1) | (1 << CMPRES2) | (1 << K0) | |
226 (1 << TMP) | | 226 (1 << K1) | (1 << GP) | (1 << RA); |
227 (1 << PP) | | |
228 (1 << THR) | | |
229 (1 << CTX) | | |
230 (1 << ZR) | | |
231 (1 << CMPRES1) | | |
232 (1 << CMPRES2) | | |
233 (1 << K0) | | |
234 (1 << K1) | | |
235 (1 << GP) | | |
236 (1 << RA); | |
237 // CPU registers available to Dart allocator. | 227 // CPU registers available to Dart allocator. |
238 const RegList kDartAvailableCpuRegs = | 228 const RegList kDartAvailableCpuRegs = |
239 kAllCpuRegistersList & ~kReservedCpuRegisters; | 229 kAllCpuRegistersList & ~kReservedCpuRegisters; |
240 // Registers available to Dart that are not preserved by runtime calls. | 230 // Registers available to Dart that are not preserved by runtime calls. |
241 const RegList kDartVolatileCpuRegs = | 231 const RegList kDartVolatileCpuRegs = |
242 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; | 232 kDartAvailableCpuRegs & ~kAbiPreservedCpuRegs; |
243 const int kDartVolatileCpuRegCount = 14; | 233 const int kDartVolatileCpuRegCount = 14; |
244 const Register kDartFirstVolatileCpuReg = R2; | 234 const Register kDartFirstVolatileCpuReg = R2; |
245 const Register kDartLastVolatileCpuReg = R15; | 235 const Register kDartLastVolatileCpuReg = R15; |
246 | 236 |
247 // FPU registers 0 - 19 are not preserved across calls. | 237 // FPU registers 0 - 19 are not preserved across calls. |
248 const FRegister kDartFirstVolatileFpuReg = F0; | 238 const FRegister kDartFirstVolatileFpuReg = F0; |
249 const FRegister kDartLastVolatileFpuReg = F19; | 239 const FRegister kDartLastVolatileFpuReg = F19; |
250 const int kDartVolatileFpuRegCount = 20; | 240 const int kDartVolatileFpuRegCount = 20; |
251 | 241 |
252 | 242 |
253 // There is no status register on MIPS. Instead of representing a condition | 243 // There is no status register on MIPS. Instead of representing a condition |
254 // code, type Condition (see assembler_mips.h) represents a pair of operands and | 244 // code, type Condition (see assembler_mips.h) represents a pair of operands and |
255 // a relation operator between them. | 245 // a relation operator between them. |
256 enum RelationOperator { | 246 enum RelationOperator { |
257 AL, // always | 247 AL, // always |
258 NV, // never | 248 NV, // never |
259 EQ, // equal | 249 EQ, // equal |
260 NE, // not equal | 250 NE, // not equal |
261 GT, // greater than | 251 GT, // greater than |
262 GE, // greater equal | 252 GE, // greater equal |
263 LT, // less than | 253 LT, // less than |
264 LE, // less equal | 254 LE, // less equal |
265 UGT, // unsigned greater than | 255 UGT, // unsigned greater than |
266 UGE, // unsigned greater equal | 256 UGE, // unsigned greater equal |
267 ULT, // unsigned less than | 257 ULT, // unsigned less than |
268 ULE, // unsigned less equal | 258 ULE, // unsigned less equal |
269 }; | 259 }; |
270 | 260 |
271 | 261 |
272 // Constants used for the decoding or encoding of the individual fields of | 262 // Constants used for the decoding or encoding of the individual fields of |
273 // instructions. Based on the "Table 4.25 CPU Instruction Format Fields". | 263 // instructions. Based on the "Table 4.25 CPU Instruction Format Fields". |
274 enum InstructionFields { | 264 enum InstructionFields { |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
472 | 462 |
473 class Instr { | 463 class Instr { |
474 public: | 464 public: |
475 enum { | 465 enum { |
476 kInstrSize = 4, | 466 kInstrSize = 4, |
477 }; | 467 }; |
478 | 468 |
479 static const int32_t kNopInstruction = 0; | 469 static const int32_t kNopInstruction = 0; |
480 | 470 |
481 // Reserved break instruction codes. | 471 // Reserved break instruction codes. |
482 static const int32_t kBreakPointCode = 0xdeb0; // For breakpoint. | 472 static const int32_t kBreakPointCode = 0xdeb0; // For breakpoint. |
483 static const int32_t kStopMessageCode = 0xdeb1; // For Stop(message). | 473 static const int32_t kStopMessageCode = 0xdeb1; // For Stop(message). |
484 static const int32_t kSimulatorBreakCode = 0xdeb2; // For breakpoint in sim. | 474 static const int32_t kSimulatorBreakCode = 0xdeb2; // For breakpoint in sim. |
485 static const int32_t kSimulatorRedirectCode = 0xca11; // For redirection. | 475 static const int32_t kSimulatorRedirectCode = 0xca11; // For redirection. |
486 | 476 |
487 static const int32_t kBreakPointZeroInstruction = | 477 static const int32_t kBreakPointZeroInstruction = |
488 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); | 478 (SPECIAL << kOpcodeShift) | (BREAK << kFunctionShift); |
489 | 479 |
490 // Breakpoint instruction filling assembler code buffers in debug mode. | 480 // Breakpoint instruction filling assembler code buffers in debug mode. |
491 static const int32_t kBreakPointInstruction = | 481 static const int32_t kBreakPointInstruction = |
492 kBreakPointZeroInstruction | (kBreakPointCode << kBreakCodeShift); | 482 kBreakPointZeroInstruction | (kBreakPointCode << kBreakCodeShift); |
493 | 483 |
(...skipping 10 matching lines...) Expand all Loading... |
504 // Get the raw instruction bits. | 494 // Get the raw instruction bits. |
505 inline int32_t InstructionBits() const { | 495 inline int32_t InstructionBits() const { |
506 return *reinterpret_cast<const int32_t*>(this); | 496 return *reinterpret_cast<const int32_t*>(this); |
507 } | 497 } |
508 | 498 |
509 // Set the raw instruction bits to value. | 499 // Set the raw instruction bits to value. |
510 inline void SetInstructionBits(int32_t value) { | 500 inline void SetInstructionBits(int32_t value) { |
511 *reinterpret_cast<int32_t*>(this) = value; | 501 *reinterpret_cast<int32_t*>(this) = value; |
512 } | 502 } |
513 | 503 |
514 inline void SetImmInstrBits(Opcode op, Register rs, Register rt, | 504 inline void SetImmInstrBits(Opcode op, |
| 505 Register rs, |
| 506 Register rt, |
515 uint16_t imm) { | 507 uint16_t imm) { |
516 SetInstructionBits( | 508 SetInstructionBits(op << kOpcodeShift | rs << kRsShift | rt << kRtShift | |
517 op << kOpcodeShift | | 509 imm << kImmShift); |
518 rs << kRsShift | | |
519 rt << kRtShift | | |
520 imm << kImmShift); | |
521 } | 510 } |
522 | 511 |
523 inline void SetSpecialInstrBits(SpecialFunction f, | 512 inline void SetSpecialInstrBits(SpecialFunction f, |
524 Register rs, Register rt, Register rd) { | 513 Register rs, |
525 SetInstructionBits( | 514 Register rt, |
526 SPECIAL << kOpcodeShift | | 515 Register rd) { |
527 f << kFunctionShift | | 516 SetInstructionBits(SPECIAL << kOpcodeShift | f << kFunctionShift | |
528 rs << kRsShift | | 517 rs << kRsShift | rt << kRtShift | rd << kRdShift); |
529 rt << kRtShift | | |
530 rd << kRdShift); | |
531 } | 518 } |
532 | 519 |
533 // Read one particular bit out of the instruction bits. | 520 // Read one particular bit out of the instruction bits. |
534 inline int32_t Bit(int nr) const { | 521 inline int32_t Bit(int nr) const { return (InstructionBits() >> nr) & 1; } |
535 return (InstructionBits() >> nr) & 1; | |
536 } | |
537 | 522 |
538 // Read a bit field out of the instruction bits. | 523 // Read a bit field out of the instruction bits. |
539 inline int32_t Bits(int shift, int count) const { | 524 inline int32_t Bits(int shift, int count) const { |
540 return (InstructionBits() >> shift) & ((1 << count) - 1); | 525 return (InstructionBits() >> shift) & ((1 << count) - 1); |
541 } | 526 } |
542 | 527 |
543 // Accessors to the different named fields used in the MIPS encoding. | 528 // Accessors to the different named fields used in the MIPS encoding. |
544 inline Opcode OpcodeField() const { | 529 inline Opcode OpcodeField() const { |
545 return static_cast<Opcode>(Bits(kOpcodeShift, kOpcodeBits)); | 530 return static_cast<Opcode>(Bits(kOpcodeShift, kOpcodeBits)); |
546 } | 531 } |
(...skipping 21 matching lines...) Expand all Loading... |
568 } | 553 } |
569 | 554 |
570 inline FRegister FtField() const { | 555 inline FRegister FtField() const { |
571 return static_cast<FRegister>(Bits(kFtShift, kFtBits)); | 556 return static_cast<FRegister>(Bits(kFtShift, kFtBits)); |
572 } | 557 } |
573 | 558 |
574 inline FRegister FdField() const { | 559 inline FRegister FdField() const { |
575 return static_cast<FRegister>(Bits(kFdShift, kFdBits)); | 560 return static_cast<FRegister>(Bits(kFdShift, kFdBits)); |
576 } | 561 } |
577 | 562 |
578 inline int SaField() const { | 563 inline int SaField() const { return Bits(kSaShift, kSaBits); } |
579 return Bits(kSaShift, kSaBits); | |
580 } | |
581 | 564 |
582 inline int32_t UImmField() const { | 565 inline int32_t UImmField() const { return Bits(kImmShift, kImmBits); } |
583 return Bits(kImmShift, kImmBits); | |
584 } | |
585 | 566 |
586 inline int32_t SImmField() const { | 567 inline int32_t SImmField() const { |
587 // Sign-extend the imm field. | 568 // Sign-extend the imm field. |
588 return (Bits(kImmShift, kImmBits) << (32 - kImmBits)) >> (32 - kImmBits); | 569 return (Bits(kImmShift, kImmBits) << (32 - kImmBits)) >> (32 - kImmBits); |
589 } | 570 } |
590 | 571 |
591 inline int32_t BreakCodeField() const { | 572 inline int32_t BreakCodeField() const { |
592 return Bits(kBreakCodeShift, kBreakCodeBits); | 573 return Bits(kBreakCodeShift, kBreakCodeBits); |
593 } | 574 } |
594 | 575 |
(...skipping 24 matching lines...) Expand all Loading... |
619 } | 600 } |
620 | 601 |
621 inline bool HasFormat() const { | 602 inline bool HasFormat() const { |
622 return (OpcodeField() == COP1) && (Bit(25) == 1); | 603 return (OpcodeField() == COP1) && (Bit(25) == 1); |
623 } | 604 } |
624 | 605 |
625 inline Format FormatField() const { | 606 inline Format FormatField() const { |
626 return static_cast<Format>(Bits(kFmtShift, kFmtBits)); | 607 return static_cast<Format>(Bits(kFmtShift, kFmtBits)); |
627 } | 608 } |
628 | 609 |
629 inline int32_t FpuCCField() const { | 610 inline int32_t FpuCCField() const { return Bits(kFpuCCShift, kFpuCCBits); } |
630 return Bits(kFpuCCShift, kFpuCCBits); | |
631 } | |
632 | 611 |
633 // Instructions are read out of a code stream. The only way to get a | 612 // Instructions are read out of a code stream. The only way to get a |
634 // reference to an instruction is to convert a pc. There is no way | 613 // reference to an instruction is to convert a pc. There is no way |
635 // to allocate or create instances of class Instr. | 614 // to allocate or create instances of class Instr. |
636 // Use the At(pc) function to create references to Instr. | 615 // Use the At(pc) function to create references to Instr. |
637 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } | 616 static Instr* At(uword pc) { return reinterpret_cast<Instr*>(pc); } |
638 | 617 |
639 #if defined(DEBUG) | 618 #if defined(DEBUG) |
640 inline void AssertIsImmInstr(Opcode op, Register rs, Register rt, | 619 inline void AssertIsImmInstr(Opcode op, |
641 int32_t imm) { | 620 Register rs, |
| 621 Register rt, |
| 622 int32_t imm) { |
642 ASSERT((OpcodeField() == op) && (RsField() == rs) && (RtField() == rt) && | 623 ASSERT((OpcodeField() == op) && (RsField() == rs) && (RtField() == rt) && |
643 (SImmField() == imm)); | 624 (SImmField() == imm)); |
644 } | 625 } |
645 | 626 |
646 inline void AssertIsSpecialInstr(SpecialFunction f, Register rs, Register rt, | 627 inline void AssertIsSpecialInstr(SpecialFunction f, |
| 628 Register rs, |
| 629 Register rt, |
647 Register rd) { | 630 Register rd) { |
648 ASSERT((OpcodeField() == SPECIAL) && (FunctionField() == f) && | 631 ASSERT((OpcodeField() == SPECIAL) && (FunctionField() == f) && |
649 (RsField() == rs) && (RtField() == rt) && | 632 (RsField() == rs) && (RtField() == rt) && (RdField() == rd)); |
650 (RdField() == rd)); | |
651 } | 633 } |
652 #endif // defined(DEBUG) | 634 #endif // defined(DEBUG) |
653 | 635 |
654 private: | 636 private: |
655 DISALLOW_ALLOCATION(); | 637 DISALLOW_ALLOCATION(); |
656 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); | 638 DISALLOW_IMPLICIT_CONSTRUCTORS(Instr); |
657 }; | 639 }; |
658 | 640 |
659 } // namespace dart | 641 } // namespace dart |
660 | 642 |
661 #endif // RUNTIME_VM_CONSTANTS_MIPS_H_ | 643 #endif // RUNTIME_VM_CONSTANTS_MIPS_H_ |
OLD | NEW |