OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/code-generator.h" | 5 #include "src/compiler/code-generator.h" |
6 #include "src/compilation-info.h" | 6 #include "src/compilation-info.h" |
7 #include "src/compiler/code-generator-impl.h" | 7 #include "src/compiler/code-generator-impl.h" |
8 #include "src/compiler/gap-resolver.h" | 8 #include "src/compiler/gap-resolver.h" |
9 #include "src/compiler/node-matchers.h" | 9 #include "src/compiler/node-matchers.h" |
10 #include "src/compiler/osr.h" | 10 #include "src/compiler/osr.h" |
(...skipping 2163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2174 case kMips64I32x4SConvertF32x4: { | 2174 case kMips64I32x4SConvertF32x4: { |
2175 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2175 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
2176 __ ftrunc_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 2176 __ ftrunc_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
2177 break; | 2177 break; |
2178 } | 2178 } |
2179 case kMips64I32x4UConvertF32x4: { | 2179 case kMips64I32x4UConvertF32x4: { |
2180 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2180 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
2181 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 2181 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
2182 break; | 2182 break; |
2183 } | 2183 } |
| 2184 case kMips64I32x4Neg: { |
| 2185 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2186 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); |
| 2187 __ subv_w(i.OutputSimd128Register(), kSimd128RegZero, |
| 2188 i.InputSimd128Register(0)); |
| 2189 break; |
| 2190 } |
| 2191 case kMips64I32x4LtS: { |
| 2192 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2193 __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2194 i.InputSimd128Register(1)); |
| 2195 break; |
| 2196 } |
| 2197 case kMips64I32x4LeS: { |
| 2198 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2199 __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2200 i.InputSimd128Register(1)); |
| 2201 break; |
| 2202 } |
| 2203 case kMips64I32x4LtU: { |
| 2204 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2205 __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2206 i.InputSimd128Register(1)); |
| 2207 break; |
| 2208 } |
| 2209 case kMips64I32x4LeU: { |
| 2210 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2211 __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2212 i.InputSimd128Register(1)); |
| 2213 break; |
| 2214 } |
| 2215 case kMips64I16x8Splat: { |
| 2216 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2217 __ fill_h(i.OutputSimd128Register(), i.InputRegister(0)); |
| 2218 break; |
| 2219 } |
| 2220 case kMips64I16x8ExtractLane: { |
| 2221 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2222 __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0), |
| 2223 i.InputInt8(1)); |
| 2224 break; |
| 2225 } |
| 2226 case kMips64I16x8ReplaceLane: { |
| 2227 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2228 Simd128Register src = i.InputSimd128Register(0); |
| 2229 Simd128Register dst = i.OutputSimd128Register(); |
| 2230 if (!src.is(dst)) { |
| 2231 __ move_v(dst, src); |
| 2232 } |
| 2233 __ insert_h(dst, i.InputInt8(1), i.InputRegister(2)); |
| 2234 break; |
| 2235 } |
| 2236 case kMips64I16x8Neg: { |
| 2237 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2238 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); |
| 2239 __ subv_h(i.OutputSimd128Register(), kSimd128RegZero, |
| 2240 i.InputSimd128Register(0)); |
| 2241 break; |
| 2242 } |
| 2243 case kMips64I16x8Shl: { |
| 2244 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2245 __ slli_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2246 i.InputInt4(1)); |
| 2247 break; |
| 2248 } |
| 2249 case kMips64I16x8ShrS: { |
| 2250 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2251 __ srai_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2252 i.InputInt4(1)); |
| 2253 break; |
| 2254 } |
| 2255 case kMips64I16x8ShrU: { |
| 2256 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2257 __ srli_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2258 i.InputInt4(1)); |
| 2259 break; |
| 2260 } |
| 2261 case kMips64I16x8Add: { |
| 2262 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2263 __ addv_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2264 i.InputSimd128Register(1)); |
| 2265 break; |
| 2266 } |
| 2267 case kMips64I16x8AddSaturateS: { |
| 2268 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2269 __ adds_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2270 i.InputSimd128Register(1)); |
| 2271 break; |
| 2272 } |
| 2273 case kMips64I16x8Sub: { |
| 2274 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2275 __ subv_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2276 i.InputSimd128Register(1)); |
| 2277 break; |
| 2278 } |
| 2279 case kMips64I16x8SubSaturateS: { |
| 2280 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2281 __ subs_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2282 i.InputSimd128Register(1)); |
| 2283 break; |
| 2284 } |
2184 } | 2285 } |
2185 return kSuccess; | 2286 return kSuccess; |
2186 } // NOLINT(readability/fn_size) | 2287 } // NOLINT(readability/fn_size) |
2187 | 2288 |
2188 | 2289 |
2189 #define UNSUPPORTED_COND(opcode, condition) \ | 2290 #define UNSUPPORTED_COND(opcode, condition) \ |
2190 OFStream out(stdout); \ | 2291 OFStream out(stdout); \ |
2191 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ | 2292 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ |
2192 UNIMPLEMENTED(); | 2293 UNIMPLEMENTED(); |
2193 | 2294 |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2940 padding_size -= v8::internal::Assembler::kInstrSize; | 3041 padding_size -= v8::internal::Assembler::kInstrSize; |
2941 } | 3042 } |
2942 } | 3043 } |
2943 } | 3044 } |
2944 | 3045 |
2945 #undef __ | 3046 #undef __ |
2946 | 3047 |
2947 } // namespace compiler | 3048 } // namespace compiler |
2948 } // namespace internal | 3049 } // namespace internal |
2949 } // namespace v8 | 3050 } // namespace v8 |
OLD | NEW |