mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-04-26 03:18:47 +02:00
atomic: Fix memory barriers on MSVC ARM32/ARM64
(cherry picked from commit 26616cd653)
This commit is contained in:
@@ -183,6 +183,14 @@ extern DECLSPEC void SDLCALL SDL_MemoryBarrierAcquireFunction(void);
|
||||
#elif defined(__GNUC__) && defined(__aarch64__)
|
||||
#define SDL_MemoryBarrierRelease() __asm__ __volatile__ ("dmb ish" : : : "memory")
|
||||
#define SDL_MemoryBarrierAcquire() __asm__ __volatile__ ("dmb ishld" : : : "memory")
|
||||
#elif defined(_MSC_VER) && (defined(_M_ARM64) || defined(_M_ARM64EC))
|
||||
#include <arm64intr.h>
|
||||
#define SDL_MemoryBarrierRelease() __dmb(_ARM64_BARRIER_ISH)
|
||||
#define SDL_MemoryBarrierAcquire() __dmb(_ARM64_BARRIER_ISHLD)
|
||||
#elif defined(_MSC_VER) && defined(_M_ARM)
|
||||
#include <armintr.h>
|
||||
#define SDL_MemoryBarrierRelease() __dmb(_ARM_BARRIER_ISH)
|
||||
#define SDL_MemoryBarrierAcquire() __dmb(_ARM_BARRIER_ISH)
|
||||
#elif defined(__GNUC__) && defined(__arm__)
|
||||
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
|
||||
/* Information from:
|
||||
|
||||
Reference in New Issue
Block a user