| 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. |
| 721 if (cc == eq) { | 725 if (cc == eq) { |
| 722 { | 726 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 723 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 724 __ Push(lhs, rhs); | |
| 725 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); | |
| 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. | |
| 732 } else { | 727 } else { |
| 733 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, | |
| 734 // a1 (rhs) second. | |
| 735 __ Push(lhs, rhs); | |
| 736 int ncr; // NaN compare result. | 728 int ncr; // NaN compare result. |
| 737 if (cc == lt || cc == le) { | 729 if (cc == lt || cc == le) { |
| 738 ncr = GREATER; | 730 ncr = GREATER; |
| 739 } else { | 731 } else { |
| 740 DCHECK(cc == gt || cc == ge); // Remaining cases. | 732 DCHECK(cc == gt || cc == ge); // Remaining cases. |
| 741 ncr = LESS; | 733 ncr = LESS; |
| 742 } | 734 } |
| 743 __ li(a0, Operand(Smi::FromInt(ncr))); | 735 __ li(a0, Operand(Smi::FromInt(ncr))); |
| 744 __ push(a0); | 736 __ push(a0); |
| 745 | 737 |
| (...skipping 5049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5795 return_value_operand, NULL); | 5787 return_value_operand, NULL); |
| 5796 } | 5788 } |
| 5797 | 5789 |
| 5798 | 5790 |
| 5799 #undef __ | 5791 #undef __ |
| 5800 | 5792 |
| 5801 } // namespace internal | 5793 } // namespace internal |
| 5802 } // namespace v8 | 5794 } // namespace v8 |
| 5803 | 5795 |
| 5804 #endif // V8_TARGET_ARCH_MIPS | 5796 #endif // V8_TARGET_ARCH_MIPS |
| OLD | NEW |