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

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

Issue 2701003003: [V8] Implement remaining SIMD operations on ARM. (Closed)
Patch Set: Created 3 years, 10 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/arm64/assembler-arm64.h ('k') | 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 1597 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 case kArmInt32x4Min: { 1608 case kArmInt32x4Min: {
1609 __ vmin(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1609 __ vmin(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1610 i.InputSimd128Register(1)); 1610 i.InputSimd128Register(1));
1611 break; 1611 break;
1612 } 1612 }
1613 case kArmInt32x4Max: { 1613 case kArmInt32x4Max: {
1614 __ vmax(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1614 __ vmax(NeonS32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1615 i.InputSimd128Register(1)); 1615 i.InputSimd128Register(1));
1616 break; 1616 break;
1617 } 1617 }
1618 case kArmSimd1x4AnyTrue: {
1619 break;
1620 }
1621 case kArmSimd1x4AllTrue: {
1622 break;
1623 }
1618 case kArmInt32x4Equal: { 1624 case kArmInt32x4Equal: {
1619 __ vceq(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1625 __ vceq(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0),
1620 i.InputSimd128Register(1)); 1626 i.InputSimd128Register(1));
1621 break; 1627 break;
1622 } 1628 }
1623 case kArmInt32x4NotEqual: { 1629 case kArmInt32x4NotEqual: {
1624 Simd128Register dst = i.OutputSimd128Register(); 1630 Simd128Register dst = i.OutputSimd128Register();
1625 __ vceq(Neon32, dst, i.InputSimd128Register(0), 1631 __ vceq(Neon32, dst, i.InputSimd128Register(0),
1626 i.InputSimd128Register(1)); 1632 i.InputSimd128Register(1));
1627 __ vmvn(dst, dst); 1633 __ vmvn(dst, dst);
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 } 1681 }
1676 case kArmInt16x8ReplaceLane: { 1682 case kArmInt16x8ReplaceLane: {
1677 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0), 1683 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0),
1678 i.InputRegister(2), NeonS16, i.InputInt8(1)); 1684 i.InputRegister(2), NeonS16, i.InputInt8(1));
1679 break; 1685 break;
1680 } 1686 }
1681 case kArmInt16x8Neg: { 1687 case kArmInt16x8Neg: {
1682 __ vneg(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0)); 1688 __ vneg(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0));
1683 break; 1689 break;
1684 } 1690 }
1691 case kArmSimd1x8AnyTrue: {
1692 break;
1693 }
1694 case kArmSimd1x8AllTrue: {
1695 break;
1696 }
1685 case kArmInt16x8ShiftLeftByScalar: { 1697 case kArmInt16x8ShiftLeftByScalar: {
1686 __ vshl(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0), 1698 __ vshl(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1687 i.InputInt4(1)); 1699 i.InputInt4(1));
1688 break; 1700 break;
1689 } 1701 }
1690 case kArmInt16x8ShiftRightByScalar: { 1702 case kArmInt16x8ShiftRightByScalar: {
1691 __ vshr(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0), 1703 __ vshr(NeonS16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1692 i.InputInt4(1)); 1704 i.InputInt4(1));
1693 break; 1705 break;
1694 } 1706 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1797 } 1809 }
1798 case kArmInt8x16ReplaceLane: { 1810 case kArmInt8x16ReplaceLane: {
1799 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0), 1811 __ ReplaceLane(i.OutputSimd128Register(), i.InputSimd128Register(0),
1800 i.InputRegister(2), NeonS8, i.InputInt8(1)); 1812 i.InputRegister(2), NeonS8, i.InputInt8(1));
1801 break; 1813 break;
1802 } 1814 }
1803 case kArmInt8x16Neg: { 1815 case kArmInt8x16Neg: {
1804 __ vneg(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0)); 1816 __ vneg(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0));
1805 break; 1817 break;
1806 } 1818 }
1819 case kArmSimd1x16AnyTrue: {
1820 break;
1821 }
1822 case kArmSimd1x16AllTrue: {
1823 break;
1824 }
1807 case kArmInt8x16ShiftLeftByScalar: { 1825 case kArmInt8x16ShiftLeftByScalar: {
1808 __ vshl(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0), 1826 __ vshl(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1809 i.InputInt3(1)); 1827 i.InputInt3(1));
1810 break; 1828 break;
1811 } 1829 }
1812 case kArmInt8x16ShiftRightByScalar: { 1830 case kArmInt8x16ShiftRightByScalar: {
1813 __ vshr(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0), 1831 __ vshr(NeonS8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1814 i.InputInt3(1)); 1832 i.InputInt3(1));
1815 break; 1833 break;
1816 } 1834 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
1919 } 1937 }
1920 case kArmSimd128Xor: { 1938 case kArmSimd128Xor: {
1921 __ veor(i.OutputSimd128Register(), i.InputSimd128Register(0), 1939 __ veor(i.OutputSimd128Register(), i.InputSimd128Register(0),
1922 i.InputSimd128Register(1)); 1940 i.InputSimd128Register(1));
1923 break; 1941 break;
1924 } 1942 }
1925 case kArmSimd128Not: { 1943 case kArmSimd128Not: {
1926 __ vmvn(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1944 __ vmvn(i.OutputSimd128Register(), i.InputSimd128Register(0));
1927 break; 1945 break;
1928 } 1946 }
1929 case kArmSimd32x4Select: { 1947 case kArmSimd128Select: {
1930 // Canonicalize input 0 lanes to all 0's or all 1's and move to dest. 1948 // vbsl clobbers the mask input so make sure it was DefineSameAsFirst.
1931 __ vtst(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), 1949 DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0)));
1932 i.InputSimd128Register(0));
1933 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1), 1950 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1),
1934 i.InputSimd128Register(2)); 1951 i.InputSimd128Register(2));
1935 break; 1952 break;
1936 }
1937 case kArmSimd16x8Select: {
1938 // Canonicalize input 0 lanes to all 0's or all 1's and move to dest.
1939 __ vtst(Neon16, i.OutputSimd128Register(), i.InputSimd128Register(0),
1940 i.InputSimd128Register(0));
1941 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1),
1942 i.InputSimd128Register(2));
1943 break;
1944 }
1945 case kArmSimd8x16Select: {
1946 // Canonicalize input 0 lanes to all 0's or all 1's and move to dest.
1947 __ vtst(Neon8, i.OutputSimd128Register(), i.InputSimd128Register(0),
1948 i.InputSimd128Register(0));
1949 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1),
1950 i.InputSimd128Register(2));
1951 break;
1952 } 1953 }
1953 case kCheckedLoadInt8: 1954 case kCheckedLoadInt8:
1954 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb); 1955 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb);
1955 break; 1956 break;
1956 case kCheckedLoadUint8: 1957 case kCheckedLoadUint8:
1957 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb); 1958 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb);
1958 break; 1959 break;
1959 case kCheckedLoadInt16: 1960 case kCheckedLoadInt16:
1960 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh); 1961 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh);
1961 break; 1962 break;
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
2613 padding_size -= v8::internal::Assembler::kInstrSize; 2614 padding_size -= v8::internal::Assembler::kInstrSize;
2614 } 2615 }
2615 } 2616 }
2616 } 2617 }
2617 2618
2618 #undef __ 2619 #undef __
2619 2620
2620 } // namespace compiler 2621 } // namespace compiler
2621 } // namespace internal 2622 } // namespace internal
2622 } // namespace v8 2623 } // namespace v8
OLDNEW
« no previous file with comments | « src/arm64/assembler-arm64.h ('k') | src/compiler/arm/instruction-codes-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698