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_ASSEMBLER_MIPS_H_ | 5 #ifndef RUNTIME_VM_ASSEMBLER_MIPS_H_ |
6 #define RUNTIME_VM_ASSEMBLER_MIPS_H_ | 6 #define RUNTIME_VM_ASSEMBLER_MIPS_H_ |
7 | 7 |
8 #ifndef RUNTIME_VM_ASSEMBLER_H_ | 8 #ifndef RUNTIME_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 1406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1417 | 1417 |
1418 void SmiUntag(Register reg) { sra(reg, reg, kSmiTagSize); } | 1418 void SmiUntag(Register reg) { sra(reg, reg, kSmiTagSize); } |
1419 | 1419 |
1420 void SmiUntag(Register dst, Register src) { sra(dst, src, kSmiTagSize); } | 1420 void SmiUntag(Register dst, Register src) { sra(dst, src, kSmiTagSize); } |
1421 | 1421 |
1422 void BranchIfNotSmi(Register reg, Label* label) { | 1422 void BranchIfNotSmi(Register reg, Label* label) { |
1423 andi(CMPRES1, reg, Immediate(kSmiTagMask)); | 1423 andi(CMPRES1, reg, Immediate(kSmiTagMask)); |
1424 bne(CMPRES1, ZR, label); | 1424 bne(CMPRES1, ZR, label); |
1425 } | 1425 } |
1426 | 1426 |
| 1427 void BranchIfSmi(Register reg, Label* label) { |
| 1428 andi(CMPRES1, reg, Immediate(kSmiTagMask)); |
| 1429 beq(CMPRES1, ZR, label); |
| 1430 } |
| 1431 |
1427 void LoadFromOffset(Register reg, Register base, int32_t offset) { | 1432 void LoadFromOffset(Register reg, Register base, int32_t offset) { |
1428 ASSERT(!in_delay_slot_); | 1433 ASSERT(!in_delay_slot_); |
1429 if (Utils::IsInt(kImmBits, offset)) { | 1434 if (Utils::IsInt(kImmBits, offset)) { |
1430 lw(reg, Address(base, offset)); | 1435 lw(reg, Address(base, offset)); |
1431 } else { | 1436 } else { |
1432 LoadImmediate(TMP, offset); | 1437 LoadImmediate(TMP, offset); |
1433 addu(TMP, base, TMP); | 1438 addu(TMP, base, TMP); |
1434 lw(reg, Address(TMP, 0)); | 1439 lw(reg, Address(TMP, 0)); |
1435 } | 1440 } |
1436 } | 1441 } |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1688 Register value, | 1693 Register value, |
1689 Label* no_update); | 1694 Label* no_update); |
1690 | 1695 |
1691 DISALLOW_ALLOCATION(); | 1696 DISALLOW_ALLOCATION(); |
1692 DISALLOW_COPY_AND_ASSIGN(Assembler); | 1697 DISALLOW_COPY_AND_ASSIGN(Assembler); |
1693 }; | 1698 }; |
1694 | 1699 |
1695 } // namespace dart | 1700 } // namespace dart |
1696 | 1701 |
1697 #endif // RUNTIME_VM_ASSEMBLER_MIPS_H_ | 1702 #endif // RUNTIME_VM_ASSEMBLER_MIPS_H_ |
OLD | NEW |