Optimize also for 68020 and higher CPUs
authorPatrice Mandin <patmandin@gmail.com>
Wed, 30 Mar 2005 12:38:03 +0000
changeset 1044d36ea7925763
parent 1043 21d1d05aad39
child 1045 63b8e93a3a52
Optimize also for 68020 and higher CPUs
include/SDL_endian.h
     1.1 --- a/include/SDL_endian.h	Mon Mar 07 10:09:21 2005 +0000
     1.2 +++ b/include/SDL_endian.h	Wed Mar 30 12:38:03 2005 +0000
     1.3 @@ -79,7 +79,7 @@
     1.4  	__asm__("rlwimi %0,%2,8,16,23" : "=&r" (result) : "0" (x >> 8), "r" (x));
     1.5  	return result;
     1.6  }
     1.7 -#elif defined(__GNUC__) && defined(__M68000__)
     1.8 +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
     1.9  static __inline__ Uint16 SDL_Swap16(Uint16 x)
    1.10  {
    1.11  	__asm__("rorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
    1.12 @@ -113,10 +113,10 @@
    1.13  	__asm__("rlwimi %0,%2,24,0,7"   : "=&r" (result) : "0" (result),    "r" (x));
    1.14  	return result;
    1.15  }
    1.16 -#elif defined(__GNUC__) && defined(__M68000__)
    1.17 +#elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__))
    1.18  static __inline__ Uint32 SDL_Swap32(Uint32 x)
    1.19  {
    1.20 -	__asm__("rorw	#8,%0\n\tswap	%0\n\tror	#8,%0" : "=d" (x) :  "0" (x) : "cc");
    1.21 +	__asm__("rorw #8,%0\n\tswap %0\n\trorw #8,%0" : "=d" (x) :  "0" (x) : "cc");
    1.22  	return x;
    1.23  }
    1.24  #else