| 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 697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 a3); | 708 a3); |
| 709 if (cc == eq) { | 709 if (cc == eq) { |
| 710 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, a2, a3, a4); | 710 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, a2, a3, a4); |
| 711 } else { | 711 } else { |
| 712 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4, | 712 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4, |
| 713 a5); | 713 a5); |
| 714 } | 714 } |
| 715 // Never falls through to here. | 715 // Never falls through to here. |
| 716 | 716 |
| 717 __ bind(&slow); | 717 __ bind(&slow); |
| 718 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, |
| 719 // a1 (rhs) second. |
| 720 __ Push(lhs, rhs); |
| 721 // Figure out which native to call and setup the arguments. |
| 718 if (cc == eq) { | 722 if (cc == eq) { |
| 719 { | 723 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 720 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 721 __ Push(lhs, rhs); | |
| 722 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); | |
| 723 } | |
| 724 // Turn true into 0 and false into some non-zero value. | |
| 725 STATIC_ASSERT(EQUAL == 0); | |
| 726 __ LoadRoot(a0, Heap::kTrueValueRootIndex); | |
| 727 __ Ret(USE_DELAY_SLOT); | |
| 728 __ subu(v0, v0, a0); // In delay slot. | |
| 729 } else { | 724 } else { |
| 730 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, | |
| 731 // a1 (rhs) second. | |
| 732 __ Push(lhs, rhs); | |
| 733 int ncr; // NaN compare result. | 725 int ncr; // NaN compare result. |
| 734 if (cc == lt || cc == le) { | 726 if (cc == lt || cc == le) { |
| 735 ncr = GREATER; | 727 ncr = GREATER; |
| 736 } else { | 728 } else { |
| 737 DCHECK(cc == gt || cc == ge); // Remaining cases. | 729 DCHECK(cc == gt || cc == ge); // Remaining cases. |
| 738 ncr = LESS; | 730 ncr = LESS; |
| 739 } | 731 } |
| 740 __ li(a0, Operand(Smi::FromInt(ncr))); | 732 __ li(a0, Operand(Smi::FromInt(ncr))); |
| 741 __ push(a0); | 733 __ push(a0); |
| 742 | 734 |
| (...skipping 5080 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5823 return_value_operand, NULL); | 5815 return_value_operand, NULL); |
| 5824 } | 5816 } |
| 5825 | 5817 |
| 5826 | 5818 |
| 5827 #undef __ | 5819 #undef __ |
| 5828 | 5820 |
| 5829 } // namespace internal | 5821 } // namespace internal |
| 5830 } // namespace v8 | 5822 } // namespace v8 |
| 5831 | 5823 |
| 5832 #endif // V8_TARGET_ARCH_MIPS64 | 5824 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |