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

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

Issue 2798853003: MIPS[64]: Support for some SIMD operations (7) (Closed)
Patch Set: Rebase, change Lt/Le with Gt/Ge 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/instruction-selector.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 2075 matching lines...) Expand 10 before | Expand all | Expand 10 after
2086 __ slli_b(i.OutputSimd128Register(), i.InputSimd128Register(0), 2086 __ slli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2087 i.InputInt3(1)); 2087 i.InputInt3(1));
2088 break; 2088 break;
2089 } 2089 }
2090 case kMipsI8x16ShrS: { 2090 case kMipsI8x16ShrS: {
2091 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2091 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2092 __ srai_b(i.OutputSimd128Register(), i.InputSimd128Register(0), 2092 __ srai_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2093 i.InputInt3(1)); 2093 i.InputInt3(1));
2094 break; 2094 break;
2095 } 2095 }
2096 case kMipsI8x16Add: {
2097 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2098 __ addv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2099 i.InputSimd128Register(1));
2100 break;
2101 }
2102 case kMipsI8x16AddSaturateS: {
2103 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2104 __ adds_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2105 i.InputSimd128Register(1));
2106 break;
2107 }
2108 case kMipsI8x16Sub: {
2109 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2110 __ subv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2111 i.InputSimd128Register(1));
2112 break;
2113 }
2114 case kMipsI8x16SubSaturateS: {
2115 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2116 __ subs_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2117 i.InputSimd128Register(1));
2118 break;
2119 }
2120 case kMipsI8x16Mul: {
2121 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2122 __ mulv_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2123 i.InputSimd128Register(1));
2124 break;
2125 }
2126 case kMipsI8x16MaxS: {
2127 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2128 __ max_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2129 i.InputSimd128Register(1));
2130 break;
2131 }
2132 case kMipsI8x16MinS: {
2133 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2134 __ min_s_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2135 i.InputSimd128Register(1));
2136 break;
2137 }
2138 case kMipsI8x16Eq: {
2139 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2140 __ ceq_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2141 i.InputSimd128Register(1));
2142 break;
2143 }
2144 case kMipsI8x16Ne: {
2145 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2146 Simd128Register dst = i.OutputSimd128Register();
2147 __ ceq_b(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
2148 __ nor_v(dst, dst, dst);
2149 break;
2150 }
2151 case kMipsI8x16GtS: {
2152 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2153 __ clt_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2154 i.InputSimd128Register(0));
2155 break;
2156 }
2157 case kMipsI8x16GeS: {
2158 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2159 __ cle_s_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2160 i.InputSimd128Register(0));
2161 break;
2162 }
2163 case kMipsI8x16ShrU: {
2164 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2165 __ srli_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2166 i.InputInt3(1));
2167 break;
2168 }
2169 case kMipsI8x16AddSaturateU: {
2170 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2171 __ adds_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2172 i.InputSimd128Register(1));
2173 break;
2174 }
2175 case kMipsI8x16SubSaturateU: {
2176 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2177 __ subs_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2178 i.InputSimd128Register(1));
2179 break;
2180 }
2181 case kMipsI8x16MaxU: {
2182 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2183 __ max_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2184 i.InputSimd128Register(1));
2185 break;
2186 }
2187 case kMipsI8x16MinU: {
2188 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2189 __ min_u_b(i.OutputSimd128Register(), i.InputSimd128Register(0),
2190 i.InputSimd128Register(1));
2191 break;
2192 }
2193 case kMipsI8x16GtU: {
2194 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2195 __ clt_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2196 i.InputSimd128Register(0));
2197 break;
2198 }
2199 case kMipsI8x16GeU: {
2200 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2201 __ cle_u_b(i.OutputSimd128Register(), i.InputSimd128Register(1),
2202 i.InputSimd128Register(0));
2203 break;
2204 }
2205 case kMipsS128And: {
2206 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2207 __ and_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2208 i.InputSimd128Register(1));
2209 break;
2210 }
2211 case kMipsS128Or: {
2212 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2213 __ or_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2214 i.InputSimd128Register(1));
2215 break;
2216 }
2217 case kMipsS128Xor: {
2218 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2219 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2220 i.InputSimd128Register(1));
2221 break;
2222 }
2223 case kMipsS128Not: {
2224 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2225 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2226 i.InputSimd128Register(0));
2227 break;
2228 }
2096 } 2229 }
2097 return kSuccess; 2230 return kSuccess;
2098 } // NOLINT(readability/fn_size) 2231 } // NOLINT(readability/fn_size)
2099 2232
2100 2233
2101 #define UNSUPPORTED_COND(opcode, condition) \ 2234 #define UNSUPPORTED_COND(opcode, condition) \
2102 OFStream out(stdout); \ 2235 OFStream out(stdout); \
2103 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 2236 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
2104 UNIMPLEMENTED(); 2237 UNIMPLEMENTED();
2105 2238
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
2882 padding_size -= v8::internal::Assembler::kInstrSize; 3015 padding_size -= v8::internal::Assembler::kInstrSize;
2883 } 3016 }
2884 } 3017 }
2885 } 3018 }
2886 3019
2887 #undef __ 3020 #undef __
2888 3021
2889 } // namespace compiler 3022 } // namespace compiler
2890 } // namespace internal 3023 } // namespace internal
2891 } // namespace v8 3024 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/mips/instruction-codes-mips.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698