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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
8 #include "src/api-arguments.h" | 8 #include "src/api-arguments.h" |
9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), | 228 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), |
229 // so we do the second best thing - test it ourselves. | 229 // so we do the second best thing - test it ourselves. |
230 // They are both equal and they are not both Smis so both of them are not | 230 // They are both equal and they are not both Smis so both of them are not |
231 // Smis. If it's not a heap number, then return equal. | 231 // Smis. If it's not a heap number, then return equal. |
232 __ GetObjectType(a0, t4, t4); | 232 __ GetObjectType(a0, t4, t4); |
233 if (cc == less || cc == greater) { | 233 if (cc == less || cc == greater) { |
234 // Call runtime on identical JSObjects. | 234 // Call runtime on identical JSObjects. |
235 __ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE)); | 235 __ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE)); |
236 // Call runtime on identical symbols since we need to throw a TypeError. | 236 // Call runtime on identical symbols since we need to throw a TypeError. |
237 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); | 237 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); |
| 238 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 239 __ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE)); |
238 } else { | 240 } else { |
239 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); | 241 __ Branch(&heap_number, eq, t4, Operand(HEAP_NUMBER_TYPE)); |
240 // Comparing JS objects with <=, >= is complicated. | 242 // Comparing JS objects with <=, >= is complicated. |
241 if (cc != eq) { | 243 if (cc != eq) { |
242 __ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE)); | 244 __ Branch(slow, greater, t4, Operand(FIRST_JS_RECEIVER_TYPE)); |
243 // Call runtime on identical symbols since we need to throw a TypeError. | 245 // Call runtime on identical symbols since we need to throw a TypeError. |
244 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); | 246 __ Branch(slow, eq, t4, Operand(SYMBOL_TYPE)); |
| 247 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 248 __ Branch(slow, eq, t4, Operand(SIMD128_VALUE_TYPE)); |
245 // Normally here we fall through to return_equal, but undefined is | 249 // Normally here we fall through to return_equal, but undefined is |
246 // special: (undefined == undefined) == true, but | 250 // special: (undefined == undefined) == true, but |
247 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 251 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
248 if (cc == less_equal || cc == greater_equal) { | 252 if (cc == less_equal || cc == greater_equal) { |
249 __ Branch(&return_equal, ne, t4, Operand(ODDBALL_TYPE)); | 253 __ Branch(&return_equal, ne, t4, Operand(ODDBALL_TYPE)); |
250 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); | 254 __ LoadRoot(t2, Heap::kUndefinedValueRootIndex); |
251 __ Branch(&return_equal, ne, a0, Operand(t2)); | 255 __ Branch(&return_equal, ne, a0, Operand(t2)); |
252 DCHECK(is_int16(GREATER) && is_int16(LESS)); | 256 DCHECK(is_int16(GREATER) && is_int16(LESS)); |
253 __ Ret(USE_DELAY_SLOT); | 257 __ Ret(USE_DELAY_SLOT); |
254 if (cc == le) { | 258 if (cc == le) { |
(...skipping 3264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3519 kStackUnwindSpace, kInvalidStackOffset, | 3523 kStackUnwindSpace, kInvalidStackOffset, |
3520 return_value_operand, NULL); | 3524 return_value_operand, NULL); |
3521 } | 3525 } |
3522 | 3526 |
3523 #undef __ | 3527 #undef __ |
3524 | 3528 |
3525 } // namespace internal | 3529 } // namespace internal |
3526 } // namespace v8 | 3530 } // namespace v8 |
3527 | 3531 |
3528 #endif // V8_TARGET_ARCH_MIPS | 3532 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |