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

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

Issue 2801683003: MIPS[64]: Support for some SIMD operations (8) (Closed)
Patch Set: Rebase Created 3 years, 6 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 2208 matching lines...) Expand 10 before | Expand all | Expand 10 after
2219 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), 2219 __ xor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2220 i.InputSimd128Register(1)); 2220 i.InputSimd128Register(1));
2221 break; 2221 break;
2222 } 2222 }
2223 case kMipsS128Not: { 2223 case kMipsS128Not: {
2224 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2224 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2225 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0), 2225 __ nor_v(i.OutputSimd128Register(), i.InputSimd128Register(0),
2226 i.InputSimd128Register(0)); 2226 i.InputSimd128Register(0));
2227 break; 2227 break;
2228 } 2228 }
2229 case kMipsS1x4AnyTrue:
2230 case kMipsS1x8AnyTrue:
2231 case kMipsS1x16AnyTrue: {
2232 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2233 Register dst = i.OutputRegister();
2234 Label all_false;
2235
2236 __ BranchMSA(&all_false, MSA_BRANCH_V, all_zero,
2237 i.InputSimd128Register(0), USE_DELAY_SLOT);
2238 __ li(dst, 0); // branch delay slot
2239 __ li(dst, -1);
2240 __ bind(&all_false);
2241 break;
2242 }
2243 case kMipsS1x4AllTrue: {
2244 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2245 Register dst = i.OutputRegister();
2246 Label all_true;
2247 __ BranchMSA(&all_true, MSA_BRANCH_W, all_not_zero,
2248 i.InputSimd128Register(0), USE_DELAY_SLOT);
2249 __ li(dst, -1); // branch delay slot
2250 __ li(dst, 0);
2251 __ bind(&all_true);
2252 break;
2253 }
2254 case kMipsS1x8AllTrue: {
2255 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2256 Register dst = i.OutputRegister();
2257 Label all_true;
2258 __ BranchMSA(&all_true, MSA_BRANCH_H, all_not_zero,
2259 i.InputSimd128Register(0), USE_DELAY_SLOT);
2260 __ li(dst, -1); // branch delay slot
2261 __ li(dst, 0);
2262 __ bind(&all_true);
2263 break;
2264 }
2265 case kMipsS1x16AllTrue: {
2266 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2267 Register dst = i.OutputRegister();
2268 Label all_true;
2269 __ BranchMSA(&all_true, MSA_BRANCH_B, all_not_zero,
2270 i.InputSimd128Register(0), USE_DELAY_SLOT);
2271 __ li(dst, -1); // branch delay slot
2272 __ li(dst, 0);
2273 __ bind(&all_true);
2274 break;
2275 }
2276 case kMipsMsaLd: {
2277 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2278 __ ld_b(i.OutputSimd128Register(), i.MemoryOperand());
2279 break;
2280 }
2281 case kMipsMsaSt: {
2282 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2283 __ st_b(i.InputSimd128Register(2), i.MemoryOperand());
2284 break;
2285 }
2229 } 2286 }
2230 return kSuccess; 2287 return kSuccess;
2231 } // NOLINT(readability/fn_size) 2288 } // NOLINT(readability/fn_size)
2232 2289
2233 2290
2234 #define UNSUPPORTED_COND(opcode, condition) \ 2291 #define UNSUPPORTED_COND(opcode, condition) \
2235 OFStream out(stdout); \ 2292 OFStream out(stdout); \
2236 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \ 2293 out << "Unsupported " << #opcode << " condition: \"" << condition << "\""; \
2237 UNIMPLEMENTED(); 2294 UNIMPLEMENTED();
2238 2295
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
3015 padding_size -= v8::internal::Assembler::kInstrSize; 3072 padding_size -= v8::internal::Assembler::kInstrSize;
3016 } 3073 }
3017 } 3074 }
3018 } 3075 }
3019 3076
3020 #undef __ 3077 #undef __
3021 3078
3022 } // namespace compiler 3079 } // namespace compiler
3023 } // namespace internal 3080 } // namespace internal
3024 } // namespace v8 3081 } // 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