| 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. |
| 674 if (cc == eq) { | 676 if (cc == eq) { |
| 675 { | 677 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 676 FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL); | |
| 677 __ Push(lhs, rhs); | |
| 678 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); | |
| 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(); | |
| 685 } else { | 678 } else { |
| 686 __ Push(lhs, rhs); | |
| 687 int ncr; // NaN compare result | 679 int ncr; // NaN compare result |
| 688 if (cc == lt || cc == le) { | 680 if (cc == lt || cc == le) { |
| 689 ncr = GREATER; | 681 ncr = GREATER; |
| 690 } else { | 682 } else { |
| 691 DCHECK(cc == gt || cc == ge); // remaining cases | 683 DCHECK(cc == gt || cc == ge); // remaining cases |
| 692 ncr = LESS; | 684 ncr = LESS; |
| 693 } | 685 } |
| 694 __ mov(r0, Operand(Smi::FromInt(ncr))); | 686 __ mov(r0, Operand(Smi::FromInt(ncr))); |
| 695 __ push(r0); | 687 __ push(r0); |
| 696 | 688 |
| (...skipping 4923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5620 kStackUnwindSpace, NULL, return_value_operand, NULL); | 5612 kStackUnwindSpace, NULL, return_value_operand, NULL); |
| 5621 } | 5613 } |
| 5622 | 5614 |
| 5623 | 5615 |
| 5624 #undef __ | 5616 #undef __ |
| 5625 | 5617 |
| 5626 } // namespace internal | 5618 } // namespace internal |
| 5627 } // namespace v8 | 5619 } // namespace v8 |
| 5628 | 5620 |
| 5629 #endif // V8_TARGET_ARCH_ARM | 5621 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |