Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(260)

Side by Side Diff: runtime/vm/simulator_mips.cc

Issue 1562253002: Add a CompareAndSwapUint32 variant to AtomicOperations so that it is possible to a CAS of a 32 bit … (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « runtime/vm/simulator_mips.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698