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

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

Issue 2374173002: Revert "Pass new pool pointer to the JumpToException stub instead of reloading in through the frame… (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
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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_X64) 6 #if defined(TARGET_ARCH_X64)
7 7
8 #include "vm/assembler.h" 8 #include "vm/assembler.h"
9 #include "vm/compiler.h" 9 #include "vm/compiler.h"
10 #include "vm/dart_entry.h" 10 #include "vm/dart_entry.h"
(...skipping 1823 matching lines...) Expand 10 before | Expand all | Expand 10 after
1834 1834
1835 1835
1836 // Jump to the exception or error handler. 1836 // Jump to the exception or error handler.
1837 // TOS + 0: return address 1837 // TOS + 0: return address
1838 // Arg1: program counter 1838 // Arg1: program counter
1839 // Arg2: stack pointer 1839 // Arg2: stack pointer
1840 // Arg3: frame_pointer 1840 // Arg3: frame_pointer
1841 // Arg4: exception object 1841 // Arg4: exception object
1842 // Arg5: stacktrace object 1842 // Arg5: stacktrace object
1843 // Arg6: thread 1843 // Arg6: thread
1844 // Arg7: pool pointer
1845 // No Result. 1844 // No Result.
1846 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1845 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1847 ASSERT(kExceptionObjectReg == RAX); 1846 ASSERT(kExceptionObjectReg == RAX);
1848 ASSERT(kStackTraceObjectReg == RDX); 1847 ASSERT(kStackTraceObjectReg == RDX);
1849 ASSERT(CallingConventions::kArg4Reg != kStackTraceObjectReg); 1848 ASSERT(CallingConventions::kArg4Reg != kStackTraceObjectReg);
1850 ASSERT(CallingConventions::kArg1Reg != kStackTraceObjectReg); 1849 ASSERT(CallingConventions::kArg1Reg != kStackTraceObjectReg);
1851 1850
1852 #if defined(_WIN64) 1851 #if defined(_WIN64)
1853 Register stacktrace_reg = RBX; 1852 Register stacktrace_reg = RBX;
1854 __ movq(stacktrace_reg, Address(RSP, 5 * kWordSize)); 1853 __ movq(stacktrace_reg, Address(RSP, 5 * kWordSize));
1855 __ movq(THR, Address(RSP, 6 * kWordSize)); 1854 __ movq(THR, Address(RSP, 6 * kWordSize));
1856 __ movq(PP, Address(RSP, 7 * kWordSize));
1857 #else 1855 #else
1858 Register stacktrace_reg = CallingConventions::kArg5Reg; 1856 Register stacktrace_reg = CallingConventions::kArg5Reg;
1859 __ movq(THR, CallingConventions::kArg6Reg); 1857 __ movq(THR, CallingConventions::kArg6Reg);
1860 __ movq(PP, Address(RSP, 1 * kWordSize));
1861 #endif 1858 #endif
1862 __ movq(RBP, CallingConventions::kArg3Reg); 1859 __ movq(RBP, CallingConventions::kArg3Reg);
1863 __ movq(RSP, CallingConventions::kArg2Reg); 1860 __ movq(RSP, CallingConventions::kArg2Reg);
1864 __ movq(kStackTraceObjectReg, stacktrace_reg); 1861 __ movq(kStackTraceObjectReg, stacktrace_reg);
1865 __ movq(kExceptionObjectReg, CallingConventions::kArg4Reg); 1862 __ movq(kExceptionObjectReg, CallingConventions::kArg4Reg);
1866 // Set the tag. 1863 // Set the tag.
1867 __ movq(Assembler::VMTagAddress(), Immediate(VMTag::kDartTagId)); 1864 __ movq(Assembler::VMTagAddress(), Immediate(VMTag::kDartTagId));
1868 // Clear top exit frame. 1865 // Clear top exit frame.
1869 __ movq(Address(THR, Thread::top_exit_frame_info_offset()), 1866 __ movq(Address(THR, Thread::top_exit_frame_info_offset()),
1870 Immediate(0)); 1867 Immediate(0));
1868 // Restore the pool pointer.
1869 __ RestoreCodePointer();
1870 __ LoadPoolPointer(PP);
1871 __ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code. 1871 __ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code.
1872 } 1872 }
1873 1873
1874 1874
1875 // Calls to the runtime to optimize the given function. 1875 // Calls to the runtime to optimize the given function.
1876 // RDI: function to be reoptimized. 1876 // RDI: function to be reoptimized.
1877 // R10: argument descriptor (preserved). 1877 // R10: argument descriptor (preserved).
1878 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1878 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1879 __ EnterStubFrame(); 1879 __ EnterStubFrame();
1880 __ pushq(R10); // Preserve args descriptor. 1880 __ pushq(R10); // Preserve args descriptor.
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
2245 } 2245 }
2246 2246
2247 2247
2248 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) { 2248 void StubCode::GenerateFrameAwaitingMaterializationStub(Assembler* assembler) {
2249 __ int3(); 2249 __ int3();
2250 } 2250 }
2251 2251
2252 } // namespace dart 2252 } // namespace dart
2253 2253
2254 #endif // defined TARGET_ARCH_X64 2254 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | tests/language/vm/lazy_deopt_with_exception_and_stacktrace_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698