include/SDL_endian.h
changeset 6213 e50324ad38ee
parent 6138 4c64952a58fb
child 6885 700f1b25f77f
equal deleted inserted replaced
6212:78d854de3a66 6213:e50324ad38ee
    89 }
    89 }
    90 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
    90 #elif defined(__GNUC__) && (defined(__powerpc__) || defined(__ppc__))
    91 static __inline__ Uint16
    91 static __inline__ Uint16
    92 SDL_Swap16(Uint16 x)
    92 SDL_Swap16(Uint16 x)
    93 {
    93 {
    94     Uint16 result;
    94     int result;
    95 
    95 
    96   __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
    96   __asm__("rlwimi %0,%2,8,16,23": "=&r"(result):"0"(x >> 8), "r"(x));
    97     return result;
    97     return (Uint16)result;
    98 }
    98 }
    99 #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
    99 #elif defined(__GNUC__) && (defined(__M68000__) || defined(__M68020__)) && !defined(__mcoldfire__)
   100 static __inline__ Uint16
   100 static __inline__ Uint16
   101 SDL_Swap16(Uint16 x)
   101 SDL_Swap16(Uint16 x)
   102 {
   102 {