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 <setjmp.h> // NOLINT | 5 #include <setjmp.h> // NOLINT |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #include "vm/globals.h" | 8 #include "vm/globals.h" |
9 #if defined(TARGET_ARCH_ARM) | 9 #if defined(TARGET_ARCH_ARM) |
10 | 10 |
(...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1532 Redirection* redirection = Redirection::FromSvcInstruction(instr); | 1532 Redirection* redirection = Redirection::FromSvcInstruction(instr); |
1533 uword external = redirection->external_function(); | 1533 uword external = redirection->external_function(); |
1534 if (IsTracingExecution()) { | 1534 if (IsTracingExecution()) { |
1535 OS::Print("Call to host function at 0x%" Pd "\n", external); | 1535 OS::Print("Call to host function at 0x%" Pd "\n", external); |
1536 } | 1536 } |
1537 | 1537 |
1538 if ((redirection->call_kind() == kRuntimeCall) || | 1538 if ((redirection->call_kind() == kRuntimeCall) || |
1539 (redirection->call_kind() == kBootstrapNativeCall) || | 1539 (redirection->call_kind() == kBootstrapNativeCall) || |
1540 (redirection->call_kind() == kNativeCall)) { | 1540 (redirection->call_kind() == kNativeCall)) { |
1541 // Set the top_exit_frame_info of this simulator to the native stack. | 1541 // Set the top_exit_frame_info of this simulator to the native stack. |
1542 set_top_exit_frame_info(Isolate::GetCurrentStackPointer()); | 1542 set_top_exit_frame_info(Thread::GetCurrentStackPointer()); |
1543 } | 1543 } |
1544 if (redirection->call_kind() == kRuntimeCall) { | 1544 if (redirection->call_kind() == kRuntimeCall) { |
1545 NativeArguments arguments; | 1545 NativeArguments arguments; |
1546 ASSERT(sizeof(NativeArguments) == 4*kWordSize); | 1546 ASSERT(sizeof(NativeArguments) == 4*kWordSize); |
1547 arguments.thread_ = reinterpret_cast<Thread*>(get_register(R0)); | 1547 arguments.thread_ = reinterpret_cast<Thread*>(get_register(R0)); |
1548 arguments.argc_tag_ = get_register(R1); | 1548 arguments.argc_tag_ = get_register(R1); |
1549 arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(R2)); | 1549 arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(R2)); |
1550 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(R3)); | 1550 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(R3)); |
1551 SimulatorRuntimeCall target = | 1551 SimulatorRuntimeCall target = |
1552 reinterpret_cast<SimulatorRuntimeCall>(external); | 1552 reinterpret_cast<SimulatorRuntimeCall>(external); |
(...skipping 2355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3908 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 3908 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
3909 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 3909 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
3910 buf->Longjmp(); | 3910 buf->Longjmp(); |
3911 } | 3911 } |
3912 | 3912 |
3913 } // namespace dart | 3913 } // namespace dart |
3914 | 3914 |
3915 #endif // defined(USING_SIMULATOR) | 3915 #endif // defined(USING_SIMULATOR) |
3916 | 3916 |
3917 #endif // defined TARGET_ARCH_ARM | 3917 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |