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 | 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 1646 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1657 __ vcgt(NeonU32, i.OutputSimd128Register(), i.InputSimd128Register(0), | 1657 __ vcgt(NeonU32, i.OutputSimd128Register(), i.InputSimd128Register(0), |
1658 i.InputSimd128Register(1)); | 1658 i.InputSimd128Register(1)); |
1659 break; | 1659 break; |
1660 } | 1660 } |
1661 case kArmUint32x4GreaterThanOrEqual: { | 1661 case kArmUint32x4GreaterThanOrEqual: { |
1662 Simd128Register dst = i.OutputSimd128Register(); | 1662 Simd128Register dst = i.OutputSimd128Register(); |
1663 __ vcge(NeonU32, dst, i.InputSimd128Register(0), | 1663 __ vcge(NeonU32, dst, i.InputSimd128Register(0), |
1664 i.InputSimd128Register(1)); | 1664 i.InputSimd128Register(1)); |
1665 break; | 1665 break; |
1666 } | 1666 } |
1667 case kArmSimd32x4Select: { | |
1668 // Select is a ternary op, so we need to move one input into the | |
1669 // destination. Use vtst to canonicalize the 'boolean' input #0. | |
1670 __ vtst(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), | |
1671 i.InputSimd128Register(0)); | |
1672 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1), | |
1673 i.InputSimd128Register(2)); | |
1674 break; | |
1675 } | |
1676 case kArmInt16x8Splat: { | 1667 case kArmInt16x8Splat: { |
1677 __ vdup(Neon16, i.OutputSimd128Register(), i.InputRegister(0)); | 1668 __ vdup(Neon16, i.OutputSimd128Register(), i.InputRegister(0)); |
1678 break; | 1669 break; |
1679 } | 1670 } |
1680 case kArmInt16x8ExtractLane: { | 1671 case kArmInt16x8ExtractLane: { |
1681 __ ExtractLane(i.OutputRegister(), i.InputSimd128Register(0), NeonS16, | 1672 __ ExtractLane(i.OutputRegister(), i.InputSimd128Register(0), NeonS16, |
1682 i.InputInt8(1)); | 1673 i.InputInt8(1)); |
1683 break; | 1674 break; |
1684 } | 1675 } |
1685 case kArmInt16x8ReplaceLane: { | 1676 case kArmInt16x8ReplaceLane: { |
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1909 __ vcgt(NeonU8, i.OutputSimd128Register(), i.InputSimd128Register(0), | 1900 __ vcgt(NeonU8, i.OutputSimd128Register(), i.InputSimd128Register(0), |
1910 i.InputSimd128Register(1)); | 1901 i.InputSimd128Register(1)); |
1911 break; | 1902 break; |
1912 } | 1903 } |
1913 case kArmUint8x16GreaterThanOrEqual: { | 1904 case kArmUint8x16GreaterThanOrEqual: { |
1914 Simd128Register dst = i.OutputSimd128Register(); | 1905 Simd128Register dst = i.OutputSimd128Register(); |
1915 __ vcge(NeonU8, dst, i.InputSimd128Register(0), | 1906 __ vcge(NeonU8, dst, i.InputSimd128Register(0), |
1916 i.InputSimd128Register(1)); | 1907 i.InputSimd128Register(1)); |
1917 break; | 1908 break; |
1918 } | 1909 } |
| 1910 case kArmSimd128And: { |
| 1911 __ vand(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1912 i.InputSimd128Register(1)); |
| 1913 break; |
| 1914 } |
| 1915 case kArmSimd128Or: { |
| 1916 __ vorr(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1917 i.InputSimd128Register(1)); |
| 1918 break; |
| 1919 } |
| 1920 case kArmSimd128Xor: { |
| 1921 __ veor(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1922 i.InputSimd128Register(1)); |
| 1923 break; |
| 1924 } |
| 1925 case kArmSimd128Not: { |
| 1926 __ vmvn(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
| 1927 break; |
| 1928 } |
| 1929 case kArmSimd32x4Select: { |
| 1930 // Canonicalize input 0 lanes to all 0's or all 1's and move to dest. |
| 1931 __ vtst(Neon32, i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1932 i.InputSimd128Register(0)); |
| 1933 __ vbsl(i.OutputSimd128Register(), i.InputSimd128Register(1), |
| 1934 i.InputSimd128Register(2)); |
| 1935 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 } |
1919 case kCheckedLoadInt8: | 1953 case kCheckedLoadInt8: |
1920 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb); | 1954 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsb); |
1921 break; | 1955 break; |
1922 case kCheckedLoadUint8: | 1956 case kCheckedLoadUint8: |
1923 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb); | 1957 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrb); |
1924 break; | 1958 break; |
1925 case kCheckedLoadInt16: | 1959 case kCheckedLoadInt16: |
1926 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh); | 1960 ASSEMBLE_CHECKED_LOAD_INTEGER(ldrsh); |
1927 break; | 1961 break; |
1928 case kCheckedLoadUint16: | 1962 case kCheckedLoadUint16: |
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2579 padding_size -= v8::internal::Assembler::kInstrSize; | 2613 padding_size -= v8::internal::Assembler::kInstrSize; |
2580 } | 2614 } |
2581 } | 2615 } |
2582 } | 2616 } |
2583 | 2617 |
2584 #undef __ | 2618 #undef __ |
2585 | 2619 |
2586 } // namespace compiler | 2620 } // namespace compiler |
2587 } // namespace internal | 2621 } // namespace internal |
2588 } // namespace v8 | 2622 } // namespace v8 |
OLD | NEW |