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

Side by Side Diff: runtime/vm/atomic.h

Issue 1858283002: Initial SIMDBC interpreter. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: cleanup Created 4 years, 8 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
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 #ifndef VM_ATOMIC_H_ 5 #ifndef VM_ATOMIC_H_
6 #define VM_ATOMIC_H_ 6 #define VM_ATOMIC_H_
7 7
8 #include "platform/globals.h" 8 #include "platform/globals.h"
9 9
10 #include "vm/allocation.h" 10 #include "vm/allocation.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 // Performs a load of a word from 'ptr', but without any guarantees about 51 // Performs a load of a word from 'ptr', but without any guarantees about
52 // memory order (i.e., no load barriers/fences). 52 // memory order (i.e., no load barriers/fences).
53 static uword LoadRelaxed(uword* ptr) { 53 static uword LoadRelaxed(uword* ptr) {
54 return *static_cast<volatile uword*>(ptr); 54 return *static_cast<volatile uword*>(ptr);
55 } 55 }
56 }; 56 };
57 57
58 58
59 } // namespace dart 59 } // namespace dart
60 60
61 #if defined(USING_SIMULATOR) && !defined(TARGET_ARCH_DBC)
62 #define USING_SIMULATOR_ATOMICS
63 #endif
64
65 #if defined(USING_SIMULATOR_ATOMICS)
61 // We need to use the simulator to ensure that atomic operations are observed 66 // We need to use the simulator to ensure that atomic operations are observed
62 // both in C++ and in generated code if the simulator is active. 67 // both in C++ and in generated code if the simulator is active.
63 #include "vm/atomic_simulator.h" 68 #include "vm/atomic_simulator.h"
69 #endif
64 70
65 #if defined(TARGET_OS_ANDROID) 71 #if defined(TARGET_OS_ANDROID)
66 #include "vm/atomic_android.h" 72 #include "vm/atomic_android.h"
67 #elif defined(TARGET_OS_LINUX) 73 #elif defined(TARGET_OS_LINUX)
68 #include "vm/atomic_linux.h" 74 #include "vm/atomic_linux.h"
69 #elif defined(TARGET_OS_MACOS) 75 #elif defined(TARGET_OS_MACOS)
70 #include "vm/atomic_macos.h" 76 #include "vm/atomic_macos.h"
71 #elif defined(TARGET_OS_WINDOWS) 77 #elif defined(TARGET_OS_WINDOWS)
72 #include "vm/atomic_win.h" 78 #include "vm/atomic_win.h"
73 #else 79 #else
74 #error Unknown target os. 80 #error Unknown target os.
75 #endif 81 #endif
76 82
77 #endif // VM_ATOMIC_H_ 83 #endif // VM_ATOMIC_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698