Mercurial > sdl-ios-xcode
changeset 1044:d36ea7925763
Optimize also for 68020 and higher CPUs
author | Patrice Mandin <patmandin@gmail.com> |
---|---|
date | Wed, 30 Mar 2005 12:38:03 +0000 |
parents | 21d1d05aad39 |
children | 63b8e93a3a52 |
files | include/SDL_endian.h |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/include/SDL_endian.h Mon Mar 07 10:09:21 2005 +0000 +++ b/include/SDL_endian.h Wed Mar 30 12:38:03 2005 +0000 @@ -79,7 +79,7 @@ __asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x)); return result; } -#elif defined(__GNUC__) && defined(__M68000__) +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) static __inline__ Uint16 SDL_Swap16(Uint16 x) { __asm__("rorw #8,%0" : "=d" (x) : "0" (x) : "cc"); @@ -113,10 +113,10 @@ __asm__("rlwimi %0,%2,24,0,7" : "=&r" (result) : "0" (result), "r" (x)); return result; } -#elif defined(__GNUC__) && defined(__M68000__) +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) static __inline__ Uint32 SDL_Swap32(Uint32 x) { - __asm__("rorw #8,%0\n\tswap %0\n\tror #8,%0" : "=d" (x) : "0" (x) : "cc"); + __asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) : "0" (x) : "cc"); return x; } #else