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

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

Issue 1779713009: Implement optional turbofan UnalignedLoad and UnalignedStore operators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
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 1813 matching lines...) Expand 10 before | Expand all | Expand 10 after
1824 if (is_int16(rs.offset_)) { 1824 if (is_int16(rs.offset_)) {
1825 GenInstrImmediate(LW, rs.rm(), rd, rs.offset_); 1825 GenInstrImmediate(LW, rs.rm(), rd, rs.offset_);
1826 } else { // Offset > 16 bits, use multiple instructions to load. 1826 } else { // Offset > 16 bits, use multiple instructions to load.
1827 LoadRegPlusOffsetToAt(rs); 1827 LoadRegPlusOffsetToAt(rs);
1828 GenInstrImmediate(LW, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0)); 1828 GenInstrImmediate(LW, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0));
1829 } 1829 }
1830 } 1830 }
1831 1831
1832 1832
1833 void Assembler::lwl(Register rd, const MemOperand& rs) { 1833 void Assembler::lwl(Register rd, const MemOperand& rs) {
1834 DCHECK(is_int16(rs.offset_));
1834 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_); 1835 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_);
1835 } 1836 }
1836 1837
1837 1838
1838 void Assembler::lwr(Register rd, const MemOperand& rs) { 1839 void Assembler::lwr(Register rd, const MemOperand& rs) {
1840 DCHECK(is_int16(rs.offset_));
1839 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_); 1841 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_);
1840 } 1842 }
1841 1843
1842 1844
1843 void Assembler::sb(Register rd, const MemOperand& rs) { 1845 void Assembler::sb(Register rd, const MemOperand& rs) {
1844 if (is_int16(rs.offset_)) { 1846 if (is_int16(rs.offset_)) {
1845 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_); 1847 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_);
1846 } else { // Offset > 16 bits, use multiple instructions to store. 1848 } else { // Offset > 16 bits, use multiple instructions to store.
1847 LoadRegPlusOffsetToAt(rs); 1849 LoadRegPlusOffsetToAt(rs);
1848 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0)); 1850 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0));
(...skipping 15 matching lines...) Expand all
1864 if (is_int16(rs.offset_)) { 1866 if (is_int16(rs.offset_)) {
1865 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_); 1867 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_);
1866 } else { // Offset > 16 bits, use multiple instructions to store. 1868 } else { // Offset > 16 bits, use multiple instructions to store.
1867 LoadRegPlusOffsetToAt(rs); 1869 LoadRegPlusOffsetToAt(rs);
1868 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0)); 1870 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0));
1869 } 1871 }
1870 } 1872 }
1871 1873
1872 1874
1873 void Assembler::swl(Register rd, const MemOperand& rs) { 1875 void Assembler::swl(Register rd, const MemOperand& rs) {
1876 DCHECK(is_int16(rs.offset_));
1874 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_); 1877 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_);
1875 } 1878 }
1876 1879
1877 1880
1878 void Assembler::swr(Register rd, const MemOperand& rs) { 1881 void Assembler::swr(Register rd, const MemOperand& rs) {
1882 DCHECK(is_int16(rs.offset_));
1879 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_); 1883 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_);
1880 } 1884 }
1881 1885
1882 1886
1883 void Assembler::lui(Register rd, int32_t j) { 1887 void Assembler::lui(Register rd, int32_t j) {
1884 DCHECK(is_uint16(j)); 1888 DCHECK(is_uint16(j));
1885 GenInstrImmediate(LUI, zero_reg, rd, j); 1889 GenInstrImmediate(LUI, zero_reg, rd, j);
1886 } 1890 }
1887 1891
1888 1892
(...skipping 1266 matching lines...) Expand 10 before | Expand all | Expand 10 after
3155 3159
3156 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3160 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3157 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); 3161 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t));
3158 } 3162 }
3159 } 3163 }
3160 3164
3161 } // namespace internal 3165 } // namespace internal
3162 } // namespace v8 3166 } // namespace v8
3163 3167
3164 #endif // V8_TARGET_ARCH_MIPS 3168 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698