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

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

Issue 393103002: Revert r38240 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | no next file » | 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) 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 1733 matching lines...) Expand 10 before | Expand all | Expand 10 after
1744 } 1744 }
1745 1745
1746 1746
1747 // Jump to the exception or error handler. 1747 // Jump to the exception or error handler.
1748 // TOS + 0: return address 1748 // TOS + 0: return address
1749 // Arg1: program counter 1749 // Arg1: program counter
1750 // Arg2: stack pointer 1750 // Arg2: stack pointer
1751 // Arg3: frame_pointer 1751 // Arg3: frame_pointer
1752 // Arg4: exception object 1752 // Arg4: exception object
1753 // Arg5: stacktrace object 1753 // Arg5: stacktrace object
1754 // Arg6: isolate
1755 // No Result. 1754 // No Result.
1756 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1755 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1757 ASSERT(kExceptionObjectReg == RAX); 1756 ASSERT(kExceptionObjectReg == RAX);
1758 ASSERT(kStackTraceObjectReg == RDX); 1757 ASSERT(kStackTraceObjectReg == RDX);
1759 ASSERT(CallingConventions::kArg4Reg != kStackTraceObjectReg); 1758 ASSERT(CallingConventions::kArg4Reg != kStackTraceObjectReg);
1760 ASSERT(CallingConventions::kArg1Reg != kStackTraceObjectReg); 1759 ASSERT(CallingConventions::kArg1Reg != kStackTraceObjectReg);
1761 1760
1762 #if defined(_WIN64) 1761 #if defined(_WIN64)
1763 Register stacktrace_reg = RBX; 1762 Register stacktrace_reg = RBX;
1764 __ movq(stacktrace_reg, Address(RSP, 5 * kWordSize)); 1763 __ movq(stacktrace_reg, Address(RSP, 5 * kWordSize));
1765 Register isolate_reg = RDI;
1766 __ movq(isolate_reg, Address(RSP, 6 * kWordSize));
1767 #else 1764 #else
1768 Register stacktrace_reg = CallingConventions::kArg5Reg; 1765 Register stacktrace_reg = CallingConventions::kArg5Reg;
1769 Register isolate_reg = CallingConventions::kArg6Reg;
1770 #endif 1766 #endif
1771 1767
1772 __ movq(RBP, CallingConventions::kArg3Reg); 1768 __ movq(RBP, CallingConventions::kArg3Reg);
1773 __ movq(RSP, CallingConventions::kArg2Reg); 1769 __ movq(RSP, CallingConventions::kArg2Reg);
1774 __ movq(kStackTraceObjectReg, stacktrace_reg); 1770 __ movq(kStackTraceObjectReg, stacktrace_reg);
1775 __ movq(kExceptionObjectReg, CallingConventions::kArg4Reg); 1771 __ movq(kExceptionObjectReg, CallingConventions::kArg4Reg);
1776 // Set the tag.
1777 __ movq(Address(isolate_reg, Isolate::vm_tag_offset()),
1778 Immediate(VMTag::kScriptTagId));
1779 // Clear top exit frame.
1780 __ movq(Address(isolate_reg, Isolate::top_exit_frame_info_offset()),
1781 Immediate(0));
1782 __ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code. 1772 __ jmp(CallingConventions::kArg1Reg); // Jump to the exception handler code.
1783 } 1773 }
1784 1774
1785 1775
1786 // Calls to the runtime to optimize the given function. 1776 // Calls to the runtime to optimize the given function.
1787 // RDI: function to be reoptimized. 1777 // RDI: function to be reoptimized.
1788 // R10: argument descriptor (preserved). 1778 // R10: argument descriptor (preserved).
1789 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1779 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1790 __ EnterStubFrame(); 1780 __ EnterStubFrame();
1791 __ LoadObject(R12, Object::null_object(), PP); 1781 __ LoadObject(R12, Object::null_object(), PP);
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 1901
1912 __ movq(left, Address(RSP, 2 * kWordSize)); 1902 __ movq(left, Address(RSP, 2 * kWordSize));
1913 __ movq(right, Address(RSP, 1 * kWordSize)); 1903 __ movq(right, Address(RSP, 1 * kWordSize));
1914 GenerateIdenticalWithNumberCheckStub(assembler, left, right); 1904 GenerateIdenticalWithNumberCheckStub(assembler, left, right);
1915 __ ret(); 1905 __ ret();
1916 } 1906 }
1917 1907
1918 } // namespace dart 1908 } // namespace dart
1919 1909
1920 #endif // defined TARGET_ARCH_X64 1910 #endif // defined TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698