OLD | NEW |
---|---|
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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/compilation-info.h" | 7 #include "src/compilation-info.h" |
8 #include "src/compiler/code-generator-impl.h" | 8 #include "src/compiler/code-generator-impl.h" |
9 #include "src/compiler/gap-resolver.h" | 9 #include "src/compiler/gap-resolver.h" |
10 #include "src/compiler/node-matchers.h" | 10 #include "src/compiler/node-matchers.h" |
(...skipping 1882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1893 case kIA32I32x4Splat: { | 1893 case kIA32I32x4Splat: { |
1894 XMMRegister dst = i.OutputSimd128Register(); | 1894 XMMRegister dst = i.OutputSimd128Register(); |
1895 __ Movd(dst, i.InputOperand(0)); | 1895 __ Movd(dst, i.InputOperand(0)); |
1896 __ Pshufd(dst, dst, 0x0); | 1896 __ Pshufd(dst, dst, 0x0); |
1897 break; | 1897 break; |
1898 } | 1898 } |
1899 case kIA32I32x4ExtractLane: { | 1899 case kIA32I32x4ExtractLane: { |
1900 __ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1)); | 1900 __ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1)); |
1901 break; | 1901 break; |
1902 } | 1902 } |
1903 case kIA32I16x8Splat: { | |
bbudge
2017/06/13 22:08:21
Follow the order in wasm-opcodes.h.
| |
1904 XMMRegister dst = i.OutputSimd128Register(); | |
1905 __ Movd(dst, i.InputOperand(0)); | |
1906 __ Pshuflw(dst, dst, 0x0); | |
1907 __ Pshufd(dst, dst, 0x0); | |
1908 break; | |
1909 } | |
1910 case kIA32I16x8ExtractLane: { | |
1911 Register dst = i.OutputRegister(); | |
1912 __ Pextrw(dst, i.InputSimd128Register(0), i.InputInt8(1)); | |
1913 __ movsx_w(dst, dst); | |
1914 break; | |
1915 } | |
1916 case kIA32I8x16Splat: { | |
1917 XMMRegister dst = i.OutputSimd128Register(); | |
1918 __ Movd(dst, i.InputOperand(0)); | |
1919 __ Pxor(kScratchDoubleReg, kScratchDoubleReg); | |
1920 __ Pshufb(dst, kScratchDoubleReg); | |
1921 break; | |
1922 } | |
1923 case kIA32I8x16ExtractLane: { | |
1924 Register dst = i.OutputRegister(); | |
1925 __ Pextrb(dst, i.InputSimd128Register(0), i.InputInt8(1)); | |
1926 __ movsx_b(dst, dst); | |
1927 break; | |
1928 } | |
1903 case kSSEI32x4ReplaceLane: { | 1929 case kSSEI32x4ReplaceLane: { |
1904 CpuFeatureScope sse_scope(masm(), SSE4_1); | 1930 CpuFeatureScope sse_scope(masm(), SSE4_1); |
1905 __ pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); | 1931 __ pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); |
1906 break; | 1932 break; |
1907 } | 1933 } |
1908 case kSSEI32x4Add: { | 1934 case kSSEI32x4Add: { |
1909 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); | 1935 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); |
1910 break; | 1936 break; |
1911 } | 1937 } |
1912 case kSSEI32x4Sub: { | 1938 case kSSEI32x4Sub: { |
1913 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); | 1939 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); |
1914 break; | 1940 break; |
1915 } | 1941 } |
1942 case kSSEI16x8ReplaceLane: { | |
1943 __ pinsrw(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); | |
1944 break; | |
1945 } | |
1946 case kSSEI8x16ReplaceLane: { | |
1947 CpuFeatureScope sse_scope(masm(), SSE4_1); | |
1948 __ pinsrb(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); | |
1949 break; | |
1950 } | |
1916 case kAVXI32x4ReplaceLane: { | 1951 case kAVXI32x4ReplaceLane: { |
1917 CpuFeatureScope avx_scope(masm(), AVX); | 1952 CpuFeatureScope avx_scope(masm(), AVX); |
1918 __ vpinsrd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1953 __ vpinsrd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1919 i.InputOperand(2), i.InputInt8(1)); | 1954 i.InputOperand(2), i.InputInt8(1)); |
1920 break; | 1955 break; |
1921 } | 1956 } |
1922 case kAVXI32x4Add: { | 1957 case kAVXI32x4Add: { |
1923 CpuFeatureScope avx_scope(masm(), AVX); | 1958 CpuFeatureScope avx_scope(masm(), AVX); |
1924 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1959 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1925 i.InputOperand(1)); | 1960 i.InputOperand(1)); |
1926 break; | 1961 break; |
1927 } | 1962 } |
1928 case kAVXI32x4Sub: { | 1963 case kAVXI32x4Sub: { |
1929 CpuFeatureScope avx_scope(masm(), AVX); | 1964 CpuFeatureScope avx_scope(masm(), AVX); |
1930 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1965 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1931 i.InputOperand(1)); | 1966 i.InputOperand(1)); |
1932 break; | 1967 break; |
1933 } | 1968 } |
1969 case kAVXI16x8ReplaceLane: { | |
1970 CpuFeatureScope avx_scope(masm(), AVX); | |
1971 __ vpinsrw(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
1972 i.InputOperand(2), i.InputInt8(1)); | |
1973 break; | |
1974 } | |
1975 case kAVXI8x16ReplaceLane: { | |
1976 CpuFeatureScope avx_scope(masm(), AVX); | |
1977 __ vpinsrb(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
1978 i.InputOperand(2), i.InputInt8(1)); | |
1979 break; | |
1980 } | |
1934 case kCheckedLoadInt8: | 1981 case kCheckedLoadInt8: |
1935 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); | 1982 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); |
1936 break; | 1983 break; |
1937 case kCheckedLoadUint8: | 1984 case kCheckedLoadUint8: |
1938 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); | 1985 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); |
1939 break; | 1986 break; |
1940 case kCheckedLoadInt16: | 1987 case kCheckedLoadInt16: |
1941 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); | 1988 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); |
1942 break; | 1989 break; |
1943 case kCheckedLoadUint16: | 1990 case kCheckedLoadUint16: |
(...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2771 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2818 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2772 __ Nop(padding_size); | 2819 __ Nop(padding_size); |
2773 } | 2820 } |
2774 } | 2821 } |
2775 | 2822 |
2776 #undef __ | 2823 #undef __ |
2777 | 2824 |
2778 } // namespace compiler | 2825 } // namespace compiler |
2779 } // namespace internal | 2826 } // namespace internal |
2780 } // namespace v8 | 2827 } // namespace v8 |
OLD | NEW |