Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(42)

Side by Side Diff: src/mips/assembler-mips.cc

Issue 1749263002: MIPS: Improve Lsa/Dlsa implementations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « src/mips/assembler-mips.h ('k') | src/mips/macro-assembler-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698