Skip to content

Commit

Permalink
SDL_atomic.h: __ARM_ARCH is not always defined for an arm platform
Browse files Browse the repository at this point in the history
e.g. riscos toolchain
(cherry picked from commit 8105f1d)
  • Loading branch information
madebr authored and sezero committed Jul 26, 2023
1 parent 37d1ab8 commit 2b0ca87
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/SDL_atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ typedef void (*SDL_KernelMemoryBarrierFunc)();
/* "REP NOP" is PAUSE, coded for tools that don't know it by that name. */
#if (defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))
#define SDL_CPUPauseInstruction() __asm__ __volatile__("pause\n") /* Some assemblers can't do REP NOP, so go with PAUSE. */
#elif (defined(__arm__) && __ARM_ARCH >= 7) || defined(__aarch64__)
#elif (defined(__arm__) && defined(__ARM_ARCH) && __ARM_ARCH >= 7) || defined(__aarch64__)
#define SDL_CPUPauseInstruction() __asm__ __volatile__("yield" ::: "memory")
#elif (defined(__powerpc__) || defined(__powerpc64__))
#define SDL_CPUPauseInstruction() __asm__ __volatile__("or 27,27,27");
Expand Down

0 comments on commit 2b0ca87

Please sign in to comment.