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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 14309004: Implement long jump in ARM and MIPS simulators. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm.cc
===================================================================
--- runtime/vm/stub_code_arm.cc (revision 21676)
+++ runtime/vm/stub_code_arm.cc (working copy)
@@ -1474,16 +1474,40 @@
// Jump to the exception handler.
-// No Result.
+// LR: return address.
+// R0: program_counter.
+// R1: stack_pointer.
+// R2: frame_pointer.
+// R3: error object.
+// SP: address of stacktrace object.
+// Does not return.
void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
- __ Unimplemented("JumpToExceptionHandler Stub");
+ ASSERT(kExceptionObjectReg == R0);
+ ASSERT(kStackTraceObjectReg == R1);
+ __ mov(IP, ShifterOperand(R1)); // Stack pointer.
+ __ mov(LR, ShifterOperand(R0)); // Program counter.
+ __ mov(R0, ShifterOperand(R3)); // Exception object.
+ __ ldr(R1, Address(SP, 0)); // StackTrace object.
+ __ mov(FP, ShifterOperand(R2)); // Frame_pointer.
+ __ mov(SP, ShifterOperand(IP)); // Stack pointer.
+ __ bx(LR); // Jump to the exception handler code.
}
// Jump to the error handler.
-// No Result.
+// LR: return address.
+// R0: program_counter.
+// R1: stack_pointer.
+// R2: frame_pointer.
+// R3: error object.
+// Does not return.
void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) {
- __ Unimplemented("JumpToErrorHandler Stub");
+ ASSERT(kExceptionObjectReg == R0);
+ __ mov(LR, ShifterOperand(R0)); // Program counter.
+ __ mov(R0, ShifterOperand(R3)); // Error object.
+ __ mov(FP, ShifterOperand(R2)); // Frame_pointer.
+ __ mov(SP, ShifterOperand(R1)); // Stack pointer.
+ __ bx(LR); // Jump to the exception handler code.
}
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698