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

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

Issue 2874403002: [wasm] Swap the implementation of SIMD compare ops using Gt/Ge insteas of Lt/Le (Closed)
Patch Set: Add Todo with bug reference 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
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 2188 matching lines...) Expand 10 before | Expand all | Expand 10 after
2199 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0)); 2199 __ ftrunc_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0));
2200 break; 2200 break;
2201 } 2201 }
2202 case kMips64I32x4Neg: { 2202 case kMips64I32x4Neg: {
2203 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2203 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2204 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero); 2204 __ xor_v(kSimd128RegZero, kSimd128RegZero, kSimd128RegZero);
2205 __ subv_w(i.OutputSimd128Register(), kSimd128RegZero, 2205 __ subv_w(i.OutputSimd128Register(), kSimd128RegZero,
2206 i.InputSimd128Register(0)); 2206 i.InputSimd128Register(0));
2207 break; 2207 break;
2208 } 2208 }
2209 case kMips64I32x4LtS: { 2209 case kMips64I32x4GtS: {
2210 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2210 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2211 __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 2211 __ clt_s_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
2212 i.InputSimd128Register(1)); 2212 i.InputSimd128Register(0));
2213 break; 2213 break;
2214 } 2214 }
2215 case kMips64I32x4LeS: { 2215 case kMips64I32x4GeS: {
2216 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2216 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2217 __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 2217 __ cle_s_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
2218 i.InputSimd128Register(1)); 2218 i.InputSimd128Register(0));
2219 break; 2219 break;
2220 } 2220 }
2221 case kMips64I32x4LtU: { 2221 case kMips64I32x4GtU: {
2222 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2222 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2223 __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 2223 __ clt_u_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
2224 i.InputSimd128Register(1)); 2224 i.InputSimd128Register(0));
2225 break; 2225 break;
2226 } 2226 }
2227 case kMips64I32x4LeU: { 2227 case kMips64I32x4GeU: {
2228 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2228 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2229 __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(0), 2229 __ cle_u_w(i.OutputSimd128Register(), i.InputSimd128Register(1),
2230 i.InputSimd128Register(1)); 2230 i.InputSimd128Register(0));
2231 break; 2231 break;
2232 } 2232 }
2233 case kMips64I16x8Splat: { 2233 case kMips64I16x8Splat: {
2234 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2234 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2235 __ fill_h(i.OutputSimd128Register(), i.InputRegister(0)); 2235 __ fill_h(i.OutputSimd128Register(), i.InputRegister(0));
2236 break; 2236 break;
2237 } 2237 }
2238 case kMips64I16x8ExtractLane: { 2238 case kMips64I16x8ExtractLane: {
2239 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2239 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2240 __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0), 2240 __ copy_s_h(i.OutputRegister(), i.InputSimd128Register(0),
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2324 i.InputSimd128Register(1)); 2324 i.InputSimd128Register(1));
2325 break; 2325 break;
2326 } 2326 }
2327 case kMips64I16x8Ne: { 2327 case kMips64I16x8Ne: {
2328 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2328 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2329 Simd128Register dst = i.OutputSimd128Register(); 2329 Simd128Register dst = i.OutputSimd128Register();
2330 __ ceq_h(dst, i.InputSimd128Register(0), i.InputSimd128Register(1)); 2330 __ ceq_h(dst, i.InputSimd128Register(0), i.InputSimd128Register(1));
2331 __ nor_v(dst, dst, dst); 2331 __ nor_v(dst, dst, dst);
2332 break; 2332 break;
2333 } 2333 }
2334 case kMips64I16x8LtS: { 2334 case kMips64I16x8GtS: {
2335 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2335 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2336 __ clt_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2336 __ clt_s_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2337 i.InputSimd128Register(1)); 2337 i.InputSimd128Register(0));
2338 break; 2338 break;
2339 } 2339 }
2340 case kMips64I16x8LeS: { 2340 case kMips64I16x8GeS: {
2341 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2341 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2342 __ cle_s_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2342 __ cle_s_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2343 i.InputSimd128Register(1)); 2343 i.InputSimd128Register(0));
2344 break; 2344 break;
2345 } 2345 }
2346 case kMips64I16x8AddSaturateU: { 2346 case kMips64I16x8AddSaturateU: {
2347 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2347 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2348 __ adds_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2348 __ adds_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2349 i.InputSimd128Register(1)); 2349 i.InputSimd128Register(1));
2350 break; 2350 break;
2351 } 2351 }
2352 case kMips64I16x8SubSaturateU: { 2352 case kMips64I16x8SubSaturateU: {
2353 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2353 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2354 __ subs_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2354 __ subs_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2355 i.InputSimd128Register(1)); 2355 i.InputSimd128Register(1));
2356 break; 2356 break;
2357 } 2357 }
2358 case kMips64I16x8MaxU: { 2358 case kMips64I16x8MaxU: {
2359 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2359 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2360 __ max_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2360 __ max_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2361 i.InputSimd128Register(1)); 2361 i.InputSimd128Register(1));
2362 break; 2362 break;
2363 } 2363 }
2364 case kMips64I16x8MinU: { 2364 case kMips64I16x8MinU: {
2365 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2365 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2366 __ min_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2366 __ min_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0),
2367 i.InputSimd128Register(1)); 2367 i.InputSimd128Register(1));
2368 break; 2368 break;
2369 } 2369 }
2370 case kMips64I16x8LtU: { 2370 case kMips64I16x8GtU: {
2371 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2371 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2372 __ clt_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2372 __ clt_u_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2373 i.InputSimd128Register(1)); 2373 i.InputSimd128Register(0));
2374 break; 2374 break;
2375 } 2375 }
2376 case kMips64I16x8LeU: { 2376 case kMips64I16x8GeU: {
2377 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2377 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2378 __ cle_u_h(i.OutputSimd128Register(), i.InputSimd128Register(0), 2378 __ cle_u_h(i.OutputSimd128Register(), i.InputSimd128Register(1),
2379 i.InputSimd128Register(1)); 2379 i.InputSimd128Register(0));
2380 break; 2380 break;
2381 } 2381 }
2382 case kMips64I8x16Splat: { 2382 case kMips64I8x16Splat: {
2383 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2383 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2384 __ fill_b(i.OutputSimd128Register(), i.InputRegister(0)); 2384 __ fill_b(i.OutputSimd128Register(), i.InputRegister(0));
2385 break; 2385 break;
2386 } 2386 }
2387 case kMips64I8x16ExtractLane: { 2387 case kMips64I8x16ExtractLane: {
2388 CpuFeatureScope msa_scope(masm(), MIPS_SIMD); 2388 CpuFeatureScope msa_scope(masm(), MIPS_SIMD);
2389 __ copy_s_b(i.OutputRegister(), i.InputSimd128Register(0), 2389 __ copy_s_b(i.OutputRegister(), i.InputSimd128Register(0),
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after
3178 padding_size -= v8::internal::Assembler::kInstrSize; 3178 padding_size -= v8::internal::Assembler::kInstrSize;
3179 } 3179 }
3180 } 3180 }
3181 } 3181 }
3182 3182
3183 #undef __ 3183 #undef __
3184 3184
3185 } // namespace compiler 3185 } // namespace compiler
3186 } // namespace internal 3186 } // namespace internal
3187 } // namespace v8 3187 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/mips/instruction-selector-mips.cc ('k') | src/compiler/mips64/instruction-codes-mips64.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698