| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 255 __ cmp(r3, r4); | 255 __ cmp(r3, r4); |
| 256 __ bne(¬_identical); | 256 __ bne(¬_identical); |
| 257 | 257 |
| 258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), | 258 // Test for NaN. Sadly, we can't just compare to Factory::nan_value(), |
| 259 // so we do the second best thing - test it ourselves. | 259 // so we do the second best thing - test it ourselves. |
| 260 // They are both equal and they are not both Smis so both of them are not | 260 // They are both equal and they are not both Smis so both of them are not |
| 261 // Smis. If it's not a heap number, then return equal. | 261 // Smis. If it's not a heap number, then return equal. |
| 262 if (cond == lt || cond == gt) { | 262 if (cond == lt || cond == gt) { |
| 263 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); | 263 __ CompareObjectType(r3, r7, r7, FIRST_SPEC_OBJECT_TYPE); |
| 264 __ bge(slow); | 264 __ bge(slow); |
| 265 __ CompareObjectType(r3, r7, r7, SYMBOL_TYPE); | 265 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 266 __ beq(slow); | 266 __ beq(slow); |
| 267 } else { | 267 } else { |
| 268 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); | 268 __ CompareObjectType(r3, r7, r7, HEAP_NUMBER_TYPE); |
| 269 __ beq(&heap_number); | 269 __ beq(&heap_number); |
| 270 // Comparing JS objects with <=, >= is complicated. | 270 // Comparing JS objects with <=, >= is complicated. |
| 271 if (cond != eq) { | 271 if (cond != eq) { |
| 272 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); | 272 __ cmpi(r7, Operand(FIRST_SPEC_OBJECT_TYPE)); |
| 273 __ bge(slow); | 273 __ bge(slow); |
| 274 __ cmpi(r7, Operand(SYMBOL_TYPE)); |
| 275 __ beq(slow); |
| 274 // Normally here we fall through to return_equal, but undefined is | 276 // Normally here we fall through to return_equal, but undefined is |
| 275 // special: (undefined == undefined) == true, but | 277 // special: (undefined == undefined) == true, but |
| 276 // (undefined <= undefined) == false! See ECMAScript 11.8.5. | 278 // (undefined <= undefined) == false! See ECMAScript 11.8.5. |
| 277 if (cond == le || cond == ge) { | 279 if (cond == le || cond == ge) { |
| 278 __ cmpi(r7, Operand(ODDBALL_TYPE)); | 280 __ cmpi(r7, Operand(ODDBALL_TYPE)); |
| 279 __ bne(&return_equal); | 281 __ bne(&return_equal); |
| 280 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); | 282 __ LoadRoot(r5, Heap::kUndefinedValueRootIndex); |
| 281 __ cmp(r3, r5); | 283 __ cmp(r3, r5); |
| 282 __ bne(&return_equal); | 284 __ bne(&return_equal); |
| 283 if (cond == le) { | 285 if (cond == le) { |
| (...skipping 5298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5582 kStackUnwindSpace, NULL, | 5584 kStackUnwindSpace, NULL, |
| 5583 MemOperand(fp, 6 * kPointerSize), NULL); | 5585 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5584 } | 5586 } |
| 5585 | 5587 |
| 5586 | 5588 |
| 5587 #undef __ | 5589 #undef __ |
| 5588 } | 5590 } |
| 5589 } // namespace v8::internal | 5591 } // namespace v8::internal |
| 5590 | 5592 |
| 5591 #endif // V8_TARGET_ARCH_PPC | 5593 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |