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

Side by Side Diff: src/mips64/assembler-mips64.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/mips64/assembler-mips64.h ('k') | src/mips64/macro-assembler-mips64.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 1887 matching lines...) Expand 10 before | Expand all | Expand 10 after
1898 } 1898 }
1899 1899
1900 1900
1901 void Assembler::dsra32(Register rd, Register rt, uint16_t sa) { 1901 void Assembler::dsra32(Register rd, Register rt, uint16_t sa) {
1902 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, DSRA32); 1902 GenInstrRegister(SPECIAL, zero_reg, rt, rd, sa & 0x1F, DSRA32);
1903 } 1903 }
1904 1904
1905 1905
1906 void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) { 1906 void Assembler::lsa(Register rd, Register rt, Register rs, uint8_t sa) {
1907 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); 1907 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid());
1908 DCHECK(sa < 5 && sa > 0); 1908 DCHECK(sa <= 3);
1909 DCHECK(kArchVariant == kMips64r6); 1909 DCHECK(kArchVariant == kMips64r6);
1910 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | 1910 Instr instr = SPECIAL | rs.code() << kRsShift | rt.code() << kRtShift |
1911 (rd.code() << kRdShift) | (sa - 1) << kSaShift | LSA; 1911 rd.code() << kRdShift | sa << kSaShift | LSA;
1912 emit(instr); 1912 emit(instr);
1913 } 1913 }
1914 1914
1915 1915
1916 void Assembler::dlsa(Register rd, Register rt, Register rs, uint8_t sa) { 1916 void Assembler::dlsa(Register rd, Register rt, Register rs, uint8_t sa) {
1917 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid()); 1917 DCHECK(rd.is_valid() && rt.is_valid() && rs.is_valid());
1918 DCHECK(sa < 5 && sa > 0); 1918 DCHECK(sa <= 3);
1919 DCHECK(kArchVariant == kMips64r6); 1919 DCHECK(kArchVariant == kMips64r6);
1920 Instr instr = SPECIAL | (rs.code() << kRsShift) | (rt.code() << kRtShift) | 1920 Instr instr = SPECIAL | rs.code() << kRsShift | rt.code() << kRtShift |
1921 (rd.code() << kRdShift) | (sa - 1) << kSaShift | DLSA; 1921 rd.code() << kRdShift | sa << kSaShift | DLSA;
1922 emit(instr); 1922 emit(instr);
1923 } 1923 }
1924 1924
1925 1925
1926 // ------------Memory-instructions------------- 1926 // ------------Memory-instructions-------------
1927 1927
1928 // Helper for base-reg + offset, when offset is larger than int16. 1928 // Helper for base-reg + offset, when offset is larger than int16.
1929 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) { 1929 void Assembler::LoadRegPlusOffsetToAt(const MemOperand& src) {
1930 DCHECK(!src.rm().is(at)); 1930 DCHECK(!src.rm().is(at));
1931 DCHECK(is_int32(src.offset_)); 1931 DCHECK(is_int32(src.offset_));
(...skipping 1457 matching lines...) Expand 10 before | Expand all | Expand 10 after
3389 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3389 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3390 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); 3390 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize);
3391 } 3391 }
3392 } 3392 }
3393 3393
3394 3394
3395 } // namespace internal 3395 } // namespace internal
3396 } // namespace v8 3396 } // namespace v8
3397 3397
3398 #endif // V8_TARGET_ARCH_MIPS64 3398 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW
« no previous file with comments | « src/mips64/assembler-mips64.h ('k') | src/mips64/macro-assembler-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698