| 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 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1187 // Same effect on exclusive access state as an LL. | 1187 // Same effect on exclusive access state as an LL. |
| 1188 SetExclusiveAccess(reinterpret_cast<uword>(address)); | 1188 SetExclusiveAccess(reinterpret_cast<uword>(address)); |
| 1189 } | 1189 } |
| 1190 return value; | 1190 return value; |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 | 1193 |
| 1194 uint32_t Simulator::CompareExchangeUint32(uint32_t* address, | 1194 uint32_t Simulator::CompareExchangeUint32(uint32_t* address, |
| 1195 uint32_t compare_value, | 1195 uint32_t compare_value, |
| 1196 uint32_t new_value) { | 1196 uint32_t new_value) { |
| 1197 ASSERT(sizeof(uword) == sizeof(uint32_t)); | 1197 COMPILE_ASSERT(sizeof(uword) == sizeof(uint32_t)); |
| 1198 return CompareExchange(address, compare_value, new_value); | 1198 return CompareExchange(reinterpret_cast<uword*>(address), |
| 1199 static_cast<uword>(compare_value), |
| 1200 static_cast<uword>(new_value)); |
| 1199 } | 1201 } |
| 1200 | 1202 |
| 1201 | 1203 |
| 1202 // Calls into the Dart runtime are based on this interface. | 1204 // Calls into the Dart runtime are based on this interface. |
| 1203 typedef void (*SimulatorRuntimeCall)(NativeArguments arguments); | 1205 typedef void (*SimulatorRuntimeCall)(NativeArguments arguments); |
| 1204 | 1206 |
| 1205 // Calls to leaf Dart runtime functions are based on this interface. | 1207 // Calls to leaf Dart runtime functions are based on this interface. |
| 1206 typedef int32_t (*SimulatorLeafRuntimeCall)( | 1208 typedef int32_t (*SimulatorLeafRuntimeCall)( |
| 1207 int32_t r0, int32_t r1, int32_t r2, int32_t r3); | 1209 int32_t r0, int32_t r1, int32_t r2, int32_t r3); |
| 1208 | 1210 |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2497 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2499 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
| 2498 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2500 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
| 2499 buf->Longjmp(); | 2501 buf->Longjmp(); |
| 2500 } | 2502 } |
| 2501 | 2503 |
| 2502 } // namespace dart | 2504 } // namespace dart |
| 2503 | 2505 |
| 2504 #endif // defined(USING_SIMULATOR) | 2506 #endif // defined(USING_SIMULATOR) |
| 2505 | 2507 |
| 2506 #endif // defined TARGET_ARCH_MIPS | 2508 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |