mirror of
https://github.com/kanjitalk755/macemu.git
synced 2025-02-16 14:30:34 +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));
|
||||
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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user