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 576 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 __ SmiUntag(r3); | 587 __ SmiUntag(r3); |
588 __ sub(r3, r4, r3); | 588 __ sub(r3, r4, r3); |
589 __ Ret(); | 589 __ Ret(); |
590 __ bind(¬_two_smis); | 590 __ bind(¬_two_smis); |
591 | 591 |
592 // NOTICE! This code is only reached after a smi-fast-case check, so | 592 // NOTICE! This code is only reached after a smi-fast-case check, so |
593 // it is certain that at least one operand isn't a smi. | 593 // it is certain that at least one operand isn't a smi. |
594 | 594 |
595 // Handle the case where the objects are identical. Either returns the answer | 595 // Handle the case where the objects are identical. Either returns the answer |
596 // or goes to slow. Only falls through if the objects were not identical. | 596 // or goes to slow. Only falls through if the objects were not identical. |
597 EmitIdenticalObjectComparison(masm, &slow, cc); | 597 EmitIdenticalObjectComparison(masm, &slow, cc, strong()); |
598 | 598 |
599 // If either is a Smi (we know that not both are), then they can only | 599 // If either is a Smi (we know that not both are), then they can only |
600 // be strictly equal if the other is a HeapNumber. | 600 // be strictly equal if the other is a HeapNumber. |
601 STATIC_ASSERT(kSmiTag == 0); | 601 STATIC_ASSERT(kSmiTag == 0); |
602 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); | 602 DCHECK_EQ(static_cast<Smi*>(0), Smi::FromInt(0)); |
603 __ and_(r5, lhs, rhs); | 603 __ and_(r5, lhs, rhs); |
604 __ JumpIfNotSmi(r5, ¬_smis); | 604 __ JumpIfNotSmi(r5, ¬_smis); |
605 // One operand is a smi. EmitSmiNonsmiComparison generates code that can: | 605 // One operand is a smi. EmitSmiNonsmiComparison generates code that can: |
606 // 1) Return the answer. | 606 // 1) Return the answer. |
607 // 2) Go to slow. | 607 // 2) Go to slow. |
(...skipping 4999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5607 kStackUnwindSpace, NULL, | 5607 kStackUnwindSpace, NULL, |
5608 MemOperand(fp, 6 * kPointerSize), NULL); | 5608 MemOperand(fp, 6 * kPointerSize), NULL); |
5609 } | 5609 } |
5610 | 5610 |
5611 | 5611 |
5612 #undef __ | 5612 #undef __ |
5613 } | 5613 } |
5614 } // namespace v8::internal | 5614 } // namespace v8::internal |
5615 | 5615 |
5616 #endif // V8_TARGET_ARCH_PPC | 5616 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |