| 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. | |
| 633 if (cond == eq) { | 631 if (cond == eq) { |
| 634 __ TailCallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); | 632 { |
| 633 FrameScope scope(masm, StackFrame::INTERNAL); |
| 634 __ Push(lhs, rhs); |
| 635 __ CallRuntime(strict() ? Runtime::kStrictEquals : Runtime::kEquals); |
| 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(); |
| 635 } else { | 642 } else { |
| 643 __ Push(lhs, rhs); |
| 636 int ncr; // NaN compare result | 644 int ncr; // NaN compare result |
| 637 if ((cond == lt) || (cond == le)) { | 645 if ((cond == lt) || (cond == le)) { |
| 638 ncr = GREATER; | 646 ncr = GREATER; |
| 639 } else { | 647 } else { |
| 640 DCHECK((cond == gt) || (cond == ge)); // remaining cases | 648 DCHECK((cond == gt) || (cond == ge)); // remaining cases |
| 641 ncr = LESS; | 649 ncr = LESS; |
| 642 } | 650 } |
| 643 __ Mov(x10, Smi::FromInt(ncr)); | 651 __ Mov(x10, Smi::FromInt(ncr)); |
| 644 __ Push(x10); | 652 __ Push(x10); |
| 645 | 653 |
| (...skipping 5349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5995 return_value_operand, NULL); | 6003 return_value_operand, NULL); |
| 5996 } | 6004 } |
| 5997 | 6005 |
| 5998 | 6006 |
| 5999 #undef __ | 6007 #undef __ |
| 6000 | 6008 |
| 6001 } // namespace internal | 6009 } // namespace internal |
| 6002 } // namespace v8 | 6010 } // namespace v8 |
| 6003 | 6011 |
| 6004 #endif // V8_TARGET_ARCH_ARM64 | 6012 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |