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

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

Issue 390223003: Revert r38216 (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_arm64.cc ('k') | runtime/vm/stub_code_mips.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) 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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 1768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1779 } 1779 }
1780 1780
1781 1781
1782 // Jump to the exception or error handler. 1782 // Jump to the exception or error handler.
1783 // TOS + 0: return address 1783 // TOS + 0: return address
1784 // TOS + 1: program_counter 1784 // TOS + 1: program_counter
1785 // TOS + 2: stack_pointer 1785 // TOS + 2: stack_pointer
1786 // TOS + 3: frame_pointer 1786 // TOS + 3: frame_pointer
1787 // TOS + 4: exception object 1787 // TOS + 4: exception object
1788 // TOS + 5: stacktrace object 1788 // TOS + 5: stacktrace object
1789 // TOS + 6: isolate
1790 // No Result. 1789 // No Result.
1791 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1790 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1792 ASSERT(kExceptionObjectReg == EAX); 1791 ASSERT(kExceptionObjectReg == EAX);
1793 ASSERT(kStackTraceObjectReg == EDX); 1792 ASSERT(kStackTraceObjectReg == EDX);
1794 __ movl(EDI, Address(ESP, 6 * kWordSize)); // Load target isolate.
1795 __ movl(kStackTraceObjectReg, Address(ESP, 5 * kWordSize)); 1793 __ movl(kStackTraceObjectReg, Address(ESP, 5 * kWordSize));
1796 __ movl(kExceptionObjectReg, Address(ESP, 4 * kWordSize)); 1794 __ movl(kExceptionObjectReg, Address(ESP, 4 * kWordSize));
1797 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer. 1795 __ movl(EBP, Address(ESP, 3 * kWordSize)); // Load target frame_pointer.
1798 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX. 1796 __ movl(EBX, Address(ESP, 1 * kWordSize)); // Load target PC into EBX.
1799 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer. 1797 __ movl(ESP, Address(ESP, 2 * kWordSize)); // Load target stack_pointer.
1800 // Set tag.
1801 __ movl(Address(EDI, Isolate::vm_tag_offset()),
1802 Immediate(VMTag::kScriptTagId));
1803 // Clear top exit frame.
1804 __ movl(Address(EDI, Isolate::top_exit_frame_info_offset()), Immediate(0));
1805 __ jmp(EBX); // Jump to the exception handler code. 1798 __ jmp(EBX); // Jump to the exception handler code.
1806 } 1799 }
1807 1800
1808 1801
1809 // Calls to the runtime to optimize the given function. 1802 // Calls to the runtime to optimize the given function.
1810 // EDI: function to be reoptimized. 1803 // EDI: function to be reoptimized.
1811 // EDX: argument descriptor (preserved). 1804 // EDX: argument descriptor (preserved).
1812 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1805 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1813 const Immediate& raw_null = 1806 const Immediate& raw_null =
1814 Immediate(reinterpret_cast<intptr_t>(Object::null())); 1807 Immediate(reinterpret_cast<intptr_t>(Object::null()));
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
1941 const Register temp = ECX; 1934 const Register temp = ECX;
1942 __ movl(left, Address(ESP, 2 * kWordSize)); 1935 __ movl(left, Address(ESP, 2 * kWordSize));
1943 __ movl(right, Address(ESP, 1 * kWordSize)); 1936 __ movl(right, Address(ESP, 1 * kWordSize));
1944 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 1937 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
1945 __ ret(); 1938 __ ret();
1946 } 1939 }
1947 1940
1948 } // namespace dart 1941 } // namespace dart
1949 1942
1950 #endif // defined TARGET_ARCH_IA32 1943 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698