| 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 2081 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2092 src.offset_ + Register::kMantissaOffset); | 2092 src.offset_ + Register::kMantissaOffset); |
| 2093 GenInstrImmediate(LW, src.rm(), at, | 2093 GenInstrImmediate(LW, src.rm(), at, |
| 2094 src.offset_ + Register::kExponentOffset); | 2094 src.offset_ + Register::kExponentOffset); |
| 2095 mthc1(at, fd); | 2095 mthc1(at, fd); |
| 2096 } else { // Offset > 16 bits, use multiple instructions to load. | 2096 } else { // Offset > 16 bits, use multiple instructions to load. |
| 2097 LoadRegPlusOffsetToAt(src); | 2097 LoadRegPlusOffsetToAt(src); |
| 2098 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); | 2098 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); |
| 2099 GenInstrImmediate(LW, at, at, Register::kExponentOffset); | 2099 GenInstrImmediate(LW, at, at, Register::kExponentOffset); |
| 2100 mthc1(at, fd); | 2100 mthc1(at, fd); |
| 2101 } | 2101 } |
| 2102 } else if (IsFp32Mode()) { // fp32 mode. | 2102 } else { // fp32 mode. |
| 2103 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { | 2103 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { |
| 2104 GenInstrImmediate(LWC1, src.rm(), fd, | 2104 GenInstrImmediate(LWC1, src.rm(), fd, |
| 2105 src.offset_ + Register::kMantissaOffset); | 2105 src.offset_ + Register::kMantissaOffset); |
| 2106 FPURegister nextfpreg; | 2106 FPURegister nextfpreg; |
| 2107 nextfpreg.setcode(fd.code() + 1); | 2107 nextfpreg.setcode(fd.code() + 1); |
| 2108 GenInstrImmediate(LWC1, src.rm(), nextfpreg, | 2108 GenInstrImmediate(LWC1, src.rm(), nextfpreg, |
| 2109 src.offset_ + Register::kExponentOffset); | 2109 src.offset_ + Register::kExponentOffset); |
| 2110 } else { // Offset > 16 bits, use multiple instructions to load. | 2110 } else { // Offset > 16 bits, use multiple instructions to load. |
| 2111 LoadRegPlusOffsetToAt(src); | 2111 LoadRegPlusOffsetToAt(src); |
| 2112 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); | 2112 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); |
| 2113 FPURegister nextfpreg; | 2113 FPURegister nextfpreg; |
| 2114 nextfpreg.setcode(fd.code() + 1); | 2114 nextfpreg.setcode(fd.code() + 1); |
| 2115 GenInstrImmediate(LWC1, at, nextfpreg, Register::kExponentOffset); | 2115 GenInstrImmediate(LWC1, at, nextfpreg, Register::kExponentOffset); |
| 2116 } | 2116 } |
| 2117 } else { | |
| 2118 DCHECK(IsFpxxMode()); | |
| 2119 // Currently we support FPXX on Mips32r2 and Mips32r6 | |
| 2120 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); | |
| 2121 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { | |
| 2122 GenInstrImmediate(LWC1, src.rm(), fd, | |
| 2123 src.offset_ + Register::kMantissaOffset); | |
| 2124 GenInstrImmediate(LW, src.rm(), at, | |
| 2125 src.offset_ + Register::kExponentOffset); | |
| 2126 mthc1(at, fd); | |
| 2127 } else { // Offset > 16 bits, use multiple instructions to load. | |
| 2128 LoadRegPlusOffsetToAt(src); | |
| 2129 GenInstrImmediate(LWC1, at, fd, Register::kMantissaOffset); | |
| 2130 GenInstrImmediate(LW, at, at, Register::kExponentOffset); | |
| 2131 mthc1(at, fd); | |
| 2132 } | |
| 2133 } | 2117 } |
| 2134 } | 2118 } |
| 2135 | 2119 |
| 2136 | 2120 |
| 2137 void Assembler::swc1(FPURegister fd, const MemOperand& src) { | 2121 void Assembler::swc1(FPURegister fd, const MemOperand& src) { |
| 2138 if (is_int16(src.offset_)) { | 2122 if (is_int16(src.offset_)) { |
| 2139 GenInstrImmediate(SWC1, src.rm(), fd, src.offset_); | 2123 GenInstrImmediate(SWC1, src.rm(), fd, src.offset_); |
| 2140 } else { // Offset > 16 bits, use multiple instructions to load. | 2124 } else { // Offset > 16 bits, use multiple instructions to load. |
| 2141 LoadRegPlusOffsetToAt(src); | 2125 LoadRegPlusOffsetToAt(src); |
| 2142 GenInstrImmediate(SWC1, at, fd, 0); | 2126 GenInstrImmediate(SWC1, at, fd, 0); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 2155 src.offset_ + Register::kMantissaOffset); | 2139 src.offset_ + Register::kMantissaOffset); |
| 2156 mfhc1(at, fd); | 2140 mfhc1(at, fd); |
| 2157 GenInstrImmediate(SW, src.rm(), at, | 2141 GenInstrImmediate(SW, src.rm(), at, |
| 2158 src.offset_ + Register::kExponentOffset); | 2142 src.offset_ + Register::kExponentOffset); |
| 2159 } else { // Offset > 16 bits, use multiple instructions to load. | 2143 } else { // Offset > 16 bits, use multiple instructions to load. |
| 2160 LoadRegPlusOffsetToAt(src); | 2144 LoadRegPlusOffsetToAt(src); |
| 2161 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); | 2145 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); |
| 2162 mfhc1(t8, fd); | 2146 mfhc1(t8, fd); |
| 2163 GenInstrImmediate(SW, at, t8, Register::kExponentOffset); | 2147 GenInstrImmediate(SW, at, t8, Register::kExponentOffset); |
| 2164 } | 2148 } |
| 2165 } else if (IsFp32Mode()) { // fp32 mode. | 2149 } else { // fp32 mode. |
| 2166 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { | 2150 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { |
| 2167 GenInstrImmediate(SWC1, src.rm(), fd, | 2151 GenInstrImmediate(SWC1, src.rm(), fd, |
| 2168 src.offset_ + Register::kMantissaOffset); | 2152 src.offset_ + Register::kMantissaOffset); |
| 2169 FPURegister nextfpreg; | 2153 FPURegister nextfpreg; |
| 2170 nextfpreg.setcode(fd.code() + 1); | 2154 nextfpreg.setcode(fd.code() + 1); |
| 2171 GenInstrImmediate(SWC1, src.rm(), nextfpreg, | 2155 GenInstrImmediate(SWC1, src.rm(), nextfpreg, |
| 2172 src.offset_ + Register::kExponentOffset); | 2156 src.offset_ + Register::kExponentOffset); |
| 2173 } else { // Offset > 16 bits, use multiple instructions to load. | 2157 } else { // Offset > 16 bits, use multiple instructions to load. |
| 2174 LoadRegPlusOffsetToAt(src); | 2158 LoadRegPlusOffsetToAt(src); |
| 2175 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); | 2159 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); |
| 2176 FPURegister nextfpreg; | 2160 FPURegister nextfpreg; |
| 2177 nextfpreg.setcode(fd.code() + 1); | 2161 nextfpreg.setcode(fd.code() + 1); |
| 2178 GenInstrImmediate(SWC1, at, nextfpreg, Register::kExponentOffset); | 2162 GenInstrImmediate(SWC1, at, nextfpreg, Register::kExponentOffset); |
| 2179 } | 2163 } |
| 2180 } else { | |
| 2181 DCHECK(IsFpxxMode()); | |
| 2182 // Currently we support FPXX on Mips32r2 and Mips32r6 | |
| 2183 DCHECK(IsMipsArchVariant(kMips32r2) || IsMipsArchVariant(kMips32r6)); | |
| 2184 if (is_int16(src.offset_) && is_int16(src.offset_ + kIntSize)) { | |
| 2185 GenInstrImmediate(SWC1, src.rm(), fd, | |
| 2186 src.offset_ + Register::kMantissaOffset); | |
| 2187 mfhc1(at, fd); | |
| 2188 GenInstrImmediate(SW, src.rm(), at, | |
| 2189 src.offset_ + Register::kExponentOffset); | |
| 2190 } else { // Offset > 16 bits, use multiple instructions to load. | |
| 2191 LoadRegPlusOffsetToAt(src); | |
| 2192 GenInstrImmediate(SWC1, at, fd, Register::kMantissaOffset); | |
| 2193 mfhc1(t8, fd); | |
| 2194 GenInstrImmediate(SW, at, t8, Register::kExponentOffset); | |
| 2195 } | |
| 2196 } | 2164 } |
| 2197 } | 2165 } |
| 2198 | 2166 |
| 2199 | 2167 |
| 2200 void Assembler::mtc1(Register rt, FPURegister fs) { | 2168 void Assembler::mtc1(Register rt, FPURegister fs) { |
| 2201 GenInstrRegister(COP1, MTC1, rt, fs, f0); | 2169 GenInstrRegister(COP1, MTC1, rt, fs, f0); |
| 2202 } | 2170 } |
| 2203 | 2171 |
| 2204 | 2172 |
| 2205 void Assembler::mthc1(Register rt, FPURegister fs) { | 2173 void Assembler::mthc1(Register rt, FPURegister fs) { |
| (...skipping 871 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3077 | 3045 |
| 3078 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { | 3046 if (icache_flush_mode != SKIP_ICACHE_FLUSH) { |
| 3079 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); | 3047 Assembler::FlushICache(isolate, pc, 2 * sizeof(int32_t)); |
| 3080 } | 3048 } |
| 3081 } | 3049 } |
| 3082 | 3050 |
| 3083 } // namespace internal | 3051 } // namespace internal |
| 3084 } // namespace v8 | 3052 } // namespace v8 |
| 3085 | 3053 |
| 3086 #endif // V8_TARGET_ARCH_MIPS | 3054 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |