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

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

Issue 2638133002: [Turbofan] Add other integer SIMD types, add more integer ops. (Closed)
Patch Set: Fix name of static fields. Created 3 years, 11 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 | « no previous file | src/compiler/arm/instruction-codes-arm.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 6
7 #include "src/arm/macro-assembler-arm.h" 7 #include "src/arm/macro-assembler-arm.h"
8 #include "src/compilation-info.h" 8 #include "src/compilation-info.h"
9 #include "src/compiler/code-generator-impl.h" 9 #include "src/compiler/code-generator-impl.h"
10 #include "src/compiler/gap-resolver.h" 10 #include "src/compiler/gap-resolver.h"
(...skipping 1560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1571 break; 1571 break;
1572 } 1572 }
1573 case kArmInt32x4FromFloat32x4: { 1573 case kArmInt32x4FromFloat32x4: {
1574 __ vcvt_s32_f32(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1574 __ vcvt_s32_f32(i.OutputSimd128Register(), i.InputSimd128Register(0));
1575 break; 1575 break;
1576 } 1576 }
1577 case kArmUint32x4FromFloat32x4: { 1577 case kArmUint32x4FromFloat32x4: {
1578 __ vcvt_u32_f32(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1578 __ vcvt_u32_f32(i.OutputSimd128Register(), i.InputSimd128Register(0));
1579 break; 1579 break;
1580 } 1580 }
1581 case kArmInt32x4Neg: {
1582 __ vneg(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0));
1583 break;
1584 }
1581 case kArmInt32x4Add: { 1585 case kArmInt32x4Add: {
1582 __ vadd(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1586 __ vadd(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1583 i.InputSimd128Register(1)); 1587 i.InputSimd128Register(1));
1584 break; 1588 break;
1585 } 1589 }
1586 case kArmInt32x4Sub: { 1590 case kArmInt32x4Sub: {
1587 __ vsub(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1591 __ vsub(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1588 i.InputSimd128Register(1)); 1592 i.InputSimd128Register(1));
1589 break; 1593 break;
1590 } 1594 }
1595 case kArmInt32x4Mul: {
1596 __ vmul(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1597 i.InputSimd128Register(1));
1598 break;
1599 }
1600 case kArmInt32x4Min: {
1601 __ vmin(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1602 i.InputSimd128Register(1));
1603 break;
1604 }
1605 case kArmInt32x4Max: {
1606 __ vmax(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1607 i.InputSimd128Register(1));
1608 break;
1609 }
1591 case kArmInt32x4Eq: { 1610 case kArmInt32x4Eq: {
1592 __ vceq(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1611 __ vceq(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1593 i.InputSimd128Register(1)); 1612 i.InputSimd128Register(1));
1594 break; 1613 break;
1595 } 1614 }
1596 case kArmInt32x4Ne: { 1615 case kArmInt32x4Ne: {
1597 Simd128Register dst = i.OutputSimd128Register(); 1616 Simd128Register dst = i.OutputSimd128Register();
1598 __ vceq(Neon32, dst, i.InputSimd128Register(0), 1617 __ vceq(Neon32, dst, i.InputSimd128Register(0),
1599 i.InputSimd128Register(1)); 1618 i.InputSimd128Register(1));
1600 __ vmvn(dst, dst); 1619 __ vmvn(dst, dst);
1601 break; 1620 break;
1602 } 1621 }
1622 case kArmInt32x4Gt: {
1623 __ vcgt(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1624 i.InputSimd128Register(1));
1625 break;
1626 }
1627 case kArmInt32x4Ge: {
1628 Simd128Register dst = i.OutputSimd128Register();
1629 __ vcge(NeonS32, dst, i.InputSimd128Register(0),
1630 i.InputSimd128Register(1));
1631 break;
1632 }
1633 case kArmUint32x4Gt: {
1634 __ vcgt(NeonU32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1635 i.InputSimd128Register(1));
1636 break;
1637 }
1638 case kArmUint32x4Ge: {
1639 Simd128Register dst = i.OutputSimd128Register();
1640 __ vcge(NeonU32, dst, i.InputSimd128Register(0),
1641 i.InputSimd128Register(1));
1642 break;
1643 }
1603 case kArmSimd32x4Select: { 1644 case kArmSimd32x4Select: {
1604 // Select is a ternary op, so we need to move one input into the 1645 // Select is a ternary op, so we need to move one input into the
1605 // destination. Use vtst to canonicalize the 'boolean' input #0. 1646 // destination. Use vtst to canonicalize the 'boolean' input #0.
1606 __ vtst(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1647 __ vtst(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1607 i.InputSimd128Register(0)); 1648 i.InputSimd128Register(0));
1608 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1), 1649 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1),
1609 i.InputSimd128Register(2)); 1650 i.InputSimd128Register(2));
1610 break; 1651 break;
1611 } 1652 }
1653 case kArmInt16x8Splat: {
1654 __ vdup(Neon16, i.OutputSimd128Register(), i.InputRegister(0));
1655 break;
1656 }
1657 case kArmInt16x8ExtractLane: {
1658 __ ExtractLane(i.OutputRegister(), i.InputSimd128Register(0), NeonS16,
1659 i.InputInt8(1));
1660 break;
1661 }
1662 case kArmInt16x8ReplaceLane: {
1663 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0),
1664 i.InputRegister(2), NeonS16, i.InputInt8(1));
1665 break;
1666 }
1667 case kArmInt16x8Neg: {
1668 __ vneg(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0));
1669 break;
1670 }
1671 case kArmInt16x8Add: {
1672 __ vadd(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1673 i.InputSimd128Register(1));
1674 break;
1675 }
1676 case kArmInt16x8Sub: {
1677 __ vsub(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1678 i.InputSimd128Register(1));
1679 break;
1680 }
1681 case kArmInt16x8Mul: {
1682 __ vmul(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1683 i.InputSimd128Register(1));
1684 break;
1685 }
1686 case kArmInt16x8Min: {
1687 __ vmin(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1688 i.InputSimd128Register(1));
1689 break;
1690 }
1691 case kArmInt16x8Max: {
1692 __ vmax(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1693 i.InputSimd128Register(1));
1694 break;
1695 }
1696 case kArmInt16x8Eq: {
1697 __ vceq(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1698 i.InputSimd128Register(1));
1699 break;
1700 }
1701 case kArmInt16x8Ne: {
1702 Simd128Register dst = i.OutputSimd128Register();
1703 __ vceq(Neon16, dst, i.InputSimd128Register(0),
1704 i.InputSimd128Register(1));
1705 __ vmvn(dst, dst);
1706 break;
1707 }
1708 case kArmInt16x8Gt: {
1709 __ vcgt(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1710 i.InputSimd128Register(1));
1711 break;
1712 }
1713 case kArmInt16x8Ge: {
1714 Simd128Register dst = i.OutputSimd128Register();
1715 __ vcge(NeonS16, dst, i.InputSimd128Register(0),
1716 i.InputSimd128Register(1));
1717 break;
1718 }
1719 case kArmUint16x8Gt: {
1720 __ vcgt(NeonU16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1721 i.InputSimd128Register(1));
1722 break;
1723 }
1724 case kArmUint16x8Ge: {
1725 Simd128Register dst = i.OutputSimd128Register();
1726 __ vcge(NeonU16, dst, i.InputSimd128Register(0),
1727 i.InputSimd128Register(1));
1728 break;
1729 }
1730 case kArmInt8x16Splat: {
1731 __ vdup(Neon8, i.OutputSimd128Register(), i.InputRegister(0));
1732 break;
1733 }
1734 case kArmInt8x16ExtractLane: {
1735 __ ExtractLane(i.OutputRegister(), i.InputSimd128Register(0), NeonS8,
1736 i.InputInt8(1));
1737 break;
1738 }
1739 case kArmInt8x16ReplaceLane: {
1740 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0),
1741 i.InputRegister(2), NeonS8, i.InputInt8(1));
1742 break;
1743 }
1744 case kArmInt8x16Neg: {
1745 __ vneg(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0));
1746 break;
1747 }
1748 case kArmInt8x16Add: {
1749 __ vadd(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1750 i.InputSimd128Register(1));
1751 break;
1752 }
1753 case kArmInt8x16Sub: {
1754 __ vsub(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1755 i.InputSimd128Register(1));
1756 break;
1757 }
1758 case kArmInt8x16Mul: {
1759 __ vmul(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1760 i.InputSimd128Register(1));
1761 break;
1762 }
1763 case kArmInt8x16Min: {
1764 __ vmin(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1765 i.InputSimd128Register(1));
1766 break;
1767 }
1768 case kArmInt8x16Max: {
1769 __ vmax(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1770 i.InputSimd128Register(1));
1771 break;
1772 }
1773 case kArmInt8x16Eq: {
1774 __ vceq(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1775 i.InputSimd128Register(1));
1776 break;
1777 }
1778 case kArmInt8x16Ne: {
1779 Simd128Register dst = i.OutputSimd128Register();
1780 __ vceq(Neon8, dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
1781 __ vmvn(dst, dst);
1782 break;
1783 }
1784 case kArmInt8x16Gt: {
1785 __ vcgt(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1786 i.InputSimd128Register(1));
1787 break;
1788 }
1789 case kArmInt8x16Ge: {
1790 Simd128Register dst = i.OutputSimd128Register();
1791 __ vcge(NeonS8, dst, i.InputSimd128Register(0),
1792 i.InputSimd128Register(1));
1793 break;
1794 }
1795 case kArmUint8x16Gt: {
1796 __ vcgt(NeonU8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1797 i.InputSimd128Register(1));
1798 break;
1799 }
1800 case kArmUint8x16Ge: {
1801 Simd128Register dst = i.OutputSimd128Register();
1802 __ vcge(NeonU8, dst, i.InputSimd128Register(0),
1803 i.InputSimd128Register(1));
1804 break;
1805 }
1612 case kCheckedLoadInt8: 1806 case kCheckedLoadInt8:
1613 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb); 1807 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb);
1614 break; 1808 break;
1615 case kCheckedLoadUint8: 1809 case kCheckedLoadUint8:
1616 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb); 1810 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb);
1617 break; 1811 break;
1618 case kCheckedLoadInt16: 1812 case kCheckedLoadInt16:
1619 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh); 1813 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh);
1620 break; 1814 break;
1621 case kCheckedLoadUint16: 1815 case kCheckedLoadUint16:
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 padding_size -= v8::internal::Assembler::kInstrSize; 2461 padding_size -= v8::internal::Assembler::kInstrSize;
2268 } 2462 }
2269 } 2463 }
2270 } 2464 }
2271 2465
2272 #undef __ 2466 #undef __
2273 2467
2274 } // namespace compiler 2468 } // namespace compiler
2275 } // namespace internal 2469 } // namespace internal
2276 } // namespace v8 2470 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/compiler/arm/instruction-codes-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698