OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/globals.h" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/code_generator.h" | 9 #include "vm/code_generator.h" |
10 #include "vm/compiler.h" | 10 #include "vm/compiler.h" |
(...skipping 1801 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1812 } | 1812 } |
1813 | 1813 |
1814 | 1814 |
1815 // Jump to the exception or error handler. | 1815 // Jump to the exception or error handler. |
1816 // LR: return address. | 1816 // LR: return address. |
1817 // R0: program_counter. | 1817 // R0: program_counter. |
1818 // R1: stack_pointer. | 1818 // R1: stack_pointer. |
1819 // R2: frame_pointer. | 1819 // R2: frame_pointer. |
1820 // R3: error object. | 1820 // R3: error object. |
1821 // R4: address of stacktrace object. | 1821 // R4: address of stacktrace object. |
| 1822 // R5: isolate. |
1822 // Does not return. | 1823 // Does not return. |
1823 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { | 1824 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
1824 ASSERT(kExceptionObjectReg == R0); | 1825 ASSERT(kExceptionObjectReg == R0); |
1825 ASSERT(kStackTraceObjectReg == R1); | 1826 ASSERT(kStackTraceObjectReg == R1); |
1826 __ mov(LR, R0); // Program counter. | 1827 __ mov(LR, R0); // Program counter. |
1827 __ mov(SP, R1); // Stack pointer. | 1828 __ mov(SP, R1); // Stack pointer. |
1828 __ mov(FP, R2); // Frame_pointer. | 1829 __ mov(FP, R2); // Frame_pointer. |
1829 __ mov(R0, R3); // Exception object. | 1830 __ mov(R0, R3); // Exception object. |
1830 __ mov(R1, R4); // StackTrace object. | 1831 __ mov(R1, R4); // StackTrace object. |
| 1832 // Set the tag. |
| 1833 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP); |
| 1834 __ StoreToOffset(R2, R5, Isolate::vm_tag_offset(), kNoPP); |
| 1835 // Clear top exit frame. |
| 1836 __ StoreToOffset(ZR, R5, Isolate::top_exit_frame_info_offset(), kNoPP); |
1831 __ ret(); // Jump to the exception handler code. | 1837 __ ret(); // Jump to the exception handler code. |
1832 } | 1838 } |
1833 | 1839 |
1834 | 1840 |
1835 // Calls to the runtime to optimize the given function. | 1841 // Calls to the runtime to optimize the given function. |
1836 // R6: function to be re-optimized. | 1842 // R6: function to be re-optimized. |
1837 // R4: argument descriptor (preserved). | 1843 // R4: argument descriptor (preserved). |
1838 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1844 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
1839 __ EnterStubFrame(); | 1845 __ EnterStubFrame(); |
1840 __ Push(R4); | 1846 __ Push(R4); |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1961 const Register right = R0; | 1967 const Register right = R0; |
1962 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); | 1968 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); |
1963 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); | 1969 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); |
1964 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1970 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
1965 __ ret(); | 1971 __ ret(); |
1966 } | 1972 } |
1967 | 1973 |
1968 } // namespace dart | 1974 } // namespace dart |
1969 | 1975 |
1970 #endif // defined TARGET_ARCH_ARM64 | 1976 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |