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

Side by Side Diff: src/compiler/mips64/code-generator-mips64.cc

Issue 2798853003: MIPS[64]: Support for some SIMD operations (7) (Closed)
Patch Set: Rebase, change Lt/Le with Gt/Ge Created 3 years, 7 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 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 2395 matching lines...) Expand 10 before | Expand all | Expand 10 after
2406 __ slli_b(i.OutputSimd128Register(), i.InputSimd128Register(0), 2406 __ slli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2407 i.InputInt3(1)); 2407 i.InputInt3(1));
2408 break; 2408 break;
2409 } 2409 }
2410 case kMips64I8x16ShrS: { 2410 case kMips64I8x16ShrS: {
2411 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2411 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2412 __ srai_b(i.OutputSimd128Register(), i.InputSimd128Register(0), 2412 __ srai_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2413 i.InputInt3(1)); 2413 i.InputInt3(1));
2414 break; 2414 break;
2415 } 2415 }
2416 case kMips64I8x16Add: {
2417 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2418 __ addv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2419 i.InputSimd128Register(1));
2420 break;
2421 }
2422 case kMips64I8x16AddSaturateS: {
2423 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2424 __ adds_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2425 i.InputSimd128Register(1));
2426 break;
2427 }
2428 case kMips64I8x16Sub: {
2429 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2430 __ subv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2431 i.InputSimd128Register(1));
2432 break;
2433 }
2434 case kMips64I8x16SubSaturateS: {
2435 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2436 __ subs_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2437 i.InputSimd128Register(1));
2438 break;
2439 }
2440 case kMips64I8x16Mul: {
2441 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2442 __ mulv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2443 i.InputSimd128Register(1));
2444 break;
2445 }
2446 case kMips64I8x16MaxS: {
2447 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2448 __ max_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2449 i.InputSimd128Register(1));
2450 break;
2451 }
2452 case kMips64I8x16MinS: {
2453 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2454 __ min_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2455 i.InputSimd128Register(1));
2456 break;
2457 }
2458 case kMips64I8x16Eq: {
2459 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2460 __ ceq_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2461 i.InputSimd128Register(1));
2462 break;
2463 }
2464 case kMips64I8x16Ne: {
2465 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2466 Simd128Register dst = i.OutputSimd128Register();
2467 __ ceq_b(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
2468 __ nor_v(dst, dst, dst);
2469 break;
2470 }
2471 case kMips64I8x16GtS: {
2472 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2473 __ clt_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2474 i.InputSimd128Register(0));
2475 break;
2476 }
2477 case kMips64I8x16GeS: {
2478 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2479 __ cle_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2480 i.InputSimd128Register(0));
2481 break;
2482 }
2483 case kMips64I8x16ShrU: {
2484 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2485 __ srli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2486 i.InputInt3(1));
2487 break;
2488 }
2489 case kMips64I8x16AddSaturateU: {
2490 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2491 __ adds_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2492 i.InputSimd128Register(1));
2493 break;
2494 }
2495 case kMips64I8x16SubSaturateU: {
2496 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2497 __ subs_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2498 i.InputSimd128Register(1));
2499 break;
2500 }
2501 case kMips64I8x16MaxU: {
2502 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2503 __ max_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2504 i.InputSimd128Register(1));
2505 break;
2506 }
2507 case kMips64I8x16MinU: {
2508 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2509 __ min_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2510 i.InputSimd128Register(1));
2511 break;
2512 }
2513 case kMips64I8x16GtU: {
2514 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2515 __ clt_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2516 i.InputSimd128Register(0));
2517 break;
2518 }
2519 case kMips64I8x16GeU: {
2520 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2521 __ cle_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2522 i.InputSimd128Register(0));
2523 break;
2524 }
2525 case kMips64S128And: {
2526 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2527 __ and_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2528 i.InputSimd128Register(1));
2529 break;
2530 }
2531 case kMips64S128Or: {
2532 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2533 __ or_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2534 i.InputSimd128Register(1));
2535 break;
2536 }
2537 case kMips64S128Xor: {
2538 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2539 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2540 i.InputSimd128Register(1));
2541 break;
2542 }
2543 case kMips64S128Not: {
2544 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2545 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2546 i.InputSimd128Register(0));
2547 break;
2548 }
2416 } 2549 }
2417 return kSuccess; 2550 return kSuccess;
2418 } // NOLINT(readability/fn_size) 2551 } // NOLINT(readability/fn_size)
2419 2552
2420 2553
2421 #define UNSUPPORTED_COND(opcode, condition) \ 2554 #define UNSUPPORTED_COND(opcode, condition) \
2422 OFStream out(stdout); \ 2555 OFStream out(stdout); \
2423 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 2556 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
2424 UNIMPLEMENTED(); 2557 UNIMPLEMENTED();
2425 2558
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
3172 padding_size -= v8::internal::Assembler::kInstrSize; 3305 padding_size -= v8::internal::Assembler::kInstrSize;
3173 } 3306 }
3174 } 3307 }
3175 } 3308 }
3176 3309
3177 #undef __ 3310 #undef __
3178 3311
3179 } // namespace compiler 3312 } // namespace compiler
3180 } // namespace internal 3313 } // namespace internal
3181 } // namespace v8 3314 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698