| 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 VM_ASSEMBLER_MIPS_H_ | 5 #ifndef VM_ASSEMBLER_MIPS_H_ |
| 6 #define VM_ASSEMBLER_MIPS_H_ | 6 #define VM_ASSEMBLER_MIPS_H_ |
| 7 | 7 |
| 8 #ifndef VM_ASSEMBLER_H_ | 8 #ifndef VM_ASSEMBLER_H_ |
| 9 #error Do not include assembler_mips.h directly; use assembler.h instead. | 9 #error Do not include assembler_mips.h directly; use assembler.h instead. |
| 10 #endif | 10 #endif |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 // RawInstruction object corresponding to the code running in the frame. | 180 // RawInstruction object corresponding to the code running in the frame. |
| 181 // See EnterDartFrame. There are 6 instructions before we know the PC. | 181 // See EnterDartFrame. There are 6 instructions before we know the PC. |
| 182 static const intptr_t kEntryPointToPcMarkerOffset = 6 * Instr::kInstrSize; | 182 static const intptr_t kEntryPointToPcMarkerOffset = 6 * Instr::kInstrSize; |
| 183 | 183 |
| 184 // Inlined allocation of an instance of class 'cls', code has no runtime | 184 // Inlined allocation of an instance of class 'cls', code has no runtime |
| 185 // calls. Jump to 'failure' if the instance cannot be allocated here. | 185 // calls. Jump to 'failure' if the instance cannot be allocated here. |
| 186 // Allocated instance is returned in 'instance_reg'. | 186 // Allocated instance is returned in 'instance_reg'. |
| 187 // Only the tags field of the object is initialized. | 187 // Only the tags field of the object is initialized. |
| 188 void TryAllocate(const Class& cls, | 188 void TryAllocate(const Class& cls, |
| 189 Label* failure, | 189 Label* failure, |
| 190 bool near_jump, | 190 Register instance_reg); |
| 191 Register instance_reg) { | |
| 192 UNIMPLEMENTED(); | |
| 193 } | |
| 194 | 191 |
| 195 // Debugging and bringup support. | 192 // Debugging and bringup support. |
| 196 void Stop(const char* message); | 193 void Stop(const char* message); |
| 197 | 194 |
| 198 // TODO(zra): TraceSimMsg enables printing of helpful messages when | 195 // TODO(zra): TraceSimMsg enables printing of helpful messages when |
| 199 // --trace_sim is given. Eventually these calls will be changed to Comment. | 196 // --trace_sim is given. Eventually these calls will be changed to Comment. |
| 200 void TraceSimMsg(const char* message); | 197 void TraceSimMsg(const char* message); |
| 201 void Unimplemented(const char* message); | 198 void Unimplemented(const char* message); |
| 202 void Untested(const char* message); | 199 void Untested(const char* message); |
| 203 void Unreachable(const char* message); | 200 void Unreachable(const char* message); |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 516 } | 513 } |
| 517 | 514 |
| 518 void lw(Register rt, const Address& addr) { | 515 void lw(Register rt, const Address& addr) { |
| 519 EmitLoadStore(LW, rt, addr); | 516 EmitLoadStore(LW, rt, addr); |
| 520 } | 517 } |
| 521 | 518 |
| 522 void lwc1(FRegister ft, const Address& addr) { | 519 void lwc1(FRegister ft, const Address& addr) { |
| 523 EmitFpuLoadStore(LWC1, ft, addr); | 520 EmitFpuLoadStore(LWC1, ft, addr); |
| 524 } | 521 } |
| 525 | 522 |
| 523 void madd(Register rs, Register rt) { |
| 524 EmitRType(SPECIAL2, rs, rt, R0, 0, MADD); |
| 525 } |
| 526 |
| 527 void maddu(Register rs, Register rt) { |
| 528 EmitRType(SPECIAL2, rs, rt, R0, 0, MADDU); |
| 529 } |
| 530 |
| 526 void mfc1(Register rt, FRegister fs) { | 531 void mfc1(Register rt, FRegister fs) { |
| 527 Emit(COP1 << kOpcodeShift | | 532 Emit(COP1 << kOpcodeShift | |
| 528 COP1_MF << kCop1SubShift | | 533 COP1_MF << kCop1SubShift | |
| 529 rt << kRtShift | | 534 rt << kRtShift | |
| 530 fs << kFsShift); | 535 fs << kFsShift); |
| 531 } | 536 } |
| 532 | 537 |
| 533 void mfhi(Register rd) { | 538 void mfhi(Register rd) { |
| 534 EmitRType(SPECIAL, R0, R0, rd, 0, MFHI); | 539 EmitRType(SPECIAL, R0, R0, rd, 0, MFHI); |
| 535 } | 540 } |
| (...skipping 24 matching lines...) Expand all Loading... |
| 560 EmitFpuRType(COP1, FMT_S, F0, fs, fd, COP1_MOV); | 565 EmitFpuRType(COP1, FMT_S, F0, fs, fd, COP1_MOV); |
| 561 } | 566 } |
| 562 | 567 |
| 563 void mtc1(Register rt, FRegister fs) { | 568 void mtc1(Register rt, FRegister fs) { |
| 564 Emit(COP1 << kOpcodeShift | | 569 Emit(COP1 << kOpcodeShift | |
| 565 COP1_MT << kCop1SubShift | | 570 COP1_MT << kCop1SubShift | |
| 566 rt << kRtShift | | 571 rt << kRtShift | |
| 567 fs << kFsShift); | 572 fs << kFsShift); |
| 568 } | 573 } |
| 569 | 574 |
| 575 void mthi(Register rs) { |
| 576 EmitRType(SPECIAL, rs, R0, R0, 0, MTHI); |
| 577 } |
| 578 |
| 579 void mtlo(Register rs) { |
| 580 EmitRType(SPECIAL, rs, R0, R0, 0, MTLO); |
| 581 } |
| 582 |
| 570 void muld(DRegister dd, DRegister ds, DRegister dt) { | 583 void muld(DRegister dd, DRegister ds, DRegister dt) { |
| 571 FRegister fd = static_cast<FRegister>(dd * 2); | 584 FRegister fd = static_cast<FRegister>(dd * 2); |
| 572 FRegister fs = static_cast<FRegister>(ds * 2); | 585 FRegister fs = static_cast<FRegister>(ds * 2); |
| 573 FRegister ft = static_cast<FRegister>(dt * 2); | 586 FRegister ft = static_cast<FRegister>(dt * 2); |
| 574 EmitFpuRType(COP1, FMT_D, ft, fs, fd, COP1_MUL); | 587 EmitFpuRType(COP1, FMT_D, ft, fs, fd, COP1_MUL); |
| 575 } | 588 } |
| 576 | 589 |
| 577 void mult(Register rs, Register rt) { | 590 void mult(Register rs, Register rt) { |
| 578 EmitRType(SPECIAL, rs, rt, R0, 0, MULT); | 591 EmitRType(SPECIAL, rs, rt, R0, 0, MULT); |
| 579 } | 592 } |
| (...skipping 592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1172 Register value, | 1185 Register value, |
| 1173 Label* no_update); | 1186 Label* no_update); |
| 1174 | 1187 |
| 1175 DISALLOW_ALLOCATION(); | 1188 DISALLOW_ALLOCATION(); |
| 1176 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1189 DISALLOW_COPY_AND_ASSIGN(Assembler); |
| 1177 }; | 1190 }; |
| 1178 | 1191 |
| 1179 } // namespace dart | 1192 } // namespace dart |
| 1180 | 1193 |
| 1181 #endif // VM_ASSEMBLER_MIPS_H_ | 1194 #endif // VM_ASSEMBLER_MIPS_H_ |
| OLD | NEW |