mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 06:34:35 +00:00
atomic: Fix memory barriers on MSVC ARM32/ARM64
This commit is contained in:
parent
15275898f0
commit
26616cd653
1 changed files with 8 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue