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

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

Issue 2780713003: MIPS[64]: Support for some SIMD operations (3) (Closed)
Patch Set: rebased Created 3 years, 8 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
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1656 matching lines...) Expand 10 before | Expand all | Expand 10 after
1667 case kMipsF32x4SConvertI32x4: { 1667 case kMipsF32x4SConvertI32x4: {
1668 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1668 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1669 __ ffint_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1669 __ ffint_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
1670 break; 1670 break;
1671 } 1671 }
1672 case kMipsF32x4UConvertI32x4: { 1672 case kMipsF32x4UConvertI32x4: {
1673 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1673 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1674 __ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1674 __ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
1675 break; 1675 break;
1676 } 1676 }
1677 case kMipsI32x4Mul: {
1678 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1679 __ mulv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1680 i.InputSimd128Register(1));
1681 break;
1682 }
1683 case kMipsI32x4MaxS: {
1684 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1685 __ max_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1686 i.InputSimd128Register(1));
1687 break;
1688 }
1689 case kMipsI32x4MinS: {
1690 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1691 __ min_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1692 i.InputSimd128Register(1));
1693 break;
1694 }
1695 case kMipsI32x4Eq: {
1696 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1697 __ ceq_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1698 i.InputSimd128Register(1));
1699 break;
1700 }
1701 case kMipsI32x4Ne: {
1702 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1703 Simd128Register dst = i.OutputSimd128Register();
1704 __ ceq_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
1705 __ nor_v(dst, dst, dst);
1706 break;
1707 }
1708 case kMipsI32x4Shl: {
1709 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1710 __ slli_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1711 i.InputInt5(1));
1712 break;
1713 }
1714 case kMipsI32x4ShrS: {
1715 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1716 __ srai_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1717 i.InputInt5(1));
1718 break;
1719 }
1720 case kMipsI32x4ShrU: {
1721 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1722 __ srli_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1723 i.InputInt5(1));
1724 break;
1725 }
1726 case kMipsI32x4MaxU: {
1727 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1728 __ max_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1729 i.InputSimd128Register(1));
1730 break;
1731 }
1732 case kMipsI32x4MinU: {
1733 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1734 __ min_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1735 i.InputSimd128Register(1));
1736 break;
1737 }
1738 case kMipsS32x4Select: {
1739 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1740 DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0)));
1741 __ bsel_v(i.OutputSimd128Register(), i.InputSimd128Register(2),
1742 i.InputSimd128Register(1));
1743 break;
1744 }
1677 } 1745 }
1678 return kSuccess; 1746 return kSuccess;
1679 } // NOLINT(readability/fn_size) 1747 } // NOLINT(readability/fn_size)
1680 1748
1681 1749
1682 #define UNSUPPORTED_COND(opcode, condition) \ 1750 #define UNSUPPORTED_COND(opcode, condition) \
1683 OFStream out(stdout); \ 1751 OFStream out(stdout); \
1684 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1752 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1685 UNIMPLEMENTED(); 1753 UNIMPLEMENTED();
1686 1754
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2463 padding_size -= v8::internal::Assembler::kInstrSize; 2531 padding_size -= v8::internal::Assembler::kInstrSize;
2464 } 2532 }
2465 } 2533 }
2466 } 2534 }
2467 2535
2468 #undef __ 2536 #undef __
2469 2537
2470 } // namespace compiler 2538 } // namespace compiler
2471 } // namespace internal 2539 } // namespace internal
2472 } // namespace v8 2540 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698