OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/compilation-info.h" | 9 #include "src/compilation-info.h" |
10 #include "src/compiler/code-generator-impl.h" | 10 #include "src/compiler/code-generator-impl.h" |
(...skipping 2313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2324 case kX64I16x8MinU: { | 2324 case kX64I16x8MinU: { |
2325 CpuFeatureScope sse_scope(masm(), SSE4_1); | 2325 CpuFeatureScope sse_scope(masm(), SSE4_1); |
2326 __ pminuw(i.OutputSimd128Register(), i.InputSimd128Register(1)); | 2326 __ pminuw(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
2327 break; | 2327 break; |
2328 } | 2328 } |
2329 case kX64I16x8MaxU: { | 2329 case kX64I16x8MaxU: { |
2330 CpuFeatureScope sse_scope(masm(), SSE4_1); | 2330 CpuFeatureScope sse_scope(masm(), SSE4_1); |
2331 __ pmaxuw(i.OutputSimd128Register(), i.InputSimd128Register(1)); | 2331 __ pmaxuw(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
2332 break; | 2332 break; |
2333 } | 2333 } |
| 2334 case kX64I8x16Splat: { |
| 2335 CpuFeatureScope sse_scope(masm(), SSSE3); |
| 2336 XMMRegister dst = i.OutputSimd128Register(); |
| 2337 __ movd(dst, i.InputRegister(0)); |
| 2338 __ xorps(kScratchDoubleReg, kScratchDoubleReg); |
| 2339 __ pshufb(dst, kScratchDoubleReg); |
| 2340 break; |
| 2341 } |
| 2342 case kX64I8x16ExtractLane: { |
| 2343 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2344 Register dst = i.OutputRegister(); |
| 2345 __ pextrb(dst, i.InputSimd128Register(0), i.InputInt8(1)); |
| 2346 __ movsxbl(dst, dst); |
| 2347 break; |
| 2348 } |
| 2349 case kX64I8x16ReplaceLane: { |
| 2350 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2351 if (instr->InputAt(2)->IsRegister()) { |
| 2352 __ pinsrb(i.OutputSimd128Register(), i.InputRegister(2), |
| 2353 i.InputInt8(1)); |
| 2354 } else { |
| 2355 __ pinsrb(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); |
| 2356 } |
| 2357 break; |
| 2358 } |
| 2359 case kX64I8x16Add: { |
| 2360 __ paddb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2361 break; |
| 2362 } |
| 2363 case kX64I8x16AddSaturateS: { |
| 2364 __ paddsb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2365 break; |
| 2366 } |
| 2367 case kX64I8x16Sub: { |
| 2368 __ psubb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2369 break; |
| 2370 } |
| 2371 case kX64I8x16SubSaturateS: { |
| 2372 __ psubsb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2373 break; |
| 2374 } |
| 2375 case kX64I8x16MinS: { |
| 2376 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2377 __ pminsb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2378 break; |
| 2379 } |
| 2380 case kX64I8x16MaxS: { |
| 2381 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2382 __ pmaxsb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2383 break; |
| 2384 } |
| 2385 case kX64I8x16Eq: { |
| 2386 __ pcmpeqb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2387 break; |
| 2388 } |
| 2389 case kX64I8x16Ne: { |
| 2390 __ pcmpeqb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2391 __ pcmpeqb(kScratchDoubleReg, kScratchDoubleReg); |
| 2392 __ pxor(i.OutputSimd128Register(), kScratchDoubleReg); |
| 2393 break; |
| 2394 } |
| 2395 case kX64I8x16AddSaturateU: { |
| 2396 __ paddusb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2397 break; |
| 2398 } |
| 2399 case kX64I8x16SubSaturateU: { |
| 2400 __ psubusb(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2401 break; |
| 2402 } |
| 2403 case kX64I8x16MinU: { |
| 2404 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2405 __ pminub(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2406 break; |
| 2407 } |
| 2408 case kX64I8x16MaxU: { |
| 2409 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 2410 __ pmaxub(i.OutputSimd128Register(), i.InputSimd128Register(1)); |
| 2411 break; |
| 2412 } |
2334 case kX64S128Select: { | 2413 case kX64S128Select: { |
2335 // Mask used here is stored in dst. | 2414 // Mask used here is stored in dst. |
2336 XMMRegister dst = i.OutputSimd128Register(); | 2415 XMMRegister dst = i.OutputSimd128Register(); |
2337 __ movaps(kScratchDoubleReg, i.InputSimd128Register(1)); | 2416 __ movaps(kScratchDoubleReg, i.InputSimd128Register(1)); |
2338 __ xorps(kScratchDoubleReg, i.InputSimd128Register(2)); | 2417 __ xorps(kScratchDoubleReg, i.InputSimd128Register(2)); |
2339 __ andps(dst, kScratchDoubleReg); | 2418 __ andps(dst, kScratchDoubleReg); |
2340 __ xorps(dst, i.InputSimd128Register(2)); | 2419 __ xorps(dst, i.InputSimd128Register(2)); |
2341 break; | 2420 break; |
2342 } | 2421 } |
2343 case kCheckedLoadInt8: | 2422 case kCheckedLoadInt8: |
(...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3097 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 3176 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
3098 __ Nop(padding_size); | 3177 __ Nop(padding_size); |
3099 } | 3178 } |
3100 } | 3179 } |
3101 | 3180 |
3102 #undef __ | 3181 #undef __ |
3103 | 3182 |
3104 } // namespace compiler | 3183 } // namespace compiler |
3105 } // namespace internal | 3184 } // namespace internal |
3106 } // namespace v8 | 3185 } // namespace v8 |
OLD | NEW |