mirror of https://github.com/encounter/SDL.git
added Watcom i386 inline asm for SDL_Swap64()
This commit is contained in:
parent
c287087fcc
commit
b8d2185277
|
@ -232,6 +232,14 @@ SDL_Swap64(Uint64 x)
|
||||||
__asm__("bswapq %0": "=r"(x):"0"(x));
|
__asm__("bswapq %0": "=r"(x):"0"(x));
|
||||||
return 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)
|
#elif defined(_MSC_VER)
|
||||||
#pragma intrinsic(_byteswap_uint64)
|
#pragma intrinsic(_byteswap_uint64)
|
||||||
#define SDL_Swap64(x) _byteswap_uint64(x)
|
#define SDL_Swap64(x) _byteswap_uint64(x)
|
||||||
|
|
Loading…
Reference in New Issue