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

Side by Side Diff: src/mips/code-stubs-mips.cc

Issue 1273353003: [simd.js] Single SIMD128_VALUE_TYPE for all Simd128Values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow check failures. REBASE. Created 5 years, 4 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/ic/ic-inl.h ('k') | src/mips/lithium-codegen-mips.cc » ('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 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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/v8.h" 5 #include "src/v8.h"
6 6
7 #if V8_TARGET_ARCH_MIPS 7 #if V8_TARGET_ARCH_MIPS
8 8
9 #include "src/base/bits.h" 9 #include "src/base/bits.h"
10 #include "src/bootstrapper.h" 10 #include "src/bootstrapper.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 __ Branch(&not_identical, ne, a0, Operand(a1)); 284 __ Branch(&not_identical, ne, a0, Operand(a1));
285 285
286 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask)); 286 __ li(exp_mask_reg, Operand(HeapNumber::kExponentMask));
287 287
288 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), 288 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(),
289 // so we do the second best thing - test it ourselves. 289 // so we do the second best thing - test it ourselves.
290 // They are both equal and they are not both Smis so both of them are not 290 // They are both equal and they are not both Smis so both of them are not
291 // Smis. If it's not a heap number, then return equal. 291 // Smis. If it's not a heap number, then return equal.
292 __ GetObjectType(a0, t4, t4); 292 __ GetObjectType(a0, t4, t4);
293 if (cc == less || cc == greater) { 293 if (cc == less || cc == greater) {
294 Label not_simd;
295 // Call runtime on identical JSObjects. 294 // Call runtime on identical JSObjects.
296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 295 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
297 // Call runtime on identical symbols since we need to throw a TypeError. 296 // Call runtime on identical symbols since we need to throw a TypeError.
298 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
299 // Call runtime on identical SIMD values since we must throw a TypeError. 298 // Call runtime on identical SIMD values since we must throw a TypeError.
300 __ Branch(&not_simd, lt, t4, Operand(FIRST_SIMD_VALUE_TYPE)); 299 __ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE));
301 __ Branch(slow, le, t4, Operand(LAST_SIMD_VALUE_TYPE));
302 __ bind(&not_simd);
303 if (is_strong(strength)) { 300 if (is_strong(strength)) {
304 // Call the runtime on anything that is converted in the semantics, since 301 // Call the runtime on anything that is converted in the semantics, since
305 // we need to throw a TypeError. Smis have already been ruled out. 302 // we need to throw a TypeError. Smis have already been ruled out.
306 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE)); 303 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE));
307 __ And(t4, t4, Operand(kIsNotStringMask)); 304 __ And(t4, t4, Operand(kIsNotStringMask));
308 __ Branch(slow, ne, t4, Operand(zero_reg)); 305 __ Branch(slow, ne, t4, Operand(zero_reg));
309 } 306 }
310 } else { 307 } else {
311 Label not_simd;
312 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); 308 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
313 // Comparing JS objects with <=, >= is complicated. 309 // Comparing JS objects with <=, >= is complicated.
314 if (cc != eq) { 310 if (cc != eq) {
315 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 311 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
316 // Call runtime on identical symbols since we need to throw a TypeError. 312 // Call runtime on identical symbols since we need to throw a TypeError.
317 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 313 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
318 // Call runtime on identical SIMD values since we must throw a TypeError. 314 // Call runtime on identical SIMD values since we must throw a TypeError.
319 __ Branch(&not_simd, lt, t4, Operand(FIRST_SIMD_VALUE_TYPE)); 315 __ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE));
320 __ Branch(slow, le, t4, Operand(LAST_SIMD_VALUE_TYPE));
321 __ bind(&not_simd);
322 if (is_strong(strength)) { 316 if (is_strong(strength)) {
323 // Call the runtime on anything that is converted in the semantics, 317 // Call the runtime on anything that is converted in the semantics,
324 // since we need to throw a TypeError. Smis and heap numbers have 318 // since we need to throw a TypeError. Smis and heap numbers have
325 // already been ruled out. 319 // already been ruled out.
326 __ And(t4, t4, Operand(kIsNotStringMask)); 320 __ And(t4, t4, Operand(kIsNotStringMask));
327 __ Branch(slow, ne, t4, Operand(zero_reg)); 321 __ Branch(slow, ne, t4, Operand(zero_reg));
328 } 322 }
329 // Normally here we fall through to return_equal, but undefined is 323 // Normally here we fall through to return_equal, but undefined is
330 // special: (undefined == undefined) == true, but 324 // special: (undefined == undefined) == true, but
331 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 325 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5394 matching lines...) Expand 10 before | Expand all | Expand 10 after
5726 MemOperand(fp, 6 * kPointerSize), NULL); 5720 MemOperand(fp, 6 * kPointerSize), NULL);
5727 } 5721 }
5728 5722
5729 5723
5730 #undef __ 5724 #undef __
5731 5725
5732 } // namespace internal 5726 } // namespace internal
5733 } // namespace v8 5727 } // namespace v8
5734 5728
5735 #endif // V8_TARGET_ARCH_MIPS 5729 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/ic/ic-inl.h ('k') | src/mips/lithium-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698