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 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1465 } | 1465 } |
1466 | 1466 |
1467 void SmiUntag(Register reg) { | 1467 void SmiUntag(Register reg) { |
1468 sra(reg, reg, kSmiTagSize); | 1468 sra(reg, reg, kSmiTagSize); |
1469 } | 1469 } |
1470 | 1470 |
1471 void SmiUntag(Register dst, Register src) { | 1471 void SmiUntag(Register dst, Register src) { |
1472 sra(dst, src, kSmiTagSize); | 1472 sra(dst, src, kSmiTagSize); |
1473 } | 1473 } |
1474 | 1474 |
| 1475 void BranchIfNotSmi(Register reg, Label* label) { |
| 1476 andi(CMPRES1, reg, Immediate(kSmiTagMask)); |
| 1477 bne(CMPRES1, ZR, label); |
| 1478 } |
| 1479 |
1475 void LoadFromOffset(Register reg, Register base, int32_t offset) { | 1480 void LoadFromOffset(Register reg, Register base, int32_t offset) { |
1476 ASSERT(!in_delay_slot_); | 1481 ASSERT(!in_delay_slot_); |
1477 if (Utils::IsInt(kImmBits, offset)) { | 1482 if (Utils::IsInt(kImmBits, offset)) { |
1478 lw(reg, Address(base, offset)); | 1483 lw(reg, Address(base, offset)); |
1479 } else { | 1484 } else { |
1480 LoadImmediate(TMP, offset); | 1485 LoadImmediate(TMP, offset); |
1481 addu(TMP, base, TMP); | 1486 addu(TMP, base, TMP); |
1482 lw(reg, Address(TMP, 0)); | 1487 lw(reg, Address(TMP, 0)); |
1483 } | 1488 } |
1484 } | 1489 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1749 Register value, | 1754 Register value, |
1750 Label* no_update); | 1755 Label* no_update); |
1751 | 1756 |
1752 DISALLOW_ALLOCATION(); | 1757 DISALLOW_ALLOCATION(); |
1753 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1758 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1754 }; | 1759 }; |
1755 | 1760 |
1756 } // namespace dart | 1761 } // namespace dart |
1757 | 1762 |
1758 #endif // VM_ASSEMBLER_MIPS_H_ | 1763 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |