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 1865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1876 break; | 1876 break; |
1877 case kIA32Poke: { | 1877 case kIA32Poke: { |
1878 int const slot = MiscField::decode(instr->opcode()); | 1878 int const slot = MiscField::decode(instr->opcode()); |
1879 if (HasImmediateInput(instr, 0)) { | 1879 if (HasImmediateInput(instr, 0)) { |
1880 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); | 1880 __ mov(Operand(esp, slot * kPointerSize), i.InputImmediate(0)); |
1881 } else { | 1881 } else { |
1882 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); | 1882 __ mov(Operand(esp, slot * kPointerSize), i.InputRegister(0)); |
1883 } | 1883 } |
1884 break; | 1884 break; |
1885 } | 1885 } |
1886 case kIA32Int32x4Splat: { | 1886 case kIA32I32x4Splat: { |
1887 XMMRegister dst = i.OutputSimd128Register(); | 1887 XMMRegister dst = i.OutputSimd128Register(); |
1888 __ movd(dst, i.InputOperand(0)); | 1888 __ movd(dst, i.InputOperand(0)); |
1889 __ pshufd(dst, dst, 0x0); | 1889 __ pshufd(dst, dst, 0x0); |
1890 break; | 1890 break; |
1891 } | 1891 } |
1892 case kIA32Int32x4ExtractLane: { | 1892 case kIA32I32x4ExtractLane: { |
1893 __ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1)); | 1893 __ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1)); |
1894 break; | 1894 break; |
1895 } | 1895 } |
1896 case kIA32Int32x4ReplaceLane: { | 1896 case kIA32I32x4ReplaceLane: { |
1897 __ Pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); | 1897 __ Pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1)); |
1898 break; | 1898 break; |
1899 } | 1899 } |
1900 case kSSEInt32x4Add: { | 1900 case kSSEI32x4Add: { |
1901 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); | 1901 __ paddd(i.OutputSimd128Register(), i.InputOperand(1)); |
1902 break; | 1902 break; |
1903 } | 1903 } |
1904 case kSSEInt32x4Sub: { | 1904 case kSSEI32x4Sub: { |
1905 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); | 1905 __ psubd(i.OutputSimd128Register(), i.InputOperand(1)); |
1906 break; | 1906 break; |
1907 } | 1907 } |
1908 case kAVXInt32x4Add: { | 1908 case kAVXI32x4Add: { |
1909 CpuFeatureScope avx_scope(masm(), AVX); | 1909 CpuFeatureScope avx_scope(masm(), AVX); |
1910 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1910 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1911 i.InputOperand(1)); | 1911 i.InputOperand(1)); |
1912 break; | 1912 break; |
1913 } | 1913 } |
1914 case kAVXInt32x4Sub: { | 1914 case kAVXI32x4Sub: { |
1915 CpuFeatureScope avx_scope(masm(), AVX); | 1915 CpuFeatureScope avx_scope(masm(), AVX); |
1916 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1916 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0), |
1917 i.InputOperand(1)); | 1917 i.InputOperand(1)); |
1918 break; | 1918 break; |
1919 } | 1919 } |
1920 case kCheckedLoadInt8: | 1920 case kCheckedLoadInt8: |
1921 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); | 1921 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); |
1922 break; | 1922 break; |
1923 case kCheckedLoadUint8: | 1923 case kCheckedLoadUint8: |
1924 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); | 1924 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); |
(...skipping 808 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2733 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; | 2733 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; |
2734 __ Nop(padding_size); | 2734 __ Nop(padding_size); |
2735 } | 2735 } |
2736 } | 2736 } |
2737 | 2737 |
2738 #undef __ | 2738 #undef __ |
2739 | 2739 |
2740 } // namespace compiler | 2740 } // namespace compiler |
2741 } // namespace internal | 2741 } // namespace internal |
2742 } // namespace v8 | 2742 } // namespace v8 |
OLD | NEW |