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

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

Issue 2753903004: MIPS[64]: Support for some SIMD operations (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 1584 matching lines...) Expand 10 before | Expand all | Expand 10 after
1595 case kAtomicExchangeInt16: 1595 case kAtomicExchangeInt16:
1596 case kAtomicExchangeUint16: 1596 case kAtomicExchangeUint16:
1597 case kAtomicExchangeWord32: 1597 case kAtomicExchangeWord32:
1598 case kAtomicCompareExchangeInt8: 1598 case kAtomicCompareExchangeInt8:
1599 case kAtomicCompareExchangeUint8: 1599 case kAtomicCompareExchangeUint8:
1600 case kAtomicCompareExchangeInt16: 1600 case kAtomicCompareExchangeInt16:
1601 case kAtomicCompareExchangeUint16: 1601 case kAtomicCompareExchangeUint16:
1602 case kAtomicCompareExchangeWord32: 1602 case kAtomicCompareExchangeWord32:
1603 UNREACHABLE(); 1603 UNREACHABLE();
1604 break; 1604 break;
1605 case kMipsS128Zero: {
1606 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1607 __ xor_v(i.OutputSimd128Register(), i.OutputSimd128Register(),
1608 i.OutputSimd128Register());
1609 break;
1610 }
1611 case kMipsI32x4Splat: {
1612 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1613 __ fill_w(i.OutputSimd128Register(), i.InputRegister(0));
1614 break;
1615 }
1616 case kMipsI32x4ExtractLane: {
1617 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1618 __ copy_s_w(i.OutputRegister(), i.InputSimd128Register(0),
1619 i.InputInt8(1));
1620 break;
1621 }
1622 case kMipsI32x4ReplaceLane: {
1623 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1624 Simd128Register src = i.InputSimd128Register(0);
1625 Simd128Register dst = i.OutputSimd128Register();
1626 if (!src.is(dst)) {
1627 __ move_v(dst, src);
1628 }
1629 __ insert_w(dst, i.InputInt8(1), i.InputRegister(2));
1630 break;
1631 }
1632 case kMipsI32x4Add: {
1633 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1634 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1635 i.InputSimd128Register(1));
1636 break;
1637 }
1638 case kMipsI32x4Sub: {
1639 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1640 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0),
1641 i.InputSimd128Register(1));
1642 break;
1643 }
1605 } 1644 }
1606 return kSuccess; 1645 return kSuccess;
1607 } // NOLINT(readability/fn_size) 1646 } // NOLINT(readability/fn_size)
1608 1647
1609 1648
1610 #define UNSUPPORTED_COND(opcode, condition) \ 1649 #define UNSUPPORTED_COND(opcode, condition) \
1611 OFStream out(stdout); \ 1650 OFStream out(stdout); \
1612 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 1651 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
1613 UNIMPLEMENTED(); 1652 UNIMPLEMENTED();
1614 1653
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2391 padding_size -= v8::internal::Assembler::kInstrSize; 2430 padding_size -= v8::internal::Assembler::kInstrSize;
2392 } 2431 }
2393 } 2432 }
2394 } 2433 }
2395 2434
2396 #undef __ 2435 #undef __
2397 2436
2398 } // namespace compiler 2437 } // namespace compiler
2399 } // namespace internal 2438 } // namespace internal
2400 } // namespace v8 2439 } // 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