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 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 } | 497 } |
498 | 498 |
499 // Branch if not equal, likely taken. | 499 // Branch if not equal, likely taken. |
500 // Delay slot executed only when branch taken. | 500 // Delay slot executed only when branch taken. |
501 void bnel(Register rs, Register rt, Label* l) { | 501 void bnel(Register rs, Register rt, Label* l) { |
502 ASSERT(!in_delay_slot_); // Jump within a delay slot is not supported. | 502 ASSERT(!in_delay_slot_); // Jump within a delay slot is not supported. |
503 EmitBranch(BNEL, rs, rt, l); | 503 EmitBranch(BNEL, rs, rt, l); |
504 EmitBranchDelayNop(); | 504 EmitBranchDelayNop(); |
505 } | 505 } |
506 | 506 |
| 507 static int32_t BreakEncoding(int32_t code) { |
| 508 ASSERT(Utils::IsUint(20, code)); |
| 509 return SPECIAL << kOpcodeShift | |
| 510 code << kBreakCodeShift | |
| 511 BREAK << kFunctionShift; |
| 512 } |
| 513 |
| 514 |
507 void break_(int32_t code) { | 515 void break_(int32_t code) { |
508 ASSERT(Utils::IsUint(20, code)); | 516 Emit(BreakEncoding(code)); |
509 Emit(SPECIAL << kOpcodeShift | | 517 } |
510 code << kBreakCodeShift | | 518 |
511 BREAK << kFunctionShift); | 519 static uword GetBreakInstructionFiller() { |
| 520 return BreakEncoding(0); |
512 } | 521 } |
513 | 522 |
514 // FPU compare, always false. | 523 // FPU compare, always false. |
515 void cfd(DRegister ds, DRegister dt) { | 524 void cfd(DRegister ds, DRegister dt) { |
516 FRegister fs = static_cast<FRegister>(ds * 2); | 525 FRegister fs = static_cast<FRegister>(ds * 2); |
517 FRegister ft = static_cast<FRegister>(dt * 2); | 526 FRegister ft = static_cast<FRegister>(dt * 2); |
518 EmitFpuRType(COP1, FMT_D, ft, fs, F0, COP1_C_F); | 527 EmitFpuRType(COP1, FMT_D, ft, fs, F0, COP1_C_F); |
519 } | 528 } |
520 | 529 |
521 // FPU compare, true if unordered, i.e. one is NaN. | 530 // FPU compare, true if unordered, i.e. one is NaN. |
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1732 Register value, | 1741 Register value, |
1733 Label* no_update); | 1742 Label* no_update); |
1734 | 1743 |
1735 DISALLOW_ALLOCATION(); | 1744 DISALLOW_ALLOCATION(); |
1736 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1745 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1737 }; | 1746 }; |
1738 | 1747 |
1739 } // namespace dart | 1748 } // namespace dart |
1740 | 1749 |
1741 #endif // VM_ASSEMBLER_MIPS_H_ | 1750 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |