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 | |
1480 void LoadFromOffset(Register reg, Register base, int32_t offset) { | 1475 void LoadFromOffset(Register reg, Register base, int32_t offset) { |
1481 ASSERT(!in_delay_slot_); | 1476 ASSERT(!in_delay_slot_); |
1482 if (Utils::IsInt(kImmBits, offset)) { | 1477 if (Utils::IsInt(kImmBits, offset)) { |
1483 lw(reg, Address(base, offset)); | 1478 lw(reg, Address(base, offset)); |
1484 } else { | 1479 } else { |
1485 LoadImmediate(TMP, offset); | 1480 LoadImmediate(TMP, offset); |
1486 addu(TMP, base, TMP); | 1481 addu(TMP, base, TMP); |
1487 lw(reg, Address(TMP, 0)); | 1482 lw(reg, Address(TMP, 0)); |
1488 } | 1483 } |
1489 } | 1484 } |
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 Register value, | 1749 Register value, |
1755 Label* no_update); | 1750 Label* no_update); |
1756 | 1751 |
1757 DISALLOW_ALLOCATION(); | 1752 DISALLOW_ALLOCATION(); |
1758 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1753 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1759 }; | 1754 }; |
1760 | 1755 |
1761 } // namespace dart | 1756 } // namespace dart |
1762 | 1757 |
1763 #endif // VM_ASSEMBLER_MIPS_H_ | 1758 #endif // VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |