mirror of https://github.com/encounter/SDL.git
SDL_endian.h: minor fixes from SDL-1.2 branch
( forward-port of changesets 3909:6832b00d3594 and 5657:529d23724144 )
This commit is contained in:
parent
5aba082703
commit
5b2e011e6d
|
@ -69,7 +69,7 @@ extern "C" {
|
|||
* \file SDL_endian.h
|
||||
*/
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ == 95 /* broken gcc version */)
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
|
@ -99,7 +99,7 @@ SDL_Swap16(Uint16 x)
|
|||
__asm__("rev16 %w1, %w0" : "=r"(x) : "r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint16
|
||||
SDL_Swap16(Uint16 x)
|
||||
{
|
||||
|
@ -120,7 +120,8 @@ SDL_Swap16(Uint16 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -152,7 +153,7 @@ SDL_Swap32(Uint32 x)
|
|||
__asm__("rev %w1, %w0": "=r"(x):"r"(x));
|
||||
return x;
|
||||
}
|
||||
#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
|
||||
#elif defined(__GNUC__) && (defined(__m68k__) && !defined(__mcoldfire__))
|
||||
SDL_FORCE_INLINE Uint32
|
||||
SDL_Swap32(Uint32 x)
|
||||
{
|
||||
|
@ -183,7 +184,8 @@ SDL_Swap32(Uint32 x)
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(__i386__)
|
||||
#if defined(__GNUC__) && defined(__i386__) && \
|
||||
!(__GNUC__ == 2 && __GNUC_MINOR__ <= 95 /* broken gcc version */)
|
||||
SDL_FORCE_INLINE Uint64
|
||||
SDL_Swap64(Uint64 x)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue