OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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_ARM64 | 5 #if V8_TARGET_ARCH_ARM64 |
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 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
649 } | 649 } |
650 | 650 |
651 __ Bind(&slow); | 651 __ Bind(&slow); |
652 | 652 |
653 __ Push(lhs, rhs); | 653 __ Push(lhs, rhs); |
654 // Figure out which native to call and setup the arguments. | 654 // Figure out which native to call and setup the arguments. |
655 if (cond == eq) { | 655 if (cond == eq) { |
656 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, | 656 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
657 1); | 657 1); |
658 } else { | 658 } else { |
659 int context_index = is_strong(strength()) | |
660 ? Context::COMPARE_STRONG_BUILTIN_INDEX | |
661 : Context::COMPARE_BUILTIN_INDEX; | |
662 int ncr; // NaN compare result | 659 int ncr; // NaN compare result |
663 if ((cond == lt) || (cond == le)) { | 660 if ((cond == lt) || (cond == le)) { |
664 ncr = GREATER; | 661 ncr = GREATER; |
665 } else { | 662 } else { |
666 DCHECK((cond == gt) || (cond == ge)); // remaining cases | 663 DCHECK((cond == gt) || (cond == ge)); // remaining cases |
667 ncr = LESS; | 664 ncr = LESS; |
668 } | 665 } |
669 __ Mov(x10, Smi::FromInt(ncr)); | 666 __ Mov(x10, Smi::FromInt(ncr)); |
670 __ Push(x10); | 667 __ Push(x10); |
671 | 668 |
672 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 669 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
673 // tagged as a small integer. | 670 // tagged as a small integer. |
674 __ InvokeBuiltin(context_index, JUMP_FUNCTION); | 671 __ TailCallRuntime( |
| 672 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3, |
| 673 1); |
675 } | 674 } |
676 | 675 |
677 __ Bind(&miss); | 676 __ Bind(&miss); |
678 GenerateMiss(masm); | 677 GenerateMiss(masm); |
679 } | 678 } |
680 | 679 |
681 | 680 |
682 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 681 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
683 CPURegList saved_regs = kCallerSaved; | 682 CPURegList saved_regs = kCallerSaved; |
684 CPURegList saved_fp_regs = kCallerSavedFP; | 683 CPURegList saved_fp_regs = kCallerSavedFP; |
(...skipping 5300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5985 MemOperand(fp, 6 * kPointerSize), NULL); | 5984 MemOperand(fp, 6 * kPointerSize), NULL); |
5986 } | 5985 } |
5987 | 5986 |
5988 | 5987 |
5989 #undef __ | 5988 #undef __ |
5990 | 5989 |
5991 } // namespace internal | 5990 } // namespace internal |
5992 } // namespace v8 | 5991 } // namespace v8 |
5993 | 5992 |
5994 #endif // V8_TARGET_ARCH_ARM64 | 5993 #endif // V8_TARGET_ARCH_ARM64 |
OLD | NEW |