| 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 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 __ Branch(¬_identical, ne, a0, Operand(a1)); | 284 __ Branch(¬_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; |
| 294 // Call runtime on identical JSObjects. | 295 // Call runtime on identical JSObjects. |
| 295 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 296 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 296 // Call runtime on identical symbols since we need to throw a TypeError. | 297 // Call runtime on identical symbols since we need to throw a TypeError. |
| 297 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); | 298 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); |
| 298 // Call runtime on identical SIMD values since we must throw a TypeError. | 299 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 299 __ Branch(slow, eq, t4, Operand(FLOAT32X4_TYPE)); | 300 __ Branch(¬_simd, lt, t4, Operand(FIRST_SIMD_VALUE_TYPE)); |
| 301 __ Branch(slow, le, t4, Operand(LAST_SIMD_VALUE_TYPE)); |
| 302 __ bind(¬_simd); |
| 300 if (is_strong(strength)) { | 303 if (is_strong(strength)) { |
| 301 // Call the runtime on anything that is converted in the semantics, since | 304 // Call the runtime on anything that is converted in the semantics, since |
| 302 // we need to throw a TypeError. Smis have already been ruled out. | 305 // we need to throw a TypeError. Smis have already been ruled out. |
| 303 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE)); | 306 __ Branch(&return_equal, eq, t4, Operand(HEAP_NUMBER_TYPE)); |
| 304 __ And(t4, t4, Operand(kIsNotStringMask)); | 307 __ And(t4, t4, Operand(kIsNotStringMask)); |
| 305 __ Branch(slow, ne, t4, Operand(zero_reg)); | 308 __ Branch(slow, ne, t4, Operand(zero_reg)); |
| 306 } | 309 } |
| 307 } else { | 310 } else { |
| 311 Label not_simd; |
| 308 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); | 312 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); |
| 309 // Comparing JS objects with <=, >= is complicated. | 313 // Comparing JS objects with <=, >= is complicated. |
| 310 if (cc != eq) { | 314 if (cc != eq) { |
| 311 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); | 315 __ Branch(slow, greater, t4, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 312 // Call runtime on identical symbols since we need to throw a TypeError. | 316 // Call runtime on identical symbols since we need to throw a TypeError. |
| 313 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); | 317 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); |
| 314 // Call runtime on identical SIMD values since we must throw a TypeError. | 318 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 315 __ Branch(slow, eq, t4, Operand(FLOAT32X4_TYPE)); | 319 __ Branch(¬_simd, lt, t4, Operand(FIRST_SIMD_VALUE_TYPE)); |
| 320 __ Branch(slow, le, t4, Operand(LAST_SIMD_VALUE_TYPE)); |
| 321 __ bind(¬_simd); |
| 316 if (is_strong(strength)) { | 322 if (is_strong(strength)) { |
| 317 // Call the runtime on anything that is converted in the semantics, | 323 // Call the runtime on anything that is converted in the semantics, |
| 318 // since we need to throw a TypeError. Smis and heap numbers have | 324 // since we need to throw a TypeError. Smis and heap numbers have |
| 319 // already been ruled out. | 325 // already been ruled out. |
| 320 __ And(t4, t4, Operand(kIsNotStringMask)); | 326 __ And(t4, t4, Operand(kIsNotStringMask)); |
| 321 __ Branch(slow, ne, t4, Operand(zero_reg)); | 327 __ Branch(slow, ne, t4, Operand(zero_reg)); |
| 322 } | 328 } |
| 323 // Normally here we fall through to return_equal, but undefined is | 329 // Normally here we fall through to return_equal, but undefined is |
| 324 // special: (undefined == undefined) == true, but | 330 // special: (undefined == undefined) == true, but |
| 325 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 331 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| (...skipping 5394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5720 MemOperand(fp, 6 * kPointerSize), NULL); | 5726 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5721 } | 5727 } |
| 5722 | 5728 |
| 5723 | 5729 |
| 5724 #undef __ | 5730 #undef __ |
| 5725 | 5731 |
| 5726 } // namespace internal | 5732 } // namespace internal |
| 5727 } // namespace v8 | 5733 } // namespace v8 |
| 5728 | 5734 |
| 5729 #endif // V8_TARGET_ARCH_MIPS | 5735 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |