| 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM64 | 7 #if V8_TARGET_ARCH_ARM64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/division-by-constant.h" | 10 #include "src/base/division-by-constant.h" |
| (...skipping 1736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1747 CallStub(&stub); | 1747 CallStub(&stub); |
| 1748 } | 1748 } |
| 1749 | 1749 |
| 1750 | 1750 |
| 1751 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { | 1751 static int AddressOffset(ExternalReference ref0, ExternalReference ref1) { |
| 1752 return ref0.address() - ref1.address(); | 1752 return ref0.address() - ref1.address(); |
| 1753 } | 1753 } |
| 1754 | 1754 |
| 1755 | 1755 |
| 1756 void MacroAssembler::CallApiFunctionAndReturn( | 1756 void MacroAssembler::CallApiFunctionAndReturn( |
| 1757 Register function_address, | 1757 Register function_address, ExternalReference thunk_ref, int stack_space, |
| 1758 ExternalReference thunk_ref, | 1758 MemOperand* stack_space_operand, int spill_offset, |
| 1759 int stack_space, | 1759 MemOperand return_value_operand, MemOperand* context_restore_operand) { |
| 1760 int spill_offset, | |
| 1761 MemOperand return_value_operand, | |
| 1762 MemOperand* context_restore_operand) { | |
| 1763 ASM_LOCATION("CallApiFunctionAndReturn"); | 1760 ASM_LOCATION("CallApiFunctionAndReturn"); |
| 1764 ExternalReference next_address = | 1761 ExternalReference next_address = |
| 1765 ExternalReference::handle_scope_next_address(isolate()); | 1762 ExternalReference::handle_scope_next_address(isolate()); |
| 1766 const int kNextOffset = 0; | 1763 const int kNextOffset = 0; |
| 1767 const int kLimitOffset = AddressOffset( | 1764 const int kLimitOffset = AddressOffset( |
| 1768 ExternalReference::handle_scope_limit_address(isolate()), | 1765 ExternalReference::handle_scope_limit_address(isolate()), |
| 1769 next_address); | 1766 next_address); |
| 1770 const int kLevelOffset = AddressOffset( | 1767 const int kLevelOffset = AddressOffset( |
| 1771 ExternalReference::handle_scope_level_address(isolate()), | 1768 ExternalReference::handle_scope_level_address(isolate()), |
| 1772 next_address); | 1769 next_address); |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1864 Mov(x5, ExternalReference::scheduled_exception_address(isolate())); | 1861 Mov(x5, ExternalReference::scheduled_exception_address(isolate())); |
| 1865 Ldr(x5, MemOperand(x5)); | 1862 Ldr(x5, MemOperand(x5)); |
| 1866 JumpIfNotRoot(x5, Heap::kTheHoleValueRootIndex, &promote_scheduled_exception); | 1863 JumpIfNotRoot(x5, Heap::kTheHoleValueRootIndex, &promote_scheduled_exception); |
| 1867 Bind(&exception_handled); | 1864 Bind(&exception_handled); |
| 1868 | 1865 |
| 1869 bool restore_context = context_restore_operand != NULL; | 1866 bool restore_context = context_restore_operand != NULL; |
| 1870 if (restore_context) { | 1867 if (restore_context) { |
| 1871 Ldr(cp, *context_restore_operand); | 1868 Ldr(cp, *context_restore_operand); |
| 1872 } | 1869 } |
| 1873 | 1870 |
| 1871 if (stack_space_operand != NULL) { |
| 1872 Ldr(w2, *stack_space_operand); |
| 1873 } |
| 1874 |
| 1874 LeaveExitFrame(false, x1, !restore_context); | 1875 LeaveExitFrame(false, x1, !restore_context); |
| 1875 Drop(stack_space); | 1876 if (stack_space_operand != NULL) { |
| 1877 Drop(x2, 1); |
| 1878 } else { |
| 1879 Drop(stack_space); |
| 1880 } |
| 1876 Ret(); | 1881 Ret(); |
| 1877 | 1882 |
| 1878 Bind(&promote_scheduled_exception); | 1883 Bind(&promote_scheduled_exception); |
| 1879 { | 1884 { |
| 1880 FrameScope frame(this, StackFrame::INTERNAL); | 1885 FrameScope frame(this, StackFrame::INTERNAL); |
| 1881 CallExternalReference( | 1886 CallExternalReference( |
| 1882 ExternalReference( | 1887 ExternalReference( |
| 1883 Runtime::kPromoteScheduledException, isolate()), 0); | 1888 Runtime::kPromoteScheduledException, isolate()), 0); |
| 1884 } | 1889 } |
| 1885 B(&exception_handled); | 1890 B(&exception_handled); |
| (...skipping 3507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5393 } | 5398 } |
| 5394 } | 5399 } |
| 5395 | 5400 |
| 5396 | 5401 |
| 5397 #undef __ | 5402 #undef __ |
| 5398 | 5403 |
| 5399 | 5404 |
| 5400 } } // namespace v8::internal | 5405 } } // namespace v8::internal |
| 5401 | 5406 |
| 5402 #endif // V8_TARGET_ARCH_ARM64 | 5407 #endif // V8_TARGET_ARCH_ARM64 |
| OLD | NEW |