We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 292cc08 commit 44e8d8cCopy full SHA for 44e8d8c
1 file changed
Inc/MockedDrivers/compiler_specific.hpp
@@ -31,6 +31,15 @@ static inline uint32_t __RBIT(uint32_t val) {
31
}
32
33
#define __CLZ __builtin_clz
34
+
35
+#if defined(_MSC_VER) && (_MSC_VER > 1200) && !defined(__clang__)
36
+void _ReadWriteBarrier(void);
37
+#pragma intrinsic(_ReadWriteBarrier)
38
+#define __COMPILER_BARRIER() _ReadWriteBarrier()
39
+#define __DSB() __COMPILER_BARRIER()
40
+#define __ISB() __COMPILER_BARRIER()
41
+#else
42
43
#define __COMPILER_BARRIER() asm volatile("" ::: "memory")
44
45
// Architecture-specific definitions for barrier intrinsics used in mocks
@@ -52,4 +61,5 @@ static inline uint32_t __RBIT(uint32_t val) {
52
61
# define __DSB() __COMPILER_BARRIER()
53
62
# define __ISB() __COMPILER_BARRIER()
54
63
64
+#endif
55
65
#endif
0 commit comments