| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 5 #if V8_TARGET_ARCH_PPC |
| 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // so we do the second best thing - test it ourselves. | 198 // so we do the second best thing - test it ourselves. |
| 199 // They are both equal and they are not both Smis so both of them are not | 199 // They are both equal and they are not both Smis so both of them are not |
| 200 // Smis. If it's not a heap number, then return equal. | 200 // Smis. If it's not a heap number, then return equal. |
| 201 if (cond == lt || cond == gt) { | 201 if (cond == lt || cond == gt) { |
| 202 // Call runtime on identical JSObjects. | 202 // Call runtime on identical JSObjects. |
| 203 __ CompareObjectType(r3, r7, r7, FIRST_JS_RECEIVER_TYPE); | 203 __ CompareObjectType(r3, r7, r7, FIRST_JS_RECEIVER_TYPE); |
| 204 __ bge(slow); | 204 __ bge(slow); |
| 205 // Call runtime on identical symbols since we need to throw a TypeError. | 205 // Call runtime on identical symbols since we need to throw a TypeError. |
| 206 __ cmpi(r7, Operand(SYMBOL_TYPE)); | 206 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 207 __ beq(slow); | 207 __ beq(slow); |
| 208 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 209 __ cmpi(r7, Operand(SIMD128_VALUE_TYPE)); |
| 210 __ beq(slow); |
| 208 } else { | 211 } else { |
| 209 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); | 212 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); |
| 210 __ beq(&heap_number); | 213 __ beq(&heap_number); |
| 211 // Comparing JS objects with <=, >= is complicated. | 214 // Comparing JS objects with <=, >= is complicated. |
| 212 if (cond != eq) { | 215 if (cond != eq) { |
| 213 __ cmpi(r7, Operand(FIRST_JS_RECEIVER_TYPE)); | 216 __ cmpi(r7, Operand(FIRST_JS_RECEIVER_TYPE)); |
| 214 __ bge(slow); | 217 __ bge(slow); |
| 215 // Call runtime on identical symbols since we need to throw a TypeError. | 218 // Call runtime on identical symbols since we need to throw a TypeError. |
| 216 __ cmpi(r7, Operand(SYMBOL_TYPE)); | 219 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 217 __ beq(slow); | 220 __ beq(slow); |
| 221 // Call runtime on identical SIMD values since we must throw a TypeError. |
| 222 __ cmpi(r7, Operand(SIMD128_VALUE_TYPE)); |
| 223 __ beq(slow); |
| 218 // Normally here we fall through to return_equal, but undefined is | 224 // Normally here we fall through to return_equal, but undefined is |
| 219 // special: (undefined == undefined) == true, but | 225 // special: (undefined == undefined) == true, but |
| 220 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 226 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| 221 if (cond == le || cond == ge) { | 227 if (cond == le || cond == ge) { |
| 222 __ cmpi(r7, Operand(ODDBALL_TYPE)); | 228 __ cmpi(r7, Operand(ODDBALL_TYPE)); |
| 223 __ bne(&return_equal); | 229 __ bne(&return_equal); |
| 224 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); | 230 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); |
| 225 __ cmp(r3, r5); | 231 __ cmp(r3, r5); |
| 226 __ bne(&return_equal); | 232 __ bne(&return_equal); |
| 227 if (cond == le) { | 233 if (cond == le) { |
| (...skipping 3295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3523 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); | 3529 fp, (PropertyCallbackArguments::kReturnValueOffset + 3) * kPointerSize); |
| 3524 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, | 3530 CallApiFunctionAndReturn(masm, api_function_address, thunk_ref, |
| 3525 kStackUnwindSpace, NULL, return_value_operand, NULL); | 3531 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 3526 } | 3532 } |
| 3527 | 3533 |
| 3528 #undef __ | 3534 #undef __ |
| 3529 } // namespace internal | 3535 } // namespace internal |
| 3530 } // namespace v8 | 3536 } // namespace v8 |
| 3531 | 3537 |
| 3532 #endif // V8_TARGET_ARCH_PPC | 3538 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |