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 1743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1754 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); | 1754 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
1755 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); | 1755 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); |
1756 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | 1756 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) |
1757 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; | 1757 | (rd.code() << kRdShift) | (1 << kSaShift) | SRLV; |
1758 emit(instr); | 1758 emit(instr); |
1759 } | 1759 } |
1760 | 1760 |
1761 | 1761 |
1762 void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) { | 1762 void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) { |
1763 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); | 1763 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); |
1764 DCHECK(sa < 5 && sa > 0); | 1764 DCHECK(sa <= 3); |
1765 DCHECK(IsMipsArchVariant(kMips32r6)); | 1765 DCHECK(IsMipsArchVariant(kMips32r6)); |
1766 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | | 1766 Instr instr = SPECIAL | rs.code() << kRsShift | rt.code() << kRtShift | |
1767 (rd.code() << kRdShift) | (sa - 1) << kSaShift | LSA; | 1767 rd.code() << kRdShift | sa << kSaShift | LSA; |
1768 emit(instr); | 1768 emit(instr); |
1769 } | 1769 } |
1770 | 1770 |
1771 | 1771 |
1772 // ------------Memory-instructions------------- | 1772 // ------------Memory-instructions------------- |
1773 | 1773 |
1774 // Helper for base-reg + offset, when offset is larger than int16. | 1774 // Helper for base-reg + offset, when offset is larger than int16. |
1775 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { | 1775 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { |
1776 DCHECK(!src.rm().is(at)); | 1776 DCHECK(!src.rm().is(at)); |
1777 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask); | 1777 lui(at, (src.offset_ >> kLuiShift) & kImm16Mask); |
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3155 | 3155 |
3156 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3156 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3157 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); | 3157 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); |
3158 } | 3158 } |
3159 } | 3159 } |
3160 | 3160 |
3161 } // namespace internal | 3161 } // namespace internal |
3162 } // namespace v8 | 3162 } // namespace v8 |
3163 | 3163 |
3164 #endif // V8_TARGET_ARCH_MIPS | 3164 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |