Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: runtime/vm/stub_code_arm64.cc

Issue 2376843002: Pass new pool pointer to the JumpToException stub instead of reloading in through the frame's Code … (Closed)
Patch Set: . Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1861 matching lines...) Expand 10 before | Expand all | Expand 10 after
1872 1872
1873 1873
1874 // Jump to the exception or error handler. 1874 // Jump to the exception or error handler.
1875 // LR: return address. 1875 // LR: return address.
1876 // R0: program_counter. 1876 // R0: program_counter.
1877 // R1: stack_pointer. 1877 // R1: stack_pointer.
1878 // R2: frame_pointer. 1878 // R2: frame_pointer.
1879 // R3: error object. 1879 // R3: error object.
1880 // R4: address of stacktrace object. 1880 // R4: address of stacktrace object.
1881 // R5: thread. 1881 // R5: thread.
1882 // R6: pool pointer.
1882 // Does not return. 1883 // Does not return.
1883 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1884 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1884 ASSERT(kExceptionObjectReg == R0); 1885 ASSERT(kExceptionObjectReg == R0);
1885 ASSERT(kStackTraceObjectReg == R1); 1886 ASSERT(kStackTraceObjectReg == R1);
1886 __ mov(LR, R0); // Program counter. 1887 __ mov(LR, R0); // Program counter.
1887 __ mov(SP, R1); // Stack pointer. 1888 __ mov(SP, R1); // Stack pointer.
1888 __ mov(FP, R2); // Frame_pointer. 1889 __ mov(FP, R2); // Frame_pointer.
1889 __ mov(R0, R3); // Exception object. 1890 __ mov(R0, R3); // Exception object.
1890 __ mov(R1, R4); // StackTrace object. 1891 __ mov(R1, R4); // StackTrace object.
1891 __ mov(THR, R5); 1892 __ mov(THR, R5);
1893 // When in the PP register, the pool pointer is untagged.
1894 __ sub(PP, R6, Operand(kHeapObjectTag));
1892 // Set the tag. 1895 // Set the tag.
1893 __ LoadImmediate(R2, VMTag::kDartTagId); 1896 __ LoadImmediate(R2, VMTag::kDartTagId);
1894 __ StoreToOffset(R2, THR, Thread::vm_tag_offset()); 1897 __ StoreToOffset(R2, THR, Thread::vm_tag_offset());
1895 // Clear top exit frame. 1898 // Clear top exit frame.
1896 __ StoreToOffset(ZR, THR, Thread::top_exit_frame_info_offset()); 1899 __ StoreToOffset(ZR, THR, Thread::top_exit_frame_info_offset());
1897 // Restore the pool pointer.
1898 __ RestoreCodePointer();
1899 __ LoadPoolPointer();
1900 __ ret(); // Jump to the exception handler code. 1900 __ ret(); // Jump to the exception handler code.
1901 } 1901 }
1902 1902
1903 1903
1904 // Calls to the runtime to optimize the given function. 1904 // Calls to the runtime to optimize the given function.
1905 // R6: function to be re-optimized. 1905 // R6: function to be re-optimized.
1906 // R4: argument descriptor (preserved). 1906 // R4: argument descriptor (preserved).
1907 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1907 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1908 __ EnterStubFrame(); 1908 __ EnterStubFrame();
1909 __ Push(R4); 1909 __ Push(R4);
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
2275 } 2275 }
2276 2276
2277 2277
2278 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2278 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2279 __ brk(0); 2279 __ brk(0);
2280 } 2280 }
2281 2281
2282 } // namespace dart 2282 } // namespace dart
2283 2283
2284 #endif // defined TARGET_ARCH_ARM64 2284 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698