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_MIPS) | 9 #if defined(TARGET_ARCH_MIPS) |
10 | 10 |
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1250 (redirection->call_kind() == kBootstrapNativeCall) || | 1250 (redirection->call_kind() == kBootstrapNativeCall) || |
1251 (redirection->call_kind() == kNativeCall)) { | 1251 (redirection->call_kind() == kNativeCall)) { |
1252 // Set the top_exit_frame_info of this simulator to the native stack. | 1252 // Set the top_exit_frame_info of this simulator to the native stack. |
1253 set_top_exit_frame_info(Isolate::GetCurrentStackPointer()); | 1253 set_top_exit_frame_info(Isolate::GetCurrentStackPointer()); |
1254 } | 1254 } |
1255 if (redirection->call_kind() == kRuntimeCall) { | 1255 if (redirection->call_kind() == kRuntimeCall) { |
1256 NativeArguments arguments; | 1256 NativeArguments arguments; |
1257 ASSERT(sizeof(NativeArguments) == 4*kWordSize); | 1257 ASSERT(sizeof(NativeArguments) == 4*kWordSize); |
1258 arguments.thread_ = reinterpret_cast<Thread*>(get_register(A0)); | 1258 arguments.thread_ = reinterpret_cast<Thread*>(get_register(A0)); |
1259 arguments.argc_tag_ = get_register(A1); | 1259 arguments.argc_tag_ = get_register(A1); |
1260 arguments.argv_ = reinterpret_cast<RawObject*(*)[]>(get_register(A2)); | 1260 arguments.argv_ = reinterpret_cast<RawObject**>(get_register(A2)); |
1261 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(A3)); | 1261 arguments.retval_ = reinterpret_cast<RawObject**>(get_register(A3)); |
1262 SimulatorRuntimeCall target = | 1262 SimulatorRuntimeCall target = |
1263 reinterpret_cast<SimulatorRuntimeCall>(external); | 1263 reinterpret_cast<SimulatorRuntimeCall>(external); |
1264 target(arguments); | 1264 target(arguments); |
1265 set_register(V0, icount_); // Zap result registers from void function. | 1265 set_register(V0, icount_); // Zap result registers from void function. |
1266 set_register(V1, icount_); | 1266 set_register(V1, icount_); |
1267 } else if (redirection->call_kind() == kLeafRuntimeCall) { | 1267 } else if (redirection->call_kind() == kLeafRuntimeCall) { |
1268 int32_t a0 = get_register(A0); | 1268 int32_t a0 = get_register(A0); |
1269 int32_t a1 = get_register(A1); | 1269 int32_t a1 = get_register(A1); |
1270 int32_t a2 = get_register(A2); | 1270 int32_t a2 = get_register(A2); |
(...skipping 1261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2532 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2532 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
2533 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2533 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
2534 buf->Longjmp(); | 2534 buf->Longjmp(); |
2535 } | 2535 } |
2536 | 2536 |
2537 } // namespace dart | 2537 } // namespace dart |
2538 | 2538 |
2539 #endif // defined(USING_SIMULATOR) | 2539 #endif // defined(USING_SIMULATOR) |
2540 | 2540 |
2541 #endif // defined TARGET_ARCH_MIPS | 2541 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |