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 1986 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1997 case kMips64F32x4SConvertI32x4: { | 1997 case kMips64F32x4SConvertI32x4: { |
1998 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 1998 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
1999 __ ffint_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 1999 __ ffint_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
2000 break; | 2000 break; |
2001 } | 2001 } |
2002 case kMips64F32x4UConvertI32x4: { | 2002 case kMips64F32x4UConvertI32x4: { |
2003 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | 2003 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
2004 __ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); | 2004 __ ffint_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); |
2005 break; | 2005 break; |
2006 } | 2006 } |
| 2007 case kMips64I32x4Mul: { |
| 2008 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2009 __ mulv_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2010 i.InputSimd128Register(1)); |
| 2011 break; |
| 2012 } |
| 2013 case kMips64I32x4MaxS: { |
| 2014 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2015 __ max_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2016 i.InputSimd128Register(1)); |
| 2017 break; |
| 2018 } |
| 2019 case kMips64I32x4MinS: { |
| 2020 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2021 __ min_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2022 i.InputSimd128Register(1)); |
| 2023 break; |
| 2024 } |
| 2025 case kMips64I32x4Eq: { |
| 2026 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2027 __ ceq_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2028 i.InputSimd128Register(1)); |
| 2029 break; |
| 2030 } |
| 2031 case kMips64I32x4Ne: { |
| 2032 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2033 Simd128Register dst = i.OutputSimd128Register(); |
| 2034 __ ceq_w(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); |
| 2035 __ nor_v(dst, dst, dst); |
| 2036 break; |
| 2037 } |
| 2038 case kMips64I32x4Shl: { |
| 2039 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2040 __ slli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2041 i.InputInt5(1)); |
| 2042 break; |
| 2043 } |
| 2044 case kMips64I32x4ShrS: { |
| 2045 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2046 __ srai_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2047 i.InputInt5(1)); |
| 2048 break; |
| 2049 } |
| 2050 case kMips64I32x4ShrU: { |
| 2051 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2052 __ srli_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2053 i.InputInt5(1)); |
| 2054 break; |
| 2055 } |
| 2056 case kMips64I32x4MaxU: { |
| 2057 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2058 __ max_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2059 i.InputSimd128Register(1)); |
| 2060 break; |
| 2061 } |
| 2062 case kMips64I32x4MinU: { |
| 2063 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2064 __ min_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), |
| 2065 i.InputSimd128Register(1)); |
| 2066 break; |
| 2067 } |
| 2068 case kMips64S32x4Select: { |
| 2069 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); |
| 2070 DCHECK(i.OutputSimd128Register().is(i.InputSimd128Register(0))); |
| 2071 __ bsel_v(i.OutputSimd128Register(), i.InputSimd128Register(2), |
| 2072 i.InputSimd128Register(1)); |
| 2073 break; |
| 2074 } |
2007 } | 2075 } |
2008 return kSuccess; | 2076 return kSuccess; |
2009 } // NOLINT(readability/fn_size) | 2077 } // NOLINT(readability/fn_size) |
2010 | 2078 |
2011 | 2079 |
2012 #define UNSUPPORTED_COND(opcode, condition) \ | 2080 #define UNSUPPORTED_COND(opcode, condition) \ |
2013 OFStream out(stdout); \ | 2081 OFStream out(stdout); \ |
2014 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ | 2082 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ |
2015 UNIMPLEMENTED(); | 2083 UNIMPLEMENTED(); |
2016 | 2084 |
(...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2763 padding_size -= v8::internal::Assembler::kInstrSize; | 2831 padding_size -= v8::internal::Assembler::kInstrSize; |
2764 } | 2832 } |
2765 } | 2833 } |
2766 } | 2834 } |
2767 | 2835 |
2768 #undef __ | 2836 #undef __ |
2769 | 2837 |
2770 } // namespace compiler | 2838 } // namespace compiler |
2771 } // namespace internal | 2839 } // namespace internal |
2772 } // namespace v8 | 2840 } // namespace v8 |
OLD | NEW |