From eb39e205886c4ac66db221e76e2896ee31590768 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Thu, 25 Nov 2021 17:00:50 +0300 Subject: [PATCH] SDL_endian.h: remove aarch64 asm. The asm has been reported broken in at least optimized Apple M1 builds; and besides, the compiler builtins have precedence over the asm anyway. Closes https://github.com/libsdl-org/SDL/issues/3943 --- include/SDL_endian.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/include/SDL_endian.h b/include/SDL_endian.h index ac6af3982..d40e04fac 100644 --- a/include/SDL_endian.h +++ b/include/SDL_endian.h @@ -135,13 +135,6 @@ SDL_Swap16(Uint16 x) __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x)); return (Uint16)result; } -#elif defined(__aarch64__) -SDL_FORCE_INLINE Uint16 -SDL_Swap16(Uint16 x) -{ - __asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x)); - return x; -} #elif (defined(__m68k__) && !defined(__mcoldfire__)) SDL_FORCE_INLINE Uint16 SDL_Swap16(Uint16 x) @@ -193,13 +186,6 @@ SDL_Swap32(Uint32 x) __asm__("rlwimi %0,%2,24,0,7" : "=&r"(result): "0" (result), "r"(x)); return result; } -#elif defined(__aarch64__) -SDL_FORCE_INLINE Uint32 -SDL_Swap32(Uint32 x) -{ - __asm__("rev %w1, %w0": "=r"(x):"r"(x)); - return x; -} #elif (defined(__m68k__) && !defined(__mcoldfire__)) SDL_FORCE_INLINE Uint32 SDL_Swap32(Uint32 x)