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

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

Issue 2801683003: MIPS[64]: Support for some SIMD operations (8) (Closed)
Patch Set: Rebase Created 3 years, 6 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 2528 matching lines...) Expand 10 before | Expand all | Expand 10 after
2539 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), 2539 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2540 i.InputSimd128Register(1)); 2540 i.InputSimd128Register(1));
2541 break; 2541 break;
2542 } 2542 }
2543 case kMips64S128Not: { 2543 case kMips64S128Not: {
2544 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2544 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2545 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), 2545 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2546 i.InputSimd128Register(0)); 2546 i.InputSimd128Register(0));
2547 break; 2547 break;
2548 } 2548 }
2549 case kMips64S1x4AnyTrue:
2550 case kMips64S1x8AnyTrue:
2551 case kMips64S1x16AnyTrue: {
2552 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2553 Register dst = i.OutputRegister();
2554 Label all_false;
2555 __ BranchMSA(&all_false, MSA_BRANCH_V, all_zero,
2556 i.InputSimd128Register(0), USE_DELAY_SLOT);
2557 __ li(dst, 0); // branch delay slot
2558 __ li(dst, -1);
2559 __ bind(&all_false);
2560 break;
2561 }
2562 case kMips64S1x4AllTrue: {
2563 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2564 Register dst = i.OutputRegister();
2565 Label all_true;
2566 __ BranchMSA(&all_true, MSA_BRANCH_W, all_not_zero,
2567 i.InputSimd128Register(0), USE_DELAY_SLOT);
2568 __ li(dst, -1); // branch delay slot
2569 __ li(dst, 0);
2570 __ bind(&all_true);
2571 break;
2572 }
2573 case kMips64S1x8AllTrue: {
2574 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2575 Register dst = i.OutputRegister();
2576 Label all_true;
2577 __ BranchMSA(&all_true, MSA_BRANCH_H, all_not_zero,
2578 i.InputSimd128Register(0), USE_DELAY_SLOT);
2579 __ li(dst, -1); // branch delay slot
2580 __ li(dst, 0);
2581 __ bind(&all_true);
2582 break;
2583 }
2584 case kMips64S1x16AllTrue: {
2585 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2586 Register dst = i.OutputRegister();
2587 Label all_true;
2588 __ BranchMSA(&all_true, MSA_BRANCH_B, all_not_zero,
2589 i.InputSimd128Register(0), USE_DELAY_SLOT);
2590 __ li(dst, -1); // branch delay slot
2591 __ li(dst, 0);
2592 __ bind(&all_true);
2593 break;
2594 }
2595 case kMips64MsaLd: {
2596 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2597 __ ld_b(i.OutputSimd128Register(), i.MemoryOperand());
2598 break;
2599 }
2600 case kMips64MsaSt: {
2601 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2602 __ st_b(i.InputSimd128Register(2), i.MemoryOperand());
2603 break;
2604 }
2549 } 2605 }
2550 return kSuccess; 2606 return kSuccess;
2551 } // NOLINT(readability/fn_size) 2607 } // NOLINT(readability/fn_size)
2552 2608
2553 2609
2554 #define UNSUPPORTED_COND(opcode, condition) \ 2610 #define UNSUPPORTED_COND(opcode, condition) \
2555 OFStream out(stdout); \ 2611 OFStream out(stdout); \
2556 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 2612 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
2557 UNIMPLEMENTED(); 2613 UNIMPLEMENTED();
2558 2614
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after
3305 padding_size -= v8::internal::Assembler::kInstrSize; 3361 padding_size -= v8::internal::Assembler::kInstrSize;
3306 } 3362 }
3307 } 3363 }
3308 } 3364 }
3309 3365
3310 #undef __ 3366 #undef __
3311 3367
3312 } // namespace compiler 3368 } // namespace compiler
3313 } // namespace internal 3369 } // namespace internal
3314 } // namespace v8 3370 } // 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