From b8d2185277bd80e8ccaa31c4a5a7baa08a2afb23 Mon Sep 17 00:00:00 2001 From: Ozkan Sezer Date: Tue, 23 Feb 2021 17:37:20 +0300 Subject: [PATCH] added Watcom i386 inline asm for SDL_Swap64() --- include/SDL_endian.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/SDL_endian.h b/include/SDL_endian.h index f9a4fd368..cf2eba91e 100644 --- a/include/SDL_endian.h +++ b/include/SDL_endian.h @@ -232,6 +232,14 @@ SDL_Swap64(Uint64 x) __asm__("bswapq %0": "=r"(x):"0"(x)); return x; } +#elif defined(__WATCOMC__) && defined(__386__) +extern _inline Uint64 SDL_Swap64(Uint64); +#pragma aux SDL_Swap64 = \ + "bswap eax" \ + "bswap edx" \ + "xchg eax,edx" \ + parm [eax edx] \ + modify [eax edx]; #elif defined(_MSC_VER) #pragma intrinsic(_byteswap_uint64) #define SDL_Swap64(x) _byteswap_uint64(x)