| 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 663 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 } else { | 674 } else { |
| 675 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4, | 675 StringHelper::GenerateCompareFlatOneByteStrings(masm, lhs, rhs, r2, r3, r4, |
| 676 r5); | 676 r5); |
| 677 } | 677 } |
| 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 && strict()) { | 684 if (cc == eq) { |
| 685 __ TailCallRuntime(Runtime::kStrictEquals, 2, 1); | 685 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals, 2, |
| 686 1); |
| 686 } else { | 687 } else { |
| 687 int context_index; | 688 int context_index = is_strong(strength()) |
| 688 if (cc == eq) { | 689 ? Context::COMPARE_STRONG_BUILTIN_INDEX |
| 689 context_index = Context::EQUALS_BUILTIN_INDEX; | 690 : Context::COMPARE_BUILTIN_INDEX; |
| 691 int ncr; // NaN compare result |
| 692 if (cc == lt || cc == le) { |
| 693 ncr = GREATER; |
| 690 } else { | 694 } else { |
| 691 context_index = is_strong(strength()) | 695 DCHECK(cc == gt || cc == ge); // remaining cases |
| 692 ? Context::COMPARE_STRONG_BUILTIN_INDEX | 696 ncr = LESS; |
| 693 : Context::COMPARE_BUILTIN_INDEX; | |
| 694 int ncr; // NaN compare result | |
| 695 if (cc == lt || cc == le) { | |
| 696 ncr = GREATER; | |
| 697 } else { | |
| 698 DCHECK(cc == gt || cc == ge); // remaining cases | |
| 699 ncr = LESS; | |
| 700 } | |
| 701 __ mov(r0, Operand(Smi::FromInt(ncr))); | |
| 702 __ push(r0); | |
| 703 } | 697 } |
| 698 __ mov(r0, Operand(Smi::FromInt(ncr))); |
| 699 __ push(r0); |
| 704 | 700 |
| 705 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) | 701 // Call the native; it returns -1 (less), 0 (equal), or 1 (greater) |
| 706 // tagged as a small integer. | 702 // tagged as a small integer. |
| 707 __ InvokeBuiltin(context_index, JUMP_FUNCTION); | 703 __ InvokeBuiltin(context_index, JUMP_FUNCTION); |
| 708 } | 704 } |
| 709 | 705 |
| 710 __ bind(&miss); | 706 __ bind(&miss); |
| 711 GenerateMiss(masm); | 707 GenerateMiss(masm); |
| 712 } | 708 } |
| 713 | 709 |
| (...skipping 4841 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5555 MemOperand(fp, 6 * kPointerSize), NULL); | 5551 MemOperand(fp, 6 * kPointerSize), NULL); |
| 5556 } | 5552 } |
| 5557 | 5553 |
| 5558 | 5554 |
| 5559 #undef __ | 5555 #undef __ |
| 5560 | 5556 |
| 5561 } // namespace internal | 5557 } // namespace internal |
| 5562 } // namespace v8 | 5558 } // namespace v8 |
| 5563 | 5559 |
| 5564 #endif // V8_TARGET_ARCH_ARM | 5560 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |