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 1874 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1885 int const slot = MiscField::decode(instr->opcode()); | 1885 int const slot = MiscField::decode(instr->opcode()); |
1886 if (HasImmediateInput(instr, 0)) { | 1886 if (HasImmediateInput(instr, 0)) { |
1887 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); | 1887 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); |
1888 } else { | 1888 } else { |
1889 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); | 1889 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); |
1890 } | 1890 } |
1891 break; | 1891 break; |
1892 } | 1892 } |
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 kIA32I32x4ReplaceLane: { | 1903 case kSSEI32x4ReplaceLane: { |
1904 __ Pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); | 1904 CpuFeatureScope sse_scope(masm(), SSE4_1); |
| 1905 __ pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); |
1905 break; | 1906 break; |
1906 } | 1907 } |
1907 case kSSEI32x4Add: { | 1908 case kSSEI32x4Add: { |
1908 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); | 1909 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); |
1909 break; | 1910 break; |
1910 } | 1911 } |
1911 case kSSEI32x4Sub: { | 1912 case kSSEI32x4Sub: { |
1912 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); | 1913 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); |
1913 break; | 1914 break; |
1914 } | 1915 } |
| 1916 case kAVXI32x4ReplaceLane: { |
| 1917 CpuFeatureScope avx_scope(masm(), AVX); |
| 1918 __ vpinsrd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1919 i.InputOperand(2), i.InputInt8(1)); |
| 1920 break; |
| 1921 } |
1915 case kAVXI32x4Add: { | 1922 case kAVXI32x4Add: { |
1916 CpuFeatureScope avx_scope(masm(), AVX); | 1923 CpuFeatureScope avx_scope(masm(), AVX); |
1917 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1924 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1918 i.InputOperand(1)); | 1925 i.InputOperand(1)); |
1919 break; | 1926 break; |
1920 } | 1927 } |
1921 case kAVXI32x4Sub: { | 1928 case kAVXI32x4Sub: { |
1922 CpuFeatureScope avx_scope(masm(), AVX); | 1929 CpuFeatureScope avx_scope(masm(), AVX); |
1923 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1930 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1924 i.InputOperand(1)); | 1931 i.InputOperand(1)); |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2764 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2771 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2765 __ Nop(padding_size); | 2772 __ Nop(padding_size); |
2766 } | 2773 } |
2767 } | 2774 } |
2768 | 2775 |
2769 #undef __ | 2776 #undef __ |
2770 | 2777 |
2771 } // namespace compiler | 2778 } // namespace compiler |
2772 } // namespace internal | 2779 } // namespace internal |
2773 } // namespace v8 | 2780 } // namespace v8 |
OLD | NEW |