Chromium Code Reviews| 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 1777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1788 } | 1788 } |
| 1789 | 1789 |
| 1790 | 1790 |
| 1791 // Jump to the exception or error handler. | 1791 // Jump to the exception or error handler. |
| 1792 // LR: return address. | 1792 // LR: return address. |
| 1793 // R0: program_counter. | 1793 // R0: program_counter. |
| 1794 // R1: stack_pointer. | 1794 // R1: stack_pointer. |
| 1795 // R2: frame_pointer. | 1795 // R2: frame_pointer. |
| 1796 // R3: error object. | 1796 // R3: error object. |
| 1797 // R4: address of stacktrace object. | 1797 // R4: address of stacktrace object. |
| 1798 // R5: isolate. | |
| 1798 // Does not return. | 1799 // Does not return. |
| 1799 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { | 1800 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { |
| 1800 ASSERT(kExceptionObjectReg == R0); | 1801 ASSERT(kExceptionObjectReg == R0); |
| 1801 ASSERT(kStackTraceObjectReg == R1); | 1802 ASSERT(kStackTraceObjectReg == R1); |
| 1802 __ mov(LR, R0); // Program counter. | 1803 __ mov(LR, R0); // Program counter. |
| 1803 __ mov(SP, R1); // Stack pointer. | 1804 __ mov(SP, R1); // Stack pointer. |
| 1804 __ mov(FP, R2); // Frame_pointer. | 1805 __ mov(FP, R2); // Frame_pointer. |
| 1805 __ mov(R0, R3); // Exception object. | 1806 __ mov(R0, R3); // Exception object. |
| 1806 __ mov(R1, R4); // StackTrace object. | 1807 __ mov(R1, R4); // StackTrace object. |
| 1808 __ mov(CTX, R5); // Isolate. | |
|
regis
2014/07/14 20:00:34
Why not use R5 below?
Cutch
2014/07/14 21:32:07
Done.
| |
| 1809 // Set the tag. | |
| 1810 __ LoadImmediate(R2, VMTag::kScriptTagId, kNoPP); | |
| 1811 __ StoreToOffset(R2, CTX, Isolate::vm_tag_offset(), kNoPP); | |
| 1812 // Clear top exit frame. | |
| 1813 __ StoreToOffset(ZR, CTX, Isolate::top_exit_frame_info_offset(), kNoPP); | |
| 1807 __ ret(); // Jump to the exception handler code. | 1814 __ ret(); // Jump to the exception handler code. |
| 1808 } | 1815 } |
| 1809 | 1816 |
| 1810 | 1817 |
| 1811 // Calls to the runtime to optimize the given function. | 1818 // Calls to the runtime to optimize the given function. |
| 1812 // R6: function to be re-optimized. | 1819 // R6: function to be re-optimized. |
| 1813 // R4: argument descriptor (preserved). | 1820 // R4: argument descriptor (preserved). |
| 1814 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { | 1821 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { |
| 1815 __ EnterStubFrame(); | 1822 __ EnterStubFrame(); |
| 1816 __ Push(R4); | 1823 __ Push(R4); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1937 const Register right = R0; | 1944 const Register right = R0; |
| 1938 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); | 1945 __ LoadFromOffset(left, SP, 1 * kWordSize, kNoPP); |
| 1939 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); | 1946 __ LoadFromOffset(right, SP, 0 * kWordSize, kNoPP); |
| 1940 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); | 1947 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); |
| 1941 __ ret(); | 1948 __ ret(); |
| 1942 } | 1949 } |
| 1943 | 1950 |
| 1944 } // namespace dart | 1951 } // namespace dart |
| 1945 | 1952 |
| 1946 #endif // defined TARGET_ARCH_ARM64 | 1953 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |