mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
atomic: Fix memory barriers on MSVC ARM64
(cherry picked from commit 2c4c8172d7)
This commit is contained in:
parent
604a4dfa69
commit
396cd2d7f7
1 changed files with 4 additions and 0 deletions
|
|
@ -284,6 +284,10 @@ extern SDL_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(__GNUC__) && defined(__arm__)
|
||||
#if 0 /* defined(SDL_PLATFORM_LINUX) || defined(SDL_PLATFORM_ANDROID) */
|
||||
/* Information from:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue