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 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1994 if (is_int16(rs.offset_)) { | 1994 if (is_int16(rs.offset_)) { |
1995 GenInstrImmediate(LWU, rs.rm(), rd, rs.offset_); | 1995 GenInstrImmediate(LWU, rs.rm(), rd, rs.offset_); |
1996 } else { // Offset > 16 bits, use multiple instructions to load. | 1996 } else { // Offset > 16 bits, use multiple instructions to load. |
1997 LoadRegPlusOffsetToAt(rs); | 1997 LoadRegPlusOffsetToAt(rs); |
1998 GenInstrImmediate(LWU, at, rd, 0); // Equiv to lwu(rd, MemOperand(at, 0)); | 1998 GenInstrImmediate(LWU, at, rd, 0); // Equiv to lwu(rd, MemOperand(at, 0)); |
1999 } | 1999 } |
2000 } | 2000 } |
2001 | 2001 |
2002 | 2002 |
2003 void Assembler::lwl(Register rd, const MemOperand& rs) { | 2003 void Assembler::lwl(Register rd, const MemOperand& rs) { |
| 2004 DCHECK(is_int16(rs.offset_)); |
2004 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_); | 2005 GenInstrImmediate(LWL, rs.rm(), rd, rs.offset_); |
2005 } | 2006 } |
2006 | 2007 |
2007 | 2008 |
2008 void Assembler::lwr(Register rd, const MemOperand& rs) { | 2009 void Assembler::lwr(Register rd, const MemOperand& rs) { |
| 2010 DCHECK(is_int16(rs.offset_)); |
2009 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_); | 2011 GenInstrImmediate(LWR, rs.rm(), rd, rs.offset_); |
2010 } | 2012 } |
2011 | 2013 |
2012 | 2014 |
2013 void Assembler::sb(Register rd, const MemOperand& rs) { | 2015 void Assembler::sb(Register rd, const MemOperand& rs) { |
2014 if (is_int16(rs.offset_)) { | 2016 if (is_int16(rs.offset_)) { |
2015 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_); | 2017 GenInstrImmediate(SB, rs.rm(), rd, rs.offset_); |
2016 } else { // Offset > 16 bits, use multiple instructions to store. | 2018 } else { // Offset > 16 bits, use multiple instructions to store. |
2017 LoadRegPlusOffsetToAt(rs); | 2019 LoadRegPlusOffsetToAt(rs); |
2018 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0)); | 2020 GenInstrImmediate(SB, at, rd, 0); // Equiv to sb(rd, MemOperand(at, 0)); |
(...skipping 15 matching lines...) Expand all Loading... |
2034 if (is_int16(rs.offset_)) { | 2036 if (is_int16(rs.offset_)) { |
2035 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_); | 2037 GenInstrImmediate(SW, rs.rm(), rd, rs.offset_); |
2036 } else { // Offset > 16 bits, use multiple instructions to store. | 2038 } else { // Offset > 16 bits, use multiple instructions to store. |
2037 LoadRegPlusOffsetToAt(rs); | 2039 LoadRegPlusOffsetToAt(rs); |
2038 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0)); | 2040 GenInstrImmediate(SW, at, rd, 0); // Equiv to sw(rd, MemOperand(at, 0)); |
2039 } | 2041 } |
2040 } | 2042 } |
2041 | 2043 |
2042 | 2044 |
2043 void Assembler::swl(Register rd, const MemOperand& rs) { | 2045 void Assembler::swl(Register rd, const MemOperand& rs) { |
| 2046 DCHECK(is_int16(rs.offset_)); |
2044 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_); | 2047 GenInstrImmediate(SWL, rs.rm(), rd, rs.offset_); |
2045 } | 2048 } |
2046 | 2049 |
2047 | 2050 |
2048 void Assembler::swr(Register rd, const MemOperand& rs) { | 2051 void Assembler::swr(Register rd, const MemOperand& rs) { |
| 2052 DCHECK(is_int16(rs.offset_)); |
2049 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_); | 2053 GenInstrImmediate(SWR, rs.rm(), rd, rs.offset_); |
2050 } | 2054 } |
2051 | 2055 |
2052 | 2056 |
2053 void Assembler::lui(Register rd, int32_t j) { | 2057 void Assembler::lui(Register rd, int32_t j) { |
2054 DCHECK(is_uint16(j)); | 2058 DCHECK(is_uint16(j)); |
2055 GenInstrImmediate(LUI, zero_reg, rd, j); | 2059 GenInstrImmediate(LUI, zero_reg, rd, j); |
2056 } | 2060 } |
2057 | 2061 |
2058 | 2062 |
(...skipping 18 matching lines...) Expand all Loading... |
2077 } | 2081 } |
2078 | 2082 |
2079 | 2083 |
2080 void Assembler::dati(Register rs, int32_t j) { | 2084 void Assembler::dati(Register rs, int32_t j) { |
2081 DCHECK(is_uint16(j)); | 2085 DCHECK(is_uint16(j)); |
2082 GenInstrImmediate(REGIMM, rs, DATI, j); | 2086 GenInstrImmediate(REGIMM, rs, DATI, j); |
2083 } | 2087 } |
2084 | 2088 |
2085 | 2089 |
2086 void Assembler::ldl(Register rd, const MemOperand& rs) { | 2090 void Assembler::ldl(Register rd, const MemOperand& rs) { |
| 2091 DCHECK(is_int16(rs.offset_)); |
2087 GenInstrImmediate(LDL, rs.rm(), rd, rs.offset_); | 2092 GenInstrImmediate(LDL, rs.rm(), rd, rs.offset_); |
2088 } | 2093 } |
2089 | 2094 |
2090 | 2095 |
2091 void Assembler::ldr(Register rd, const MemOperand& rs) { | 2096 void Assembler::ldr(Register rd, const MemOperand& rs) { |
| 2097 DCHECK(is_int16(rs.offset_)); |
2092 GenInstrImmediate(LDR, rs.rm(), rd, rs.offset_); | 2098 GenInstrImmediate(LDR, rs.rm(), rd, rs.offset_); |
2093 } | 2099 } |
2094 | 2100 |
2095 | 2101 |
2096 void Assembler::sdl(Register rd, const MemOperand& rs) { | 2102 void Assembler::sdl(Register rd, const MemOperand& rs) { |
| 2103 DCHECK(is_int16(rs.offset_)); |
2097 GenInstrImmediate(SDL, rs.rm(), rd, rs.offset_); | 2104 GenInstrImmediate(SDL, rs.rm(), rd, rs.offset_); |
2098 } | 2105 } |
2099 | 2106 |
2100 | 2107 |
2101 void Assembler::sdr(Register rd, const MemOperand& rs) { | 2108 void Assembler::sdr(Register rd, const MemOperand& rs) { |
| 2109 DCHECK(is_int16(rs.offset_)); |
2102 GenInstrImmediate(SDR, rs.rm(), rd, rs.offset_); | 2110 GenInstrImmediate(SDR, rs.rm(), rd, rs.offset_); |
2103 } | 2111 } |
2104 | 2112 |
2105 | 2113 |
2106 void Assembler::ld(Register rd, const MemOperand& rs) { | 2114 void Assembler::ld(Register rd, const MemOperand& rs) { |
2107 if (is_int16(rs.offset_)) { | 2115 if (is_int16(rs.offset_)) { |
2108 GenInstrImmediate(LD, rs.rm(), rd, rs.offset_); | 2116 GenInstrImmediate(LD, rs.rm(), rd, rs.offset_); |
2109 } else { // Offset > 16 bits, use multiple instructions to load. | 2117 } else { // Offset > 16 bits, use multiple instructions to load. |
2110 LoadRegPlusOffsetToAt(rs); | 2118 LoadRegPlusOffsetToAt(rs); |
2111 GenInstrImmediate(LD, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0)); | 2119 GenInstrImmediate(LD, at, rd, 0); // Equiv to lw(rd, MemOperand(at, 0)); |
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3392 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3400 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
3393 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); | 3401 Assembler::FlushICache(isolate, pc, 4 * Assembler::kInstrSize); |
3394 } | 3402 } |
3395 } | 3403 } |
3396 | 3404 |
3397 | 3405 |
3398 } // namespace internal | 3406 } // namespace internal |
3399 } // namespace v8 | 3407 } // namespace v8 |
3400 | 3408 |
3401 #endif // V8_TARGET_ARCH_MIPS64 | 3409 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |