| OLD | NEW |
| 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 Loading... |
| 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 kMipsI32x4Mul: { |
| 1645 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1646 __ mulv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1647 i.InputSimd128Register(1)); |
| 1648 break; |
| 1649 } |
| 1650 case kMipsI32x4MaxS: { |
| 1651 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1652 __ max_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1653 i.InputSimd128Register(1)); |
| 1654 break; |
| 1655 } |
| 1656 case kMipsI32x4MinS: { |
| 1657 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1658 __ min_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1659 i.InputSimd128Register(1)); |
| 1660 break; |
| 1661 } |
| 1662 case kMipsI32x4Eq: { |
| 1663 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1664 __ ceq_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1665 i.InputSimd128Register(1)); |
| 1666 break; |
| 1667 } |
| 1668 case kMipsI32x4Ne: { |
| 1669 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1670 Simd128Register dst = i.OutputSimd128Register(); |
| 1671 __ ceq_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); |
| 1672 __ nor_v(dst, dst, dst); |
| 1673 break; |
| 1674 } |
| 1675 case kMipsI32x4Shl: { |
| 1676 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1677 __ slli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1678 i.InputInt5(1)); |
| 1679 break; |
| 1680 } |
| 1681 case kMipsI32x4ShrS: { |
| 1682 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1683 __ srai_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1684 i.InputInt5(1)); |
| 1685 break; |
| 1686 } |
| 1687 case kMipsI32x4ShrU: { |
| 1688 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1689 __ srli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1690 i.InputInt5(1)); |
| 1691 break; |
| 1692 } |
| 1693 case kMipsI32x4MaxU: { |
| 1694 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1695 __ max_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1696 i.InputSimd128Register(1)); |
| 1697 break; |
| 1698 } |
| 1699 case kMipsI32x4MinU: { |
| 1700 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1701 __ min_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1702 i.InputSimd128Register(1)); |
| 1703 break; |
| 1704 } |
| 1705 case kMipsS32x4Select: { |
| 1706 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1707 DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0))); |
| 1708 __ bsel_v(i.OutputSimd128Register(), i.InputSimd128Register(2), |
| 1709 i.InputSimd128Register(1)); |
| 1710 break; |
| 1711 } |
| 1644 } | 1712 } |
| 1645 return kSuccess; | 1713 return kSuccess; |
| 1646 } // NOLINT(readability/fn_size) | 1714 } // NOLINT(readability/fn_size) |
| 1647 | 1715 |
| 1648 | 1716 |
| 1649 #define UNSUPPORTED_COND(opcode, condition) \ | 1717 #define UNSUPPORTED_COND(opcode, condition) \ |
| 1650 OFStream out(stdout); \ | 1718 OFStream out(stdout); \ |
| 1651 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ | 1719 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ |
| 1652 UNIMPLEMENTED(); | 1720 UNIMPLEMENTED(); |
| 1653 | 1721 |
| (...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2430 padding_size -= v8::internal::Assembler::kInstrSize; | 2498 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2431 } | 2499 } |
| 2432 } | 2500 } |
| 2433 } | 2501 } |
| 2434 | 2502 |
| 2435 #undef __ | 2503 #undef __ |
| 2436 | 2504 |
| 2437 } // namespace compiler | 2505 } // namespace compiler |
| 2438 } // namespace internal | 2506 } // namespace internal |
| 2439 } // namespace v8 | 2507 } // namespace v8 |
| OLD | NEW |