OLD | NEW |
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 Loading... |
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 5252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5574 MemOperand(fp, 6 * kPointerSize), NULL); | 5578 MemOperand(fp, 6 * kPointerSize), NULL); |
5575 } | 5579 } |
5576 | 5580 |
5577 | 5581 |
5578 #undef __ | 5582 #undef __ |
5579 | 5583 |
5580 } // namespace internal | 5584 } // namespace internal |
5581 } // namespace v8 | 5585 } // namespace v8 |
5582 | 5586 |
5583 #endif // V8_TARGET_ARCH_MIPS | 5587 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |