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 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 a3); | 711 a3); |
712 if (cc == eq) { | 712 if (cc == eq) { |
713 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, a2, a3, t0); | 713 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, a2, a3, t0); |
714 } else { | 714 } else { |
715 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0, | 715 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, t0, |
716 t1); | 716 t1); |
717 } | 717 } |
718 // Never falls through to here. | 718 // Never falls through to here. |
719 | 719 |
720 __ bind(&slow); | 720 __ bind(&slow); |
721 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, | |
722 // a1 (rhs) second. | |
723 __ Push(lhs, rhs); | |
724 // Figure out which native to call and setup the arguments. | |
725 if (cc == eq) { | 721 if (cc == eq) { |
726 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); | 722 { |
| 723 FrameScope scope(masm, StackFrame::INTERNAL); |
| 724 __ Push(lhs, rhs); |
| 725 __ CallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 726 } |
| 727 // Turn true into 0 and false into some non-zero value. |
| 728 STATIC_ASSERT(EQUAL == 0); |
| 729 __ LoadRoot(a0, Heap::kTrueValueRootIndex); |
| 730 __ Ret(USE_DELAY_SLOT); |
| 731 __ subu(v0, v0, a0); // In delay slot. |
727 } else { | 732 } else { |
| 733 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, |
| 734 // a1 (rhs) second. |
| 735 __ Push(lhs, rhs); |
728 int ncr; // NaN compare result. | 736 int ncr; // NaN compare result. |
729 if (cc == lt || cc == le) { | 737 if (cc == lt || cc == le) { |
730 ncr = GREATER; | 738 ncr = GREATER; |
731 } else { | 739 } else { |
732 DCHECK(cc == gt || cc == ge); // Remaining cases. | 740 DCHECK(cc == gt || cc == ge); // Remaining cases. |
733 ncr = LESS; | 741 ncr = LESS; |
734 } | 742 } |
735 __ li(a0, Operand(Smi::FromInt(ncr))); | 743 __ li(a0, Operand(Smi::FromInt(ncr))); |
736 __ push(a0); | 744 __ push(a0); |
737 | 745 |
(...skipping 5049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5787 return_value_operand, NULL); | 5795 return_value_operand, NULL); |
5788 } | 5796 } |
5789 | 5797 |
5790 | 5798 |
5791 #undef __ | 5799 #undef __ |
5792 | 5800 |
5793 } // namespace internal | 5801 } // namespace internal |
5794 } // namespace v8 | 5802 } // namespace v8 |
5795 | 5803 |
5796 #endif // V8_TARGET_ARCH_MIPS | 5804 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |