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 1173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1184 // Same effect on exclusive access state as a successful SC. | 1184 // Same effect on exclusive access state as a successful SC. |
1185 HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address)); | 1185 HasExclusiveAccessAndOpen(reinterpret_cast<uword>(address)); |
1186 } else { | 1186 } else { |
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, |
| 1195 uint32_t compare_value, |
| 1196 uint32_t new_value) { |
| 1197 ASSERT(sizeof(uword) == sizeof(uint32_t)); |
| 1198 return CompareExchange(address, compare_value, new_value); |
| 1199 } |
| 1200 |
| 1201 |
1194 // Calls into the Dart runtime are based on this interface. | 1202 // Calls into the Dart runtime are based on this interface. |
1195 typedef void (*SimulatorRuntimeCall)(NativeArguments arguments); | 1203 typedef void (*SimulatorRuntimeCall)(NativeArguments arguments); |
1196 | 1204 |
1197 // Calls to leaf Dart runtime functions are based on this interface. | 1205 // Calls to leaf Dart runtime functions are based on this interface. |
1198 typedef int32_t (*SimulatorLeafRuntimeCall)( | 1206 typedef int32_t (*SimulatorLeafRuntimeCall)( |
1199 int32_t r0, int32_t r1, int32_t r2, int32_t r3); | 1207 int32_t r0, int32_t r1, int32_t r2, int32_t r3); |
1200 | 1208 |
1201 // Calls to leaf float Dart runtime functions are based on this interface. | 1209 // Calls to leaf float Dart runtime functions are based on this interface. |
1202 typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, double d1); | 1210 typedef double (*SimulatorLeafFloatRuntimeCall)(double d0, double d1); |
1203 | 1211 |
(...skipping 1285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2489 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); | 2497 set_register(kExceptionObjectReg, bit_cast<int32_t>(raw_exception)); |
2490 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); | 2498 set_register(kStackTraceObjectReg, bit_cast<int32_t>(raw_stacktrace)); |
2491 buf->Longjmp(); | 2499 buf->Longjmp(); |
2492 } | 2500 } |
2493 | 2501 |
2494 } // namespace dart | 2502 } // namespace dart |
2495 | 2503 |
2496 #endif // defined(USING_SIMULATOR) | 2504 #endif // defined(USING_SIMULATOR) |
2497 | 2505 |
2498 #endif // defined TARGET_ARCH_MIPS | 2506 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |