mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Support Windows on ARM and ARM64 (#250)
* Support Windows on ARM and ARM64 * Update cpu.inl
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
#endif // BX_CPU_H_HEADER_GUARD
|
||||
|
||||
#if BX_COMPILER_MSVC
|
||||
# if BX_PLATFORM_WINRT
|
||||
# if BX_PLATFORM_WINRT || (BX_PLATFORM_WINDOWS && (!BX_CPU_X86))
|
||||
# include <windows.h>
|
||||
# endif // BX_PLATFORM_WINRT
|
||||
# endif // BX_PLATFORM_WINRT || (BX_PLATFORM_WINDOWS && (!BX_CPU_X86))
|
||||
|
||||
# if BX_CPU_X86
|
||||
# include <emmintrin.h> // _mm_fence
|
||||
@@ -88,16 +88,18 @@ namespace bx
|
||||
asm volatile("":::"memory");
|
||||
#endif // BX_COMPILER
|
||||
}
|
||||
|
||||
|
||||
inline void memoryBarrier()
|
||||
{
|
||||
#if BX_PLATFORM_WINRT
|
||||
MemoryBarrier();
|
||||
#elif BX_COMPILER_MSVC
|
||||
#if BX_COMPILER_MSVC
|
||||
# if BX_CPU_X86
|
||||
_mm_mfence();
|
||||
# else
|
||||
MemoryBarrier();
|
||||
# endif // BX_CPU_X86
|
||||
#else
|
||||
__sync_synchronize();
|
||||
#endif // BX_COMPILER
|
||||
#endif // BX_COMPILER_MSVC
|
||||
}
|
||||
|
||||
template<>
|
||||
|
||||
Reference in New Issue
Block a user