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_ARM | 5 #if V8_TARGET_ARCH_ARM |
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 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
678 // Never falls through to here. | 678 // Never falls through to here. |
679 | 679 |
680 __ bind(&slow); | 680 __ bind(&slow); |
681 | 681 |
682 __ Push(lhs, rhs); | 682 __ Push(lhs, rhs); |
683 // Figure out which native to call and setup the arguments. | 683 // Figure out which native to call and setup the arguments. |
684 if (cc == eq) { | 684 if (cc == eq) { |
685 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, | 685 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
686 1); | 686 1); |
687 } else { | 687 } else { |
688 int context_index = is_strong(strength()) | |
689 ? Context::COMPARE_STRONG_BUILTIN_INDEX | |
690 : Context::COMPARE_BUILTIN_INDEX; | |
691 int ncr; // NaN compare result | 688 int ncr; // NaN compare result |
692 if (cc == lt || cc == le) { | 689 if (cc == lt || cc == le) { |
693 ncr = GREATER; | 690 ncr = GREATER; |
694 } else { | 691 } else { |
695 DCHECK(cc == gt || cc == ge); // remaining cases | 692 DCHECK(cc == gt || cc == ge); // remaining cases |
696 ncr = LESS; | 693 ncr = LESS; |
697 } | 694 } |
698 __ mov(r0, Operand(Smi::FromInt(ncr))); | 695 __ mov(r0, Operand(Smi::FromInt(ncr))); |
699 __ push(r0); | 696 __ push(r0); |
700 | 697 |
701 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 698 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
702 // tagged as a small integer. | 699 // tagged as a small integer. |
703 __ InvokeBuiltin(context_index, JUMP_FUNCTION); | 700 __ TailCallRuntime( |
| 701 is_strong(strength()) ? Runtime::kCompare_Strong : Runtime::kCompare, 3, |
| 702 1); |
704 } | 703 } |
705 | 704 |
706 __ bind(&miss); | 705 __ bind(&miss); |
707 GenerateMiss(masm); | 706 GenerateMiss(masm); |
708 } | 707 } |
709 | 708 |
710 | 709 |
711 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { | 710 void StoreBufferOverflowStub::Generate(MacroAssembler* masm) { |
712 // We don't allow a GC during a store buffer overflow so there is no need to | 711 // We don't allow a GC during a store buffer overflow so there is no need to |
713 // store the registers in any particular way, but we do have to store and | 712 // store the registers in any particular way, but we do have to store and |
(...skipping 4825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5539 MemOperand(fp, 6 * kPointerSize), NULL); | 5538 MemOperand(fp, 6 * kPointerSize), NULL); |
5540 } | 5539 } |
5541 | 5540 |
5542 | 5541 |
5543 #undef __ | 5542 #undef __ |
5544 | 5543 |
5545 } // namespace internal | 5544 } // namespace internal |
5546 } // namespace v8 | 5545 } // namespace v8 |
5547 | 5546 |
5548 #endif // V8_TARGET_ARCH_ARM | 5547 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |