| OLD | NEW |
| 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 <math.h> // for isnan. | 5 #include <math.h> // for isnan. |
| 6 #include <setjmp.h> | 6 #include <setjmp.h> |
| 7 #include <stdlib.h> | 7 #include <stdlib.h> |
| 8 | 8 |
| 9 #include "vm/globals.h" | 9 #include "vm/globals.h" |
| 10 #if defined(TARGET_ARCH_ARM) | 10 #if defined(TARGET_ARCH_ARM) |
| (...skipping 3547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3558 } else { | 3558 } else { |
| 3559 set_register(R0, parameter0); | 3559 set_register(R0, parameter0); |
| 3560 set_register(R1, parameter1); | 3560 set_register(R1, parameter1); |
| 3561 set_register(R2, parameter2); | 3561 set_register(R2, parameter2); |
| 3562 set_register(R3, parameter3); | 3562 set_register(R3, parameter3); |
| 3563 } | 3563 } |
| 3564 | 3564 |
| 3565 // Make sure the activation frames are properly aligned. | 3565 // Make sure the activation frames are properly aligned. |
| 3566 int32_t stack_pointer = sp_before_call; | 3566 int32_t stack_pointer = sp_before_call; |
| 3567 static const int kFrameAlignment = OS::ActivationFrameAlignment(); | 3567 static const int kFrameAlignment = OS::ActivationFrameAlignment(); |
| 3568 if (kFrameAlignment > 0) { | 3568 if (kFrameAlignment > 1) { |
| 3569 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment); | 3569 stack_pointer = Utils::RoundDown(stack_pointer, kFrameAlignment); |
| 3570 } | 3570 } |
| 3571 set_register(SP, stack_pointer); | 3571 set_register(SP, stack_pointer); |
| 3572 | 3572 |
| 3573 // Prepare to execute the code at entry. | 3573 // Prepare to execute the code at entry. |
| 3574 set_register(PC, entry); | 3574 set_register(PC, entry); |
| 3575 // Put down marker for end of simulation. The simulator will stop simulation | 3575 // Put down marker for end of simulation. The simulator will stop simulation |
| 3576 // when the PC reaches this value. By saving the "end simulation" value into | 3576 // when the PC reaches this value. By saving the "end simulation" value into |
| 3577 // the LR the simulation stops when returning to this call point. | 3577 // the LR the simulation stops when returning to this call point. |
| 3578 set_register(LR, kEndSimulatingPC); | 3578 set_register(LR, kEndSimulatingPC); |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3668 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3668 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 3669 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3669 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 3670 buf->Longjmp(); | 3670 buf->Longjmp(); |
| 3671 } | 3671 } |
| 3672 | 3672 |
| 3673 } // namespace dart | 3673 } // namespace dart |
| 3674 | 3674 |
| 3675 #endif // !defined(HOST_ARCH_ARM) | 3675 #endif // !defined(HOST_ARCH_ARM) |
| 3676 | 3676 |
| 3677 #endif // defined TARGET_ARCH_ARM | 3677 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |