Support Windows on ARM and ARM64 (#250)

* Support Windows on ARM and ARM64

* Update cpu.inl
This commit is contained in:
Wencey Wang
2020-07-16 19:41:05 +00:00
committed by GitHub
parent be10327c6e
commit 1477cd1ee8

View File

@@ -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<>