| 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 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 x12, x13); | 621 x12, x13); |
| 622 } | 622 } |
| 623 | 623 |
| 624 // Never fall through to here. | 624 // Never fall through to here. |
| 625 if (FLAG_debug_code) { | 625 if (FLAG_debug_code) { |
| 626 __ Unreachable(); | 626 __ Unreachable(); |
| 627 } | 627 } |
| 628 | 628 |
| 629 __ Bind(&slow); | 629 __ Bind(&slow); |
| 630 | 630 |
| 631 __ Push(lhs, rhs); |
| 632 // Figure out which native to call and setup the arguments. |
| 631 if (cond == eq) { | 633 if (cond == eq) { |
| 632 { | 634 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 633 FrameScope scope(masm, StackFrame::INTERNAL); | |
| 634 __ Push(lhs, rhs); | |
| 635 __ CallRuntime(strict() ? Runtime::kStrictEqual : Runtime::kEqual); | |
| 636 } | |
| 637 // Turn true into 0 and false into some non-zero value. | |
| 638 STATIC_ASSERT(EQUAL == 0); | |
| 639 __ LoadRoot(x1, Heap::kTrueValueRootIndex); | |
| 640 __ Sub(x0, x0, x1); | |
| 641 __ Ret(); | |
| 642 } else { | 635 } else { |
| 643 __ Push(lhs, rhs); | |
| 644 int ncr; // NaN compare result | 636 int ncr; // NaN compare result |
| 645 if ((cond == lt) || (cond == le)) { | 637 if ((cond == lt) || (cond == le)) { |
| 646 ncr = GREATER; | 638 ncr = GREATER; |
| 647 } else { | 639 } else { |
| 648 DCHECK((cond == gt) || (cond == ge)); // remaining cases | 640 DCHECK((cond == gt) || (cond == ge)); // remaining cases |
| 649 ncr = LESS; | 641 ncr = LESS; |
| 650 } | 642 } |
| 651 __ Mov(x10, Smi::FromInt(ncr)); | 643 __ Mov(x10, Smi::FromInt(ncr)); |
| 652 __ Push(x10); | 644 __ Push(x10); |
| 653 | 645 |
| (...skipping 5349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6003 return_value_operand, NULL); | 5995 return_value_operand, NULL); |
| 6004 } | 5996 } |
| 6005 | 5997 |
| 6006 | 5998 |
| 6007 #undef __ | 5999 #undef __ |
| 6008 | 6000 |
| 6009 } // namespace internal | 6001 } // namespace internal |
| 6010 } // namespace v8 | 6002 } // namespace v8 |
| 6011 | 6003 |
| 6012 #endif // V8_TARGET_ARCH_ARM64 | 6004 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |