OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_MIPS64 | 5 #if V8_TARGET_ARCH_MIPS64 |
6 | 6 |
7 #include "src/bootstrapper.h" | 7 #include "src/bootstrapper.h" |
8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
10 #include "src/ic/handler-compiler.h" | 10 #include "src/ic/handler-compiler.h" |
(...skipping 3873 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3884 Label miss; | 3884 Label miss; |
3885 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); | 3885 Handle<WeakCell> cell = Map::WeakCellForMap(known_map_); |
3886 __ And(a2, a1, a0); | 3886 __ And(a2, a1, a0); |
3887 __ JumpIfSmi(a2, &miss); | 3887 __ JumpIfSmi(a2, &miss); |
3888 __ GetWeakValue(a4, cell); | 3888 __ GetWeakValue(a4, cell); |
3889 __ ld(a2, FieldMemOperand(a0, HeapObject::kMapOffset)); | 3889 __ ld(a2, FieldMemOperand(a0, HeapObject::kMapOffset)); |
3890 __ ld(a3, FieldMemOperand(a1, HeapObject::kMapOffset)); | 3890 __ ld(a3, FieldMemOperand(a1, HeapObject::kMapOffset)); |
3891 __ Branch(&miss, ne, a2, Operand(a4)); | 3891 __ Branch(&miss, ne, a2, Operand(a4)); |
3892 __ Branch(&miss, ne, a3, Operand(a4)); | 3892 __ Branch(&miss, ne, a3, Operand(a4)); |
3893 | 3893 |
3894 __ Ret(USE_DELAY_SLOT); | 3894 if (Token::IsEqualityOp(op())) { |
3895 __ dsubu(v0, a0, a1); | 3895 __ Ret(USE_DELAY_SLOT); |
| 3896 __ dsubu(v0, a0, a1); |
| 3897 } else if (is_strong(strength())) { |
| 3898 __ TailCallRuntime(Runtime::kThrowStrongModeImplicitConversion, 0, 1); |
| 3899 } else { |
| 3900 if (op() == Token::LT || op() == Token::LTE) { |
| 3901 __ li(a2, Operand(Smi::FromInt(GREATER))); |
| 3902 } else { |
| 3903 __ li(a2, Operand(Smi::FromInt(LESS))); |
| 3904 } |
| 3905 __ Push(a1, a0, a2); |
| 3906 __ TailCallRuntime(Runtime::kCompare, 3, 1); |
| 3907 } |
3896 | 3908 |
3897 __ bind(&miss); | 3909 __ bind(&miss); |
3898 GenerateMiss(masm); | 3910 GenerateMiss(masm); |
3899 } | 3911 } |
3900 | 3912 |
3901 | 3913 |
3902 void CompareICStub::GenerateMiss(MacroAssembler* masm) { | 3914 void CompareICStub::GenerateMiss(MacroAssembler* masm) { |
3903 { | 3915 { |
3904 // Call the runtime system in a fresh internal frame. | 3916 // Call the runtime system in a fresh internal frame. |
3905 FrameScope scope(masm, StackFrame::INTERNAL); | 3917 FrameScope scope(masm, StackFrame::INTERNAL); |
(...skipping 1857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5763 MemOperand(fp, 6 * kPointerSize), NULL); | 5775 MemOperand(fp, 6 * kPointerSize), NULL); |
5764 } | 5776 } |
5765 | 5777 |
5766 | 5778 |
5767 #undef __ | 5779 #undef __ |
5768 | 5780 |
5769 } // namespace internal | 5781 } // namespace internal |
5770 } // namespace v8 | 5782 } // namespace v8 |
5771 | 5783 |
5772 #endif // V8_TARGET_ARCH_MIPS64 | 5784 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |