include/SDL_endian.h
branchgsoc2008_nds
changeset 2698 e1da92da346c
parent 1985 8055185ae4ed
equal deleted inserted replaced
2697:c9121b04cffa 2698:e1da92da346c
   154         } s;
   154         } s;
   155         Uint64 u;
   155         Uint64 u;
   156     } v;
   156     } v;
   157     v.u = x;
   157     v.u = x;
   158   __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
   158   __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1": "=r"(v.s.a), "=r"(v.s.b):"0"(v.s.a),
   159             "1"(v.s.
   159             "1"(v.
   160                 b));
   160                 s.b));
   161     return v.u;
   161     return v.u;
   162 }
   162 }
   163 #elif defined(__GNUC__) && defined(__x86_64__)
   163 #elif defined(__GNUC__) && defined(__x86_64__)
   164 static __inline__ Uint64
   164 static __inline__ Uint64
   165 SDL_Swap64(Uint64 x)
   165 SDL_Swap64(Uint64 x)