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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
664 if (cc == eq) { | 664 if (cc == eq) { |
665 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, r2, r3, r4); | 665 StringHelper::GenerateFlatOneByteStringEquals(masm, lhs, rhs, r2, r3, r4); |
666 } else { | 666 } else { |
667 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4, | 667 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4, |
668 r5); | 668 r5); |
669 } | 669 } |
670 // Never falls through to here. | 670 // Never falls through to here. |
671 | 671 |
672 __ bind(&slow); | 672 __ bind(&slow); |
673 | 673 |
674 __ Push(lhs, rhs); | |
675 // Figure out which native to call and setup the arguments. | |
676 if (cc == eq) { | 674 if (cc == eq) { |
677 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); | 675 { |
| 676 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); |
| 677 __ Push(lhs, rhs); |
| 678 __ CallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 679 } |
| 680 // Turn true into 0 and false into some non-zero value. |
| 681 STATIC_ASSERT(EQUAL == 0); |
| 682 __ LoadRoot(r1, Heap::kTrueValueRootIndex); |
| 683 __ sub(r0, r0, r1); |
| 684 __ Ret(); |
678 } else { | 685 } else { |
| 686 __ Push(lhs, rhs); |
679 int ncr; // NaN compare result | 687 int ncr; // NaN compare result |
680 if (cc == lt || cc == le) { | 688 if (cc == lt || cc == le) { |
681 ncr = GREATER; | 689 ncr = GREATER; |
682 } else { | 690 } else { |
683 DCHECK(cc == gt || cc == ge); // remaining cases | 691 DCHECK(cc == gt || cc == ge); // remaining cases |
684 ncr = LESS; | 692 ncr = LESS; |
685 } | 693 } |
686 __ mov(r0, Operand(Smi::FromInt(ncr))); | 694 __ mov(r0, Operand(Smi::FromInt(ncr))); |
687 __ push(r0); | 695 __ push(r0); |
688 | 696 |
(...skipping 4923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5612 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5620 kStackUnwindSpace, NULL, return_value_operand, NULL); |
5613 } | 5621 } |
5614 | 5622 |
5615 | 5623 |
5616 #undef __ | 5624 #undef __ |
5617 | 5625 |
5618 } // namespace internal | 5626 } // namespace internal |
5619 } // namespace v8 | 5627 } // namespace v8 |
5620 | 5628 |
5621 #endif // V8_TARGET_ARCH_ARM | 5629 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |