OLD | NEW |
1 // Copyright (c) 1994-2006 Sun Microsystems Inc. | 1 // Copyright (c) 1994-2006 Sun Microsystems Inc. |
2 // All Rights Reserved. | 2 // All Rights Reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // - Redistributions of source code must retain the above copyright notice, | 8 // - Redistributions of source code must retain the above copyright notice, |
9 // this list of conditions and the following disclaimer. | 9 // this list of conditions and the following disclaimer. |
10 // | 10 // |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1693 DCHECK(rd.is_valid() && rt.is_valid() && is_uint5(sa)); | 1693 DCHECK(rd.is_valid() && rt.is_valid() && is_uint5(sa)); |
1694 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); | 1694 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
1695 Instr instr = SPECIAL | (1 << kRsShift) | (rt.code() << kRtShift) | 1695 Instr instr = SPECIAL | (1 << kRsShift) | (rt.code() << kRtShift) |
1696 | (rd.code() << kRdShift) | (sa << kSaShift) | SRL; | 1696 | (rd.code() << kRdShift) | (sa << kSaShift) | SRL; |
1697 emit(instr); | 1697 emit(instr); |
1698 } | 1698 } |
1699 | 1699 |
1700 | 1700 |
1701 void Assembler::rotrv(Register rd, Register rt, Register rs) { | 1701 void Assembler::rotrv(Register rd, Register rt, Register rs) { |
1702 // Should be called via MacroAssembler::Ror. | 1702 // Should be called via MacroAssembler::Ror. |
1703 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid() ); | 1703 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
1704 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); | 1704 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
1705 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | 1705 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) |
1706 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; | 1706 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; |
1707 emit(instr); | 1707 emit(instr); |
1708 } | 1708 } |
1709 | 1709 |
1710 | 1710 |
| 1711 void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) { |
| 1712 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
| 1713 DCHECK(sa < 5 && sa > 0); |
| 1714 DCHECK(IsMipsArchVariant(kMips32r6)); |
| 1715 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | |
| 1716 (rd.code() << kRdShift) | (sa - 1) << kSaShift | LSA; |
| 1717 emit(instr); |
| 1718 } |
| 1719 |
| 1720 |
1711 // ------------Memory-instructions------------- | 1721 // ------------Memory-instructions------------- |
1712 | 1722 |
1713 // Helper for base-reg + offset, when offset is larger than int16. | 1723 // Helper for base-reg + offset, when offset is larger than int16. |
1714 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { | 1724 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { |
1715 DCHECK(!src.rm().is(at)); | 1725 DCHECK(!src.rm().is(at)); |
1716 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask); | 1726 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask); |
1717 ori(at, at, src.offset_ & kImm16Mask); // Load 32-bit offset. | 1727 ori(at, at, src.offset_ & kImm16Mask); // Load 32-bit offset. |
1718 addu(at, at, src.rm()); // Add base register. | 1728 addu(at, at, src.rm()); // Add base register. |
1719 } | 1729 } |
1720 | 1730 |
(...skipping 1332 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3053 | 3063 |
3054 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3064 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3055 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); | 3065 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); |
3056 } | 3066 } |
3057 } | 3067 } |
3058 | 3068 |
3059 } // namespace internal | 3069 } // namespace internal |
3060 } // namespace v8 | 3070 } // namespace v8 |
3061 | 3071 |
3062 #endif // V8_TARGET_ARCH_MIPS | 3072 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |