| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
| 8 | 8 |
| 9 #include "src/bootstrapper.h" | 9 #include "src/bootstrapper.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4, | 716 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, a2, a3, a4, |
| 717 a5); | 717 a5); |
| 718 } | 718 } |
| 719 // Never falls through to here. | 719 // Never falls through to here. |
| 720 | 720 |
| 721 __ bind(&slow); | 721 __ bind(&slow); |
| 722 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, | 722 // Prepare for call to builtin. Push object pointers, a0 (lhs) first, |
| 723 // a1 (rhs) second. | 723 // a1 (rhs) second. |
| 724 __ Push(lhs, rhs); | 724 __ Push(lhs, rhs); |
| 725 // Figure out which native to call and setup the arguments. | 725 // Figure out which native to call and setup the arguments. |
| 726 Builtins::JavaScript native; | 726 if (cc == eq && strict()) { |
| 727 if (cc == eq) { | 727 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); |
| 728 native = strict() ? Builtins::STRICT_EQUALS : Builtins::EQUALS; | |
| 729 } else { | 728 } else { |
| 730 native = | 729 Builtins::JavaScript native; |
| 731 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; | 730 if (cc == eq) { |
| 732 int ncr; // NaN compare result. | 731 native = Builtins::EQUALS; |
| 733 if (cc == lt || cc == le) { | |
| 734 ncr = GREATER; | |
| 735 } else { | 732 } else { |
| 736 DCHECK(cc == gt || cc == ge); // Remaining cases. | 733 native = |
| 737 ncr = LESS; | 734 is_strong(strength()) ? Builtins::COMPARE_STRONG : Builtins::COMPARE; |
| 735 int ncr; // NaN compare result. |
| 736 if (cc == lt || cc == le) { |
| 737 ncr = GREATER; |
| 738 } else { |
| 739 DCHECK(cc == gt || cc == ge); // Remaining cases. |
| 740 ncr = LESS; |
| 741 } |
| 742 __ li(a0, Operand(Smi::FromInt(ncr))); |
| 743 __ push(a0); |
| 738 } | 744 } |
| 739 __ li(a0, Operand(Smi::FromInt(ncr))); | 745 |
| 740 __ push(a0); | 746 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
| 747 // tagged as a small integer. |
| 748 __ InvokeBuiltin(native, JUMP_FUNCTION); |
| 741 } | 749 } |
| 742 | 750 |
| 743 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | |
| 744 // tagged as a small integer. | |
| 745 __ InvokeBuiltin(native, JUMP_FUNCTION); | |
| 746 | |
| 747 __ bind(&miss); | 751 __ bind(&miss); |
| 748 GenerateMiss(masm); | 752 GenerateMiss(masm); |
| 749 } | 753 } |
| 750 | 754 |
| 751 | 755 |
| 752 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { | 756 void StoreRegistersStateStub::Generate(MacroAssembler* masm) { |
| 753 __ mov(t9, ra); | 757 __ mov(t9, ra); |
| 754 __ pop(ra); | 758 __ pop(ra); |
| 755 __ PushSafepointRegisters(); | 759 __ PushSafepointRegisters(); |
| 756 __ Jump(t9); | 760 __ Jump(t9); |
| (...skipping 4995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5752 MemOperand(fp, 6 * kPointerSize), NULL); | 5756 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5753 } | 5757 } |
| 5754 | 5758 |
| 5755 | 5759 |
| 5756 #undef __ | 5760 #undef __ |
| 5757 | 5761 |
| 5758 } // namespace internal | 5762 } // namespace internal |
| 5759 } // namespace v8 | 5763 } // namespace v8 |
| 5760 | 5764 |
| 5761 #endif // V8_TARGET_ARCH_MIPS64 | 5765 #endif // V8_TARGET_ARCH_MIPS64 |
| OLD | NEW |