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

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

Issue 2780503002: MIPS[64]: Support for some SIMD operations (2) (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 1623 matching lines...) Expand 10 before | Expand all | Expand 10 after
1634 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1634 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1635 i.InputSimd128Register(1)); 1635 i.InputSimd128Register(1));
1636 break; 1636 break;
1637 } 1637 }
1638 case kMipsI32x4Sub: { 1638 case kMipsI32x4Sub: {
1639 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1639 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1640 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1640 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1641 i.InputSimd128Register(1)); 1641 i.InputSimd128Register(1));
1642 break; 1642 break;
1643 } 1643 }
1644 case kMipsF32x4Splat: {
1645 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1646 __ FmoveLow(kScratchReg, i.InputSingleRegister(0));
1647 __ fill_w(i.OutputSimd128Register(), kScratchReg);
1648 break;
1649 }
1650 case kMipsF32x4ExtractLane: {
1651 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1652 __ copy_u_w(kScratchReg, i.InputSimd128Register(0), i.InputInt8(1));
1653 __ FmoveLow(i.OutputSingleRegister(), kScratchReg);
1654 break;
1655 }
1656 case kMipsF32x4ReplaceLane: {
1657 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1658 Simd128Register src = i.InputSimd128Register(0);
1659 Simd128Register dst = i.OutputSimd128Register();
1660 if (!src.is(dst)) {
1661 __ move_v(dst, src);
1662 }
1663 __ FmoveLow(kScratchReg, i.InputSingleRegister(2));
1664 __ insert_w(dst, i.InputInt8(1), kScratchReg);
1665 break;
1666 }
1667 case kMipsF32x4SConvertI32x4: {
1668 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1669 __ ffint_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
1670 break;
1671 }
1672 case kMipsF32x4UConvertI32x4: {
1673 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1674 __ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
1675 break;
1676 }
1644 } 1677 }
1645 return kSuccess; 1678 return kSuccess;
1646 } // NOLINT(readability/fn_size) 1679 } // NOLINT(readability/fn_size)
1647 1680
1648 1681
1649 #define UNSUPPORTED_COND(opcode, condition) \ 1682 #define UNSUPPORTED_COND(opcode, condition) \
1650 OFStream out(stdout); \ 1683 OFStream out(stdout); \
1651 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1684 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1652 UNIMPLEMENTED(); 1685 UNIMPLEMENTED();
1653 1686
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2430 padding_size -= v8::internal::Assembler::kInstrSize; 2463 padding_size -= v8::internal::Assembler::kInstrSize;
2431 } 2464 }
2432 } 2465 }
2433 } 2466 }
2434 2467
2435 #undef __ 2468 #undef __
2436 2469
2437 } // namespace compiler 2470 } // namespace compiler
2438 } // namespace internal 2471 } // namespace internal
2439 } // namespace v8 2472 } // 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