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 3875 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3886 __ and_(r5, r4, r3); | 3886 __ and_(r5, r4, r3); |
3887 __ JumpIfSmi(r5, &miss); | 3887 __ JumpIfSmi(r5, &miss); |
3888 __ GetWeakValue(r7, cell); | 3888 __ GetWeakValue(r7, cell); |
3889 __ LoadP(r5, FieldMemOperand(r3, HeapObject::kMapOffset)); | 3889 __ LoadP(r5, FieldMemOperand(r3, HeapObject::kMapOffset)); |
3890 __ LoadP(r6, FieldMemOperand(r4, HeapObject::kMapOffset)); | 3890 __ LoadP(r6, FieldMemOperand(r4, HeapObject::kMapOffset)); |
3891 __ cmp(r5, r7); | 3891 __ cmp(r5, r7); |
3892 __ bne(&miss); | 3892 __ bne(&miss); |
3893 __ cmp(r6, r7); | 3893 __ cmp(r6, r7); |
3894 __ bne(&miss); | 3894 __ bne(&miss); |
3895 | 3895 |
3896 __ sub(r3, r3, r4); | 3896 if (Token::IsEqualityOp(op())) { |
3897 __ Ret(); | 3897 __ sub(r3, r3, r4); |
| 3898 __ Ret(); |
| 3899 } else if (is_strong(strength())) { |
| 3900 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3901 } else { |
| 3902 if (op() == Token::LT || op() == Token::LTE) { |
| 3903 __ LoadSmiLiteral(r5, Smi::FromInt(GREATER)); |
| 3904 } else { |
| 3905 __ LoadSmiLiteral(r5, Smi::FromInt(LESS)); |
| 3906 } |
| 3907 __ Push(r4, r3, r5); |
| 3908 __ TailCallRuntime(Runtime::kCompare, 3, 1); |
| 3909 } |
3898 | 3910 |
3899 __ bind(&miss); | 3911 __ bind(&miss); |
3900 GenerateMiss(masm); | 3912 GenerateMiss(masm); |
3901 } | 3913 } |
3902 | 3914 |
3903 | 3915 |
3904 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 3916 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
3905 { | 3917 { |
3906 // Call the runtime system in a fresh internal frame. | 3918 // Call the runtime system in a fresh internal frame. |
3907 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | 3919 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
(...skipping 1930 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5838 kStackUnwindSpace, NULL, | 5850 kStackUnwindSpace, NULL, |
5839 MemOperand(fp, 6 * kPointerSize), NULL); | 5851 MemOperand(fp, 6 * kPointerSize), NULL); |
5840 } | 5852 } |
5841 | 5853 |
5842 | 5854 |
5843 #undef __ | 5855 #undef __ |
5844 } // namespace internal | 5856 } // namespace internal |
5845 } // namespace v8 | 5857 } // namespace v8 |
5846 | 5858 |
5847 #endif // V8_TARGET_ARCH_PPC | 5859 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |