| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
| 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/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 // They are both equal and they are not both Smis so both of them are not | 156 // They are both equal and they are not both Smis so both of them are not |
| 157 // Smis. If it's not a heap number, then return equal. | 157 // Smis. If it's not a heap number, then return equal. |
| 158 Register right_type = scratch; | 158 Register right_type = scratch; |
| 159 if ((cond == lt) || (cond == gt)) { | 159 if ((cond == lt) || (cond == gt)) { |
| 160 // Call runtime on identical JSObjects. Otherwise return equal. | 160 // Call runtime on identical JSObjects. Otherwise return equal. |
| 161 __ JumpIfObjectType(right, right_type, right_type, FIRST_JS_RECEIVER_TYPE, | 161 __ JumpIfObjectType(right, right_type, right_type, FIRST_JS_RECEIVER_TYPE, |
| 162 slow, ge); | 162 slow, ge); |
| 163 // Call runtime on identical symbols since we need to throw a TypeError. | 163 // Call runtime on identical symbols since we need to throw a TypeError. |
| 164 __ Cmp(right_type, SYMBOL_TYPE); | 164 __ Cmp(right_type, SYMBOL_TYPE); |
| 165 __ B(eq, slow); | 165 __ B(eq, slow); |
| 166 // Call runtime on identical SIMD values since we must throw a TypeError. | |
| 167 __ Cmp(right_type, SIMD128_VALUE_TYPE); | |
| 168 __ B(eq, slow); | |
| 169 } else if (cond == eq) { | 166 } else if (cond == eq) { |
| 170 __ JumpIfHeapNumber(right, &heap_number); | 167 __ JumpIfHeapNumber(right, &heap_number); |
| 171 } else { | 168 } else { |
| 172 __ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE, | 169 __ JumpIfObjectType(right, right_type, right_type, HEAP_NUMBER_TYPE, |
| 173 &heap_number); | 170 &heap_number); |
| 174 // Comparing JS objects with <=, >= is complicated. | 171 // Comparing JS objects with <=, >= is complicated. |
| 175 __ Cmp(right_type, FIRST_JS_RECEIVER_TYPE); | 172 __ Cmp(right_type, FIRST_JS_RECEIVER_TYPE); |
| 176 __ B(ge, slow); | 173 __ B(ge, slow); |
| 177 // Call runtime on identical symbols since we need to throw a TypeError. | 174 // Call runtime on identical symbols since we need to throw a TypeError. |
| 178 __ Cmp(right_type, SYMBOL_TYPE); | 175 __ Cmp(right_type, SYMBOL_TYPE); |
| 179 __ B(eq, slow); | 176 __ B(eq, slow); |
| 180 // Call runtime on identical SIMD values since we must throw a TypeError. | |
| 181 __ Cmp(right_type, SIMD128_VALUE_TYPE); | |
| 182 __ B(eq, slow); | |
| 183 // Normally here we fall through to return_equal, but undefined is | 177 // Normally here we fall through to return_equal, but undefined is |
| 184 // special: (undefined == undefined) == true, but | 178 // special: (undefined == undefined) == true, but |
| 185 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 179 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| 186 if ((cond == le) || (cond == ge)) { | 180 if ((cond == le) || (cond == ge)) { |
| 187 __ Cmp(right_type, ODDBALL_TYPE); | 181 __ Cmp(right_type, ODDBALL_TYPE); |
| 188 __ B(ne, &return_equal); | 182 __ B(ne, &return_equal); |
| 189 __ JumpIfNotRoot(right, Heap::kUndefinedValueRootIndex, &return_equal); | 183 __ JumpIfNotRoot(right, Heap::kUndefinedValueRootIndex, &return_equal); |
| 190 if (cond == le) { | 184 if (cond == le) { |
| 191 // undefined <= undefined should fail. | 185 // undefined <= undefined should fail. |
| 192 __ Mov(result, GREATER); | 186 __ Mov(result, GREATER); |
| (...skipping 3416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3609 kStackUnwindSpace, NULL, spill_offset, | 3603 kStackUnwindSpace, NULL, spill_offset, |
| 3610 return_value_operand, NULL); | 3604 return_value_operand, NULL); |
| 3611 } | 3605 } |
| 3612 | 3606 |
| 3613 #undef __ | 3607 #undef __ |
| 3614 | 3608 |
| 3615 } // namespace internal | 3609 } // namespace internal |
| 3616 } // namespace v8 | 3610 } // namespace v8 |
| 3617 | 3611 |
| 3618 #endif // V8_TARGET_ARCH_ARM64 | 3612 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |