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_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
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 713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 | 724 |
725 __ bind(&slow); | 725 __ bind(&slow); |
726 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, | 726 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, |
727 // a1 (rhs) second. | 727 // a1 (rhs) second. |
728 __ Push(lhs, rhs); | 728 __ Push(lhs, rhs); |
729 // Figure out which native to call and setup the arguments. | 729 // Figure out which native to call and setup the arguments. |
730 if (cc == eq) { | 730 if (cc == eq) { |
731 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, | 731 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
732 1); | 732 1); |
733 } else { | 733 } else { |
734 int context_index = is_strong(strength()) | |
735 ? Context::COMPARE_STRONG_BUILTIN_INDEX | |
736 : Context::COMPARE_BUILTIN_INDEX; | |
737 int ncr; // NaN compare result. | 734 int ncr; // NaN compare result. |
738 if (cc == lt || cc == le) { | 735 if (cc == lt || cc == le) { |
739 ncr = GREATER; | 736 ncr = GREATER; |
740 } else { | 737 } else { |
741 DCHECK(cc == gt || cc == ge); // Remaining cases. | 738 DCHECK(cc == gt || cc == ge); // Remaining cases. |
742 ncr = LESS; | 739 ncr = LESS; |
743 } | 740 } |
744 __ li(a0, Operand(Smi::FromInt(ncr))); | 741 __ li(a0, Operand(Smi::FromInt(ncr))); |
745 __ push(a0); | 742 __ push(a0); |
746 | 743 |
747 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 744 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
748 // tagged as a small integer. | 745 // tagged as a small integer. |
749 __ InvokeBuiltin(context_index, JUMP_FUNCTION); | 746 __ TailCallRuntime( |
| 747 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3, |
| 748 1); |
750 } | 749 } |
751 | 750 |
752 __ bind(&miss); | 751 __ bind(&miss); |
753 GenerateMiss(masm); | 752 GenerateMiss(masm); |
754 } | 753 } |
755 | 754 |
756 | 755 |
757 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { | 756 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { |
758 __ mov(t9, ra); | 757 __ mov(t9, ra); |
759 __ pop(ra); | 758 __ pop(ra); |
(...skipping 4978 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5738 MemOperand(fp, 6 * kPointerSize), NULL); | 5737 MemOperand(fp, 6 * kPointerSize), NULL); |
5739 } | 5738 } |
5740 | 5739 |
5741 | 5740 |
5742 #undef __ | 5741 #undef __ |
5743 | 5742 |
5744 } // namespace internal | 5743 } // namespace internal |
5745 } // namespace v8 | 5744 } // namespace v8 |
5746 | 5745 |
5747 #endif // V8_TARGET_ARCH_MIPS | 5746 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |