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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « runtime/vm/simulator_mips.cc ('k') | runtime/vm/stub_code_ia32.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/compiler.h" 10 #include "vm/compiler.h"
(...skipping 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after
1467 1467
1468 1468
1469 // Return the current stack pointer address, used to stack alignment 1469 // Return the current stack pointer address, used to stack alignment
1470 // checks. 1470 // checks.
1471 void StubCode::GenerateGetStackPointerStub(Assembler* assembler) { 1471 void StubCode::GenerateGetStackPointerStub(Assembler* assembler) {
1472 __ Unimplemented("GetStackPointer Stub"); 1472 __ Unimplemented("GetStackPointer Stub");
1473 } 1473 }
1474 1474
1475 1475
1476 // Jump to the exception handler. 1476 // Jump to the exception handler.
1477 // No Result. 1477 // LR: return address.
1478 // R0: program_counter.
1479 // R1: stack_pointer.
1480 // R2: frame_pointer.
1481 // R3: error object.
1482 // SP: address of stacktrace object.
1483 // Does not return.
1478 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) { 1484 void StubCode::GenerateJumpToExceptionHandlerStub(Assembler* assembler) {
1479 __ Unimplemented("JumpToExceptionHandler Stub"); 1485 ASSERT(kExceptionObjectReg == R0);
1486 ASSERT(kStackTraceObjectReg == R1);
1487 __ mov(IP, ShifterOperand(R1)); // Stack pointer.
1488 __ mov(LR, ShifterOperand(R0)); // Program counter.
1489 __ mov(R0, ShifterOperand(R3)); // Exception object.
1490 __ ldr(R1, Address(SP, 0)); // StackTrace object.
1491 __ mov(FP, ShifterOperand(R2)); // Frame_pointer.
1492 __ mov(SP, ShifterOperand(IP)); // Stack pointer.
1493 __ bx(LR); // Jump to the exception handler code.
1480 } 1494 }
1481 1495
1482 1496
1483 // Jump to the error handler. 1497 // Jump to the error handler.
1484 // No Result. 1498 // LR: return address.
1499 // R0: program_counter.
1500 // R1: stack_pointer.
1501 // R2: frame_pointer.
1502 // R3: error object.
1503 // Does not return.
1485 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) { 1504 void StubCode::GenerateJumpToErrorHandlerStub(Assembler* assembler) {
1486 __ Unimplemented("JumpToErrorHandler Stub"); 1505 ASSERT(kExceptionObjectReg == R0);
1506 __ mov(LR, ShifterOperand(R0)); // Program counter.
1507 __ mov(R0, ShifterOperand(R3)); // Error object.
1508 __ mov(FP, ShifterOperand(R2)); // Frame_pointer.
1509 __ mov(SP, ShifterOperand(R1)); // Stack pointer.
1510 __ bx(LR); // Jump to the exception handler code.
1487 } 1511 }
1488 1512
1489 1513
1490 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) { 1514 void StubCode::GenerateEqualityWithNullArgStub(Assembler* assembler) {
1491 __ Unimplemented("EqualityWithNullArg Stub"); 1515 __ Unimplemented("EqualityWithNullArg Stub");
1492 } 1516 }
1493 1517
1494 1518
1495 // Calls to the runtime to optimize the given function. 1519 // Calls to the runtime to optimize the given function.
1496 // R6: function to be reoptimized. 1520 // R6: function to be reoptimized.
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
1594 __ Bind(&reference_compare); 1618 __ Bind(&reference_compare);
1595 __ cmp(left, ShifterOperand(right)); 1619 __ cmp(left, ShifterOperand(right));
1596 __ Bind(&done); 1620 __ Bind(&done);
1597 __ PopList((1 << R0) | (1 << R1) | (1 << R2)); 1621 __ PopList((1 << R0) | (1 << R1) | (1 << R2));
1598 __ Ret(); 1622 __ Ret();
1599 } 1623 }
1600 1624
1601 } // namespace dart 1625 } // namespace dart
1602 1626
1603 #endif // defined TARGET_ARCH_ARM 1627 #endif // defined TARGET_ARCH_ARM
OLDNEW
« 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