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

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

Issue 2874403002: [wasm] Swap the implementation of SIMD compare ops using Gt/Ge insteas of Lt/Le (Closed)
Patch Set: Add Todo with bug reference Created 3 years, 7 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 | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/instruction-codes-mips.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 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 #include "src/compilation-info.h" 6 #include "src/compilation-info.h"
7 #include "src/compiler/code-generator-impl.h" 7 #include "src/compiler/code-generator-impl.h"
8 #include "src/compiler/gap-resolver.h" 8 #include "src/compiler/gap-resolver.h"
9 #include "src/compiler/node-matchers.h" 9 #include "src/compiler/node-matchers.h"
10 #include "src/compiler/osr.h" 10 #include "src/compiler/osr.h"
(...skipping 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); 1878 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
1879 break; 1879 break;
1880 } 1880 }
1881 case kMipsI32x4Neg: { 1881 case kMipsI32x4Neg: {
1882 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1882 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1883 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); 1883 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero);
1884 __ subv_w(i.OutputSimd128Register(), kSimd128RegZero, 1884 __ subv_w(i.OutputSimd128Register(), kSimd128RegZero,
1885 i.InputSimd128Register(0)); 1885 i.InputSimd128Register(0));
1886 break; 1886 break;
1887 } 1887 }
1888 case kMipsI32x4LtS: { 1888 case kMipsI32x4GtS: {
1889 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1889 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1890 __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1890 __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
1891 i.InputSimd128Register(1)); 1891 i.InputSimd128Register(0));
1892 break; 1892 break;
1893 } 1893 }
1894 case kMipsI32x4LeS: { 1894 case kMipsI32x4GeS: {
1895 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1895 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1896 __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1896 __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
1897 i.InputSimd128Register(1)); 1897 i.InputSimd128Register(0));
1898 break; 1898 break;
1899 } 1899 }
1900 case kMipsI32x4LtU: { 1900 case kMipsI32x4GtU: {
1901 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1901 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1902 __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1902 __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
1903 i.InputSimd128Register(1)); 1903 i.InputSimd128Register(0));
1904 break; 1904 break;
1905 } 1905 }
1906 case kMipsI32x4LeU: { 1906 case kMipsI32x4GeU: {
1907 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1907 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1908 __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 1908 __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
1909 i.InputSimd128Register(1)); 1909 i.InputSimd128Register(0));
1910 break; 1910 break;
1911 } 1911 }
1912 case kMipsI16x8Splat: { 1912 case kMipsI16x8Splat: {
1913 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1913 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1914 __ fill_h(i.OutputSimd128Register(), i.InputRegister(0)); 1914 __ fill_h(i.OutputSimd128Register(), i.InputRegister(0));
1915 break; 1915 break;
1916 } 1916 }
1917 case kMipsI16x8ExtractLane: { 1917 case kMipsI16x8ExtractLane: {
1918 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 1918 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
1919 __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0), 1919 __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0),
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 i.InputSimd128Register(1)); 2003 i.InputSimd128Register(1));
2004 break; 2004 break;
2005 } 2005 }
2006 case kMipsI16x8Ne: { 2006 case kMipsI16x8Ne: {
2007 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2007 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2008 Simd128Register dst = i.OutputSimd128Register(); 2008 Simd128Register dst = i.OutputSimd128Register();
2009 __ ceq_h(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); 2009 __ ceq_h(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
2010 __ nor_v(dst, dst, dst); 2010 __ nor_v(dst, dst, dst);
2011 break; 2011 break;
2012 } 2012 }
2013 case kMipsI16x8LtS: { 2013 case kMipsI16x8GtS: {
2014 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2014 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2015 __ clt_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2015 __ clt_s_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2016 i.InputSimd128Register(1)); 2016 i.InputSimd128Register(0));
2017 break; 2017 break;
2018 } 2018 }
2019 case kMipsI16x8LeS: { 2019 case kMipsI16x8GeS: {
2020 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2020 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2021 __ cle_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2021 __ cle_s_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2022 i.InputSimd128Register(1)); 2022 i.InputSimd128Register(0));
2023 break; 2023 break;
2024 } 2024 }
2025 case kMipsI16x8AddSaturateU: { 2025 case kMipsI16x8AddSaturateU: {
2026 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2026 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2027 __ adds_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2027 __ adds_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2028 i.InputSimd128Register(1)); 2028 i.InputSimd128Register(1));
2029 break; 2029 break;
2030 } 2030 }
2031 case kMipsI16x8SubSaturateU: { 2031 case kMipsI16x8SubSaturateU: {
2032 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2032 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2033 __ subs_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2033 __ subs_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2034 i.InputSimd128Register(1)); 2034 i.InputSimd128Register(1));
2035 break; 2035 break;
2036 } 2036 }
2037 case kMipsI16x8MaxU: { 2037 case kMipsI16x8MaxU: {
2038 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2038 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2039 __ max_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2039 __ max_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2040 i.InputSimd128Register(1)); 2040 i.InputSimd128Register(1));
2041 break; 2041 break;
2042 } 2042 }
2043 case kMipsI16x8MinU: { 2043 case kMipsI16x8MinU: {
2044 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2044 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2045 __ min_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2045 __ min_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2046 i.InputSimd128Register(1)); 2046 i.InputSimd128Register(1));
2047 break; 2047 break;
2048 } 2048 }
2049 case kMipsI16x8LtU: { 2049 case kMipsI16x8GtU: {
2050 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2050 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2051 __ clt_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2051 __ clt_u_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2052 i.InputSimd128Register(1)); 2052 i.InputSimd128Register(0));
2053 break; 2053 break;
2054 } 2054 }
2055 case kMipsI16x8LeU: { 2055 case kMipsI16x8GeU: {
2056 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2056 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2057 __ cle_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2057 __ cle_u_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2058 i.InputSimd128Register(1)); 2058 i.InputSimd128Register(0));
2059 break; 2059 break;
2060 } 2060 }
2061 case kMipsI8x16Splat: { 2061 case kMipsI8x16Splat: {
2062 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2062 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2063 __ fill_b(i.OutputSimd128Register(), i.InputRegister(0)); 2063 __ fill_b(i.OutputSimd128Register(), i.InputRegister(0));
2064 break; 2064 break;
2065 } 2065 }
2066 case kMipsI8x16ExtractLane: { 2066 case kMipsI8x16ExtractLane: {
2067 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2067 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2068 __ copy_s_b(i.OutputRegister(), i.InputSimd128Register(0), 2068 __ copy_s_b(i.OutputRegister(), i.InputSimd128Register(0),
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
2887 padding_size -= v8::internal::Assembler::kInstrSize; 2887 padding_size -= v8::internal::Assembler::kInstrSize;
2888 } 2888 }
2889 } 2889 }
2890 } 2890 }
2891 2891
2892 #undef __ 2892 #undef __
2893 2893
2894 } // namespace compiler 2894 } // namespace compiler
2895 } // namespace internal 2895 } // namespace internal
2896 } // namespace v8 2896 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698