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

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

Issue 2695613004: Add several SIMD opcodes to IA32 (Closed)
Patch Set: Revert patch set 4, Add vpaddd/vpsubd, and Rebase 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 | « BUILD.gn ('k') | src/compiler/ia32/instruction-codes-ia32.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 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 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
1899 Operand operand = i.MemoryOperand(&index); 1899 Operand operand = i.MemoryOperand(&index);
1900 __ xchg_w(i.InputRegister(index), operand); 1900 __ xchg_w(i.InputRegister(index), operand);
1901 break; 1901 break;
1902 } 1902 }
1903 case kIA32Xchgl: { 1903 case kIA32Xchgl: {
1904 size_t index = 0; 1904 size_t index = 0;
1905 Operand operand = i.MemoryOperand(&index); 1905 Operand operand = i.MemoryOperand(&index);
1906 __ xchg(i.InputRegister(index), operand); 1906 __ xchg(i.InputRegister(index), operand);
1907 break; 1907 break;
1908 } 1908 }
1909 case kIA32Int32x4Create: {
1910 XMMRegister dst = i.OutputSimd128Register();
1911 __ movd(dst, i.InputOperand(0));
1912 __ pshufd(dst, dst, 0x0);
1913 break;
1914 }
1915 case kIA32Int32x4ExtractLane: {
1916 CpuFeatureScope sse_scope(masm(), SSE4_1);
bbudge 2017/02/22 21:51:10 This scope is taken by the macro assembler functio
Jing 2017/02/23 07:28:17 Done. I adjusted Pextrd macro to support non-SSE4
1917 __ Pextrd(i.OutputRegister(), i.InputSimd128Register(0), i.InputInt8(1));
1918 break;
1919 }
1920 case kIA32Int32x4ReplaceLane: {
1921 CpuFeatureScope sse_scope(masm(), SSE4_1);
bbudge 2017/02/22 21:51:10 Ditto
Jing 2017/02/23 07:28:16 I cannot remove the SSE4 check here, because it wi
bbudge 2017/02/24 18:28:54 I don't have any suggestions. I've found googling
1922 __ Pinsrd(i.OutputSimd128Register(), i.InputOperand(2), i.InputInt8(1));
1923 break;
1924 }
1925 case kSSEInt32x4Add: {
bbudge 2017/02/22 21:51:10 SSE scope?
Jing 2017/02/23 07:28:16 paddd and psubd are both SSE2 instructions. I gues
bbudge 2017/02/24 18:28:54 OK
1926 __ paddd(i.OutputSimd128Register(), i.InputOperand(1));
1927 break;
1928 }
1929 case kSSEInt32x4Sub: {
bbudge 2017/02/22 21:51:10 Ditto
1930 __ psubd(i.OutputSimd128Register(), i.InputOperand(1));
1931 break;
1932 }
1933 case kAVXInt32x4Add: {
1934 CpuFeatureScope avx_scope(masm(), AVX);
1935 __ vpaddd(i.OutputSimd128Register(), i.InputSimd128Register(0),
1936 i.InputOperand(1));
1937 break;
1938 }
1939 case kAVXInt32x4Sub: {
1940 CpuFeatureScope avx_scope(masm(), AVX);
1941 __ vpsubd(i.OutputSimd128Register(), i.InputSimd128Register(0),
1942 i.InputOperand(1));
1943 break;
1944 }
1909 case kCheckedLoadInt8: 1945 case kCheckedLoadInt8:
1910 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b); 1946 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_b);
1911 break; 1947 break;
1912 case kCheckedLoadUint8: 1948 case kCheckedLoadUint8:
1913 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b); 1949 ASSEMBLE_CHECKED_LOAD_INTEGER(movzx_b);
1914 break; 1950 break;
1915 case kCheckedLoadInt16: 1951 case kCheckedLoadInt16:
1916 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w); 1952 ASSEMBLE_CHECKED_LOAD_INTEGER(movsx_w);
1917 break; 1953 break;
1918 case kCheckedLoadUint16: 1954 case kCheckedLoadUint16:
(...skipping 747 matching lines...) Expand 10 before | Expand all | Expand 10 after
2666 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; 2702 int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc;
2667 __ Nop(padding_size); 2703 __ Nop(padding_size);
2668 } 2704 }
2669 } 2705 }
2670 2706
2671 #undef __ 2707 #undef __
2672 2708
2673 } // namespace compiler 2709 } // namespace compiler
2674 } // namespace internal 2710 } // namespace internal
2675 } // namespace v8 2711 } // namespace v8
OLDNEW
« no previous file with comments | « BUILD.gn ('k') | src/compiler/ia32/instruction-codes-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698