| 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/bootstrapper.h" | 8 #include "src/bootstrapper.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
| (...skipping 3565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3576 __ Assert(eq, kExpectedAllocationSite); | 3576 __ Assert(eq, kExpectedAllocationSite); |
| 3577 } | 3577 } |
| 3578 | 3578 |
| 3579 // Tail call into the stub that handles binary operations with allocation | 3579 // Tail call into the stub that handles binary operations with allocation |
| 3580 // sites. | 3580 // sites. |
| 3581 BinaryOpWithAllocationSiteStub stub(isolate(), state()); | 3581 BinaryOpWithAllocationSiteStub stub(isolate(), state()); |
| 3582 __ TailCallStub(&stub); | 3582 __ TailCallStub(&stub); |
| 3583 } | 3583 } |
| 3584 | 3584 |
| 3585 | 3585 |
| 3586 void CompareICStub::GenerateBooleans(MacroAssembler* masm) { |
| 3587 DCHECK_EQ(CompareICState::BOOLEAN, state()); |
| 3588 Label miss; |
| 3589 |
| 3590 __ CheckMap(r4, r5, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
| 3591 __ CheckMap(r3, r6, Heap::kBooleanMapRootIndex, &miss, DO_SMI_CHECK); |
| 3592 if (op() != Token::EQ_STRICT && is_strong(strength())) { |
| 3593 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3594 } else { |
| 3595 if (!Token::IsEqualityOp(op())) { |
| 3596 __ LoadP(r4, FieldMemOperand(r4, Oddball::kToNumberOffset)); |
| 3597 __ AssertSmi(r4); |
| 3598 __ LoadP(r3, FieldMemOperand(r3, Oddball::kToNumberOffset)); |
| 3599 __ AssertSmi(r3); |
| 3600 } |
| 3601 __ sub(r3, r4, r3); |
| 3602 __ Ret(); |
| 3603 } |
| 3604 |
| 3605 __ bind(&miss); |
| 3606 GenerateMiss(masm); |
| 3607 } |
| 3608 |
| 3609 |
| 3586 void CompareICStub::GenerateSmis(MacroAssembler* masm) { | 3610 void CompareICStub::GenerateSmis(MacroAssembler* masm) { |
| 3587 DCHECK(state() == CompareICState::SMI); | 3611 DCHECK(state() == CompareICState::SMI); |
| 3588 Label miss; | 3612 Label miss; |
| 3589 __ orx(r5, r4, r3); | 3613 __ orx(r5, r4, r3); |
| 3590 __ JumpIfNotSmi(r5, &miss); | 3614 __ JumpIfNotSmi(r5, &miss); |
| 3591 | 3615 |
| 3592 if (GetCondition() == eq) { | 3616 if (GetCondition() == eq) { |
| 3593 // For equality we do not care about the sign of the result. | 3617 // For equality we do not care about the sign of the result. |
| 3594 // __ sub(r3, r3, r4, SetCC); | 3618 // __ sub(r3, r3, r4, SetCC); |
| 3595 __ sub(r3, r3, r4); | 3619 __ sub(r3, r3, r4); |
| (...skipping 2242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5838 kStackUnwindSpace, NULL, | 5862 kStackUnwindSpace, NULL, |
| 5839 MemOperand(fp, 6 * kPointerSize), NULL); | 5863 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5840 } | 5864 } |
| 5841 | 5865 |
| 5842 | 5866 |
| 5843 #undef __ | 5867 #undef __ |
| 5844 } // namespace internal | 5868 } // namespace internal |
| 5845 } // namespace v8 | 5869 } // namespace v8 |
| 5846 | 5870 |
| 5847 #endif // V8_TARGET_ARCH_PPC | 5871 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |