| OLD | NEW |
| 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 1953 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1964 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1964 __ addv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1965 i.InputSimd128Register(1)); | 1965 i.InputSimd128Register(1)); |
| 1966 break; | 1966 break; |
| 1967 } | 1967 } |
| 1968 case kMips64I32x4Sub: { | 1968 case kMips64I32x4Sub: { |
| 1969 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 1969 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1970 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), | 1970 __ subv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1971 i.InputSimd128Register(1)); | 1971 i.InputSimd128Register(1)); |
| 1972 break; | 1972 break; |
| 1973 } | 1973 } |
| 1974 case kMips64I32x4Mul: { |
| 1975 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1976 __ mulv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1977 i.InputSimd128Register(1)); |
| 1978 break; |
| 1979 } |
| 1980 case kMips64I32x4MaxS: { |
| 1981 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1982 __ max_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1983 i.InputSimd128Register(1)); |
| 1984 break; |
| 1985 } |
| 1986 case kMips64I32x4MinS: { |
| 1987 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1988 __ min_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1989 i.InputSimd128Register(1)); |
| 1990 break; |
| 1991 } |
| 1992 case kMips64I32x4Eq: { |
| 1993 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 1994 __ ceq_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 1995 i.InputSimd128Register(1)); |
| 1996 break; |
| 1997 } |
| 1998 case kMips64I32x4Ne: { |
| 1999 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2000 Simd128Register dst = i.OutputSimd128Register(); |
| 2001 __ ceq_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); |
| 2002 __ nor_v(dst, dst, dst); |
| 2003 break; |
| 2004 } |
| 2005 case kMips64I32x4Shl: { |
| 2006 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2007 __ slli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2008 i.InputInt5(1)); |
| 2009 break; |
| 2010 } |
| 2011 case kMips64I32x4ShrS: { |
| 2012 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2013 __ srai_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2014 i.InputInt5(1)); |
| 2015 break; |
| 2016 } |
| 2017 case kMips64I32x4ShrU: { |
| 2018 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2019 __ srli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2020 i.InputInt5(1)); |
| 2021 break; |
| 2022 } |
| 2023 case kMips64I32x4MaxU: { |
| 2024 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2025 __ max_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2026 i.InputSimd128Register(1)); |
| 2027 break; |
| 2028 } |
| 2029 case kMips64I32x4MinU: { |
| 2030 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2031 __ min_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2032 i.InputSimd128Register(1)); |
| 2033 break; |
| 2034 } |
| 2035 case kMips64S32x4Select: { |
| 2036 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2037 DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0))); |
| 2038 __ bsel_v(i.OutputSimd128Register(), i.InputSimd128Register(2), |
| 2039 i.InputSimd128Register(1)); |
| 2040 break; |
| 2041 } |
| 1974 } | 2042 } |
| 1975 return kSuccess; | 2043 return kSuccess; |
| 1976 } // NOLINT(readability/fn_size) | 2044 } // NOLINT(readability/fn_size) |
| 1977 | 2045 |
| 1978 | 2046 |
| 1979 #define UNSUPPORTED_COND(opcode, condition) \ | 2047 #define UNSUPPORTED_COND(opcode, condition) \ |
| 1980 OFStream out(stdout); \ | 2048 OFStream out(stdout); \ |
| 1981 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ | 2049 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ |
| 1982 UNIMPLEMENTED(); | 2050 UNIMPLEMENTED(); |
| 1983 | 2051 |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2730 padding_size -= v8::internal::Assembler::kInstrSize; | 2798 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2731 } | 2799 } |
| 2732 } | 2800 } |
| 2733 } | 2801 } |
| 2734 | 2802 |
| 2735 #undef __ | 2803 #undef __ |
| 2736 | 2804 |
| 2737 } // namespace compiler | 2805 } // namespace compiler |
| 2738 } // namespace internal | 2806 } // namespace internal |
| 2739 } // namespace v8 | 2807 } // namespace v8 |
| OLD | NEW |