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

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: Unaligned access simulate using load/shift/or and store/shift/and Created 4 years, 8 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 1811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1822 if (is_int16(rs.offset_)) { 1822 if (is_int16(rs.offset_)) {
1823 GenInstrImmediate(LW, rs.rm(), rd, rs.offset_); 1823 GenInstrImmediate(LW, rs.rm(), rd, rs.offset_);
1824 } else { // Offset > 16 bits, use multiple instructions to load. 1824 } else { // Offset > 16 bits, use multiple instructions to load.
1825 LoadRegPlusOffsetToAt(rs); 1825 LoadRegPlusOffsetToAt(rs);
1826 GenInstrImmediate(LW, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0)); 1826 GenInstrImmediate(LW, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0));
1827 } 1827 }
1828 } 1828 }
1829 1829
1830 1830
1831 void Assembler::lwl(Register rd, const MemOperand& rs) { 1831 void Assembler::lwl(Register rd, const MemOperand& rs) {
1832 DCHECK(is_int16(rs.offset_));
1832 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_); 1833 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_);
1833 } 1834 }
1834 1835
1835 1836
1836 void Assembler::lwr(Register rd, const MemOperand& rs) { 1837 void Assembler::lwr(Register rd, const MemOperand& rs) {
1838 DCHECK(is_int16(rs.offset_));
1837 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_); 1839 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_);
1838 } 1840 }
1839 1841
1840 1842
1841 void Assembler::sb(Register rd, const MemOperand& rs) { 1843 void Assembler::sb(Register rd, const MemOperand& rs) {
1842 if (is_int16(rs.offset_)) { 1844 if (is_int16(rs.offset_)) {
1843 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_); 1845 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_);
1844 } else { // Offset > 16 bits, use multiple instructions to store. 1846 } else { // Offset > 16 bits, use multiple instructions to store.
1845 LoadRegPlusOffsetToAt(rs); 1847 LoadRegPlusOffsetToAt(rs);
1846 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0)); 1848 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0));
(...skipping 15 matching lines...) Expand all
1862 if (is_int16(rs.offset_)) { 1864 if (is_int16(rs.offset_)) {
1863 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_); 1865 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_);
1864 } else { // Offset > 16 bits, use multiple instructions to store. 1866 } else { // Offset > 16 bits, use multiple instructions to store.
1865 LoadRegPlusOffsetToAt(rs); 1867 LoadRegPlusOffsetToAt(rs);
1866 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0)); 1868 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0));
1867 } 1869 }
1868 } 1870 }
1869 1871
1870 1872
1871 void Assembler::swl(Register rd, const MemOperand& rs) { 1873 void Assembler::swl(Register rd, const MemOperand& rs) {
1874 DCHECK(is_int16(rs.offset_));
1872 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_); 1875 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_);
1873 } 1876 }
1874 1877
1875 1878
1876 void Assembler::swr(Register rd, const MemOperand& rs) { 1879 void Assembler::swr(Register rd, const MemOperand& rs) {
1880 DCHECK(is_int16(rs.offset_));
1877 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_); 1881 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_);
1878 } 1882 }
1879 1883
1880 1884
1881 void Assembler::lui(Register rd, int32_t j) { 1885 void Assembler::lui(Register rd, int32_t j) {
1882 DCHECK(is_uint16(j)); 1886 DCHECK(is_uint16(j));
1883 GenInstrImmediate(LUI, zero_reg, rd, j); 1887 GenInstrImmediate(LUI, zero_reg, rd, j);
1884 } 1888 }
1885 1889
1886 1890
(...skipping 1265 matching lines...) Expand 10 before | Expand all | Expand 10 after
3152 3156
3153 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { 3157 if (icache_flush_mode != SKIP_ICACHE_FLUSH) {
3154 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); 3158 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t));
3155 } 3159 }
3156 } 3160 }
3157 3161
3158 } // namespace internal 3162 } // namespace internal
3159 } // namespace v8 3163 } // namespace v8
3160 3164
3161 #endif // V8_TARGET_ARCH_MIPS 3165 #endif // V8_TARGET_ARCH_MIPS
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698