Chromium Code Reviews| 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 kMips64S128And: { | |
| 2008 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2009 __ and_v(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
| 2010 i.InputSimd128Register(1)); | |
| 2011 break; | |
| 2012 } | |
| 2013 case kMips64S128Or: { | |
| 2014 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2015 __ or_v(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
| 2016 i.InputSimd128Register(1)); | |
| 2017 break; | |
| 2018 } | |
| 2019 case kMips64S128Xor: { | |
| 2020 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2021 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
| 2022 i.InputSimd128Register(1)); | |
| 2023 break; | |
| 2024 } | |
| 2025 case kMips64S128Not: { | |
| 2026 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2027 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), | |
| 2028 i.InputSimd128Register(0)); | |
| 2029 break; | |
| 2030 } | |
| 2031 case kMips64S1x4AnyTrue: | |
| 2032 case kMips64S1x8AnyTrue: | |
| 2033 case kMips64S1x16AnyTrue: { | |
| 2034 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2035 Register dst = i.OutputRegister(); | |
| 2036 Label all_false; | |
| 2037 __ bz_v(i.InputSimd128Register(0), &all_false); | |
|
ivica.bogosavljevic
2017/05/15 14:59:06
BranchSimd macro instruction
dusan.simicic
2017/05/19 08:55:01
Done.
| |
| 2038 __ li(dst, 0); | |
| 2039 __ li(dst, -1); | |
| 2040 __ bind(&all_false); | |
| 2041 break; | |
| 2042 } | |
| 2043 case kMips64S1x4AllTrue: { | |
| 2044 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2045 Register dst = i.OutputRegister(); | |
| 2046 Label all_true; | |
| 2047 __ bnz_w(i.InputSimd128Register(0), &all_true); | |
| 2048 __ li(dst, -1); | |
| 2049 __ li(dst, 0); | |
| 2050 __ bind(&all_true); | |
| 2051 break; | |
| 2052 } | |
| 2053 case kMips64S1x8AllTrue: { | |
| 2054 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2055 Register dst = i.OutputRegister(); | |
| 2056 Label all_true; | |
| 2057 __ bnz_h(i.InputSimd128Register(0), &all_true); | |
| 2058 __ li(dst, -1); | |
| 2059 __ li(dst, 0); | |
| 2060 __ bind(&all_true); | |
| 2061 break; | |
| 2062 } | |
| 2063 case kMips64S1x16AllTrue: { | |
| 2064 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2065 Register dst = i.OutputRegister(); | |
| 2066 Label all_true; | |
| 2067 __ bnz_b(i.InputSimd128Register(0), &all_true); | |
| 2068 __ li(dst, -1); | |
| 2069 __ li(dst, 0); | |
| 2070 __ bind(&all_true); | |
| 2071 break; | |
| 2072 } | |
| 2073 case kMips64MsaLd: { | |
| 2074 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2075 __ ld_b(i.OutputSimd128Register(), i.MemoryOperand()); | |
| 2076 break; | |
| 2077 } | |
| 2078 case kMips64MsaSt: { | |
| 2079 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); | |
| 2080 __ st_b(i.InputSimd128Register(2), i.MemoryOperand()); | |
| 2081 break; | |
| 2082 } | |
| 2007 } | 2083 } |
| 2008 return kSuccess; | 2084 return kSuccess; |
| 2009 } // NOLINT(readability/fn_size) | 2085 } // NOLINT(readability/fn_size) |
| 2010 | 2086 |
| 2011 | 2087 |
| 2012 #define UNSUPPORTED_COND(opcode, condition) \ | 2088 #define UNSUPPORTED_COND(opcode, condition) \ |
| 2013 OFStream out(stdout); \ | 2089 OFStream out(stdout); \ |
| 2014 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ | 2090 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ |
| 2015 UNIMPLEMENTED(); | 2091 UNIMPLEMENTED(); |
| 2016 | 2092 |
| (...skipping 746 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2763 padding_size -= v8::internal::Assembler::kInstrSize; | 2839 padding_size -= v8::internal::Assembler::kInstrSize; |
| 2764 } | 2840 } |
| 2765 } | 2841 } |
| 2766 } | 2842 } |
| 2767 | 2843 |
| 2768 #undef __ | 2844 #undef __ |
| 2769 | 2845 |
| 2770 } // namespace compiler | 2846 } // namespace compiler |
| 2771 } // namespace internal | 2847 } // namespace internal |
| 2772 } // namespace v8 | 2848 } // namespace v8 |
| OLD | NEW |