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

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

Issue 395233002: Move some isolate state setup from C++ code to JumpToExceptionHandler stub (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.cc ('k') | runtime/vm/stub_code_arm64.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_ARM) 6 #if defined(TARGET_ARCH_ARM)
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/cpu.h" 10 #include "vm/cpu.h"
(...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after
1705 __ Ret(); 1705 __ Ret();
1706 } 1706 }
1707 1707
1708 1708
1709 // Jump to the exception or error handler. 1709 // Jump to the exception or error handler.
1710 // LR: return address. 1710 // LR: return address.
1711 // R0: program_counter. 1711 // R0: program_counter.
1712 // R1: stack_pointer. 1712 // R1: stack_pointer.
1713 // R2: frame_pointer. 1713 // R2: frame_pointer.
1714 // R3: error object. 1714 // R3: error object.
1715 // SP: address of stacktrace object. 1715 // SP + 0: address of stacktrace object.
1716 // SP + 4: isolate
1716 // Does not return. 1717 // Does not return.
1717 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1718 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1718 ASSERT(kExceptionObjectReg == R0); 1719 ASSERT(kExceptionObjectReg == R0);
1719 ASSERT(kStackTraceObjectReg == R1); 1720 ASSERT(kStackTraceObjectReg == R1);
1720 __ mov(IP, Operand(R1)); // Stack pointer. 1721 __ mov(IP, Operand(R1)); // Copy Stack pointer into IP.
1721 __ mov(LR, Operand(R0)); // Program counter. 1722 __ mov(LR, Operand(R0)); // Program counter.
1722 __ mov(R0, Operand(R3)); // Exception object. 1723 __ mov(R0, Operand(R3)); // Exception object.
1723 __ ldr(R1, Address(SP, 0)); // StackTrace object. 1724 __ ldr(R1, Address(SP, 0)); // StackTrace object.
1725 __ ldr(R3, Address(SP, 4)); // Isolate.
1724 __ mov(FP, Operand(R2)); // Frame_pointer. 1726 __ mov(FP, Operand(R2)); // Frame_pointer.
1725 __ mov(SP, Operand(IP)); // Stack pointer. 1727 __ mov(SP, Operand(IP)); // Set Stack pointer.
1728 // Set the tag.
1729 __ LoadImmediate(R2, VMTag::kScriptTagId);
1730 __ StoreToOffset(kWord, R2, R3, Isolate::vm_tag_offset());
1731 // Clear top exit frame.
1732 __ LoadImmediate(R2, 0);
1733 __ StoreToOffset(kWord, R2, R3, Isolate::top_exit_frame_info_offset());
1726 __ bx(LR); // Jump to the exception handler code. 1734 __ bx(LR); // Jump to the exception handler code.
1727 } 1735 }
1728 1736
1729 1737
1730 // Calls to the runtime to optimize the given function. 1738 // Calls to the runtime to optimize the given function.
1731 // R6: function to be reoptimized. 1739 // R6: function to be reoptimized.
1732 // R4: argument descriptor (preserved). 1740 // R4: argument descriptor (preserved).
1733 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) { 1741 void StubCode::GenerateOptimizeFunctionStub(Assembler* assembler) {
1734 __ EnterStubFrame(); 1742 __ EnterStubFrame();
1735 __ Push(R4); 1743 __ Push(R4);
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
1864 const Register right = R0; 1872 const Register right = R0;
1865 __ ldr(left, Address(SP, 1 * kWordSize)); 1873 __ ldr(left, Address(SP, 1 * kWordSize));
1866 __ ldr(right, Address(SP, 0 * kWordSize)); 1874 __ ldr(right, Address(SP, 0 * kWordSize));
1867 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp); 1875 GenerateIdenticalWithNumberCheckStub(assembler, left, right, temp);
1868 __ Ret(); 1876 __ Ret();
1869 } 1877 }
1870 1878
1871 } // namespace dart 1879 } // namespace dart
1872 1880
1873 #endif // defined TARGET_ARCH_ARM 1881 #endif // defined TARGET_ARCH_ARM
OLDNEW
« no previous file with comments | « runtime/vm/stub_code.cc ('k') | runtime/vm/stub_code_arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698