mirror of
https://github.com/kanjitalk755/macemu.git
synced 2024-06-12 04:29:29 +00:00
implementing bswap_16 to avoid incorrect result from cygwin 1.7 gcc 3.4.4 built dyngen for lhz
This commit is contained in:
parent
12f8469172
commit
40cb4bf236
|
@ -149,6 +149,19 @@ static inline uint32 do_opt_bswap_32(uint32 x)
|
||||||
__asm__ __volatile__ ("bswap %0" : "=r" (v) : "0" (x));
|
__asm__ __volatile__ ("bswap %0" : "=r" (v) : "0" (x));
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||||
|
|
||||||
|
#define opt_bswap_16 do_opt_bswap_16
|
||||||
|
static inline uint16 do_opt_bswap_16(uint16 x)
|
||||||
|
{
|
||||||
|
uint16 v;
|
||||||
|
__asm__ __volatile__ ("rolw $8, %0" : "=r" (v) : "0" (x));
|
||||||
|
return v;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user