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

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

Issue 1219943002: Expose SIMD.Float32x4 type to Javascript. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Back out changes to include/v8.h Created 5 years, 5 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/messages.js ('k') | src/mips/full-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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Call runtime on identical JSObjects. 294 // Call runtime on identical JSObjects.
295 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 295 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
296 // 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.
297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
298 // Call runtime on identical SIMD values since we must throw a TypeError.
299 __ Branch(slow, eq, t4, Operand(FLOAT32X4_TYPE));
298 if (is_strong(strength)) { 300 if (is_strong(strength)) {
299 // 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
300 // 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.
301 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE)); 303 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE));
302 __ And(t4, t4, Operand(kIsNotStringMask)); 304 __ And(t4, t4, Operand(kIsNotStringMask));
303 __ Branch(slow, ne, t4, Operand(zero_reg)); 305 __ Branch(slow, ne, t4, Operand(zero_reg));
304 } 306 }
305 } else { 307 } else {
306 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); 308 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE));
307 // Comparing JS objects with <=, >= is complicated. 309 // Comparing JS objects with <=, >= is complicated.
308 if (cc != eq) { 310 if (cc != eq) {
309 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); 311 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE));
310 // 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.
311 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); 313 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE));
314 // Call runtime on identical SIMD values since we must throw a TypeError.
315 __ Branch(slow, eq, t4, Operand(FLOAT32X4_TYPE));
312 if (is_strong(strength)) { 316 if (is_strong(strength)) {
313 // Call the runtime on anything that is converted in the semantics, 317 // Call the runtime on anything that is converted in the semantics,
314 // 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
315 // already been ruled out. 319 // already been ruled out.
316 __ And(t4, t4, Operand(kIsNotStringMask)); 320 __ And(t4, t4, Operand(kIsNotStringMask));
317 __ Branch(slow, ne, t4, Operand(zero_reg)); 321 __ Branch(slow, ne, t4, Operand(zero_reg));
318 } 322 }
319 // Normally here we fall through to return_equal, but undefined is 323 // Normally here we fall through to return_equal, but undefined is
320 // special: (undefined == undefined) == true, but 324 // special: (undefined == undefined) == true, but
321 // (undefined <= undefined) == false! See ECMAScript 11.8.5. 325 // (undefined <= undefined) == false! See ECMAScript 11.8.5.
(...skipping 5253 matching lines...) Expand 10 before | Expand all | Expand 10 after
5575 MemOperand(fp, 6 * kPointerSize), NULL); 5579 MemOperand(fp, 6 * kPointerSize), NULL);
5576 } 5580 }
5577 5581
5578 5582
5579 #undef __ 5583 #undef __
5580 5584
5581 } // namespace internal 5585 } // namespace internal
5582 } // namespace v8 5586 } // namespace v8
5583 5587
5584 #endif // V8_TARGET_ARCH_MIPS 5588 #endif // V8_TARGET_ARCH_MIPS
OLDNEW
« no previous file with comments | « src/messages.js ('k') | src/mips/full-codegen-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698