removed experimental arm code used in moo_bswapNN() functions
This commit is contained in:
parent
63f2771879
commit
1456f8fc79
@ -748,9 +748,6 @@ static MOO_INLINE moo_uint16_t moo_bswap16 (moo_uint16_t x)
|
|||||||
#elif defined(__GNUC__) && (defined(__x86_64) || defined(__amd64) || defined(__i386) || defined(i386))
|
#elif defined(__GNUC__) && (defined(__x86_64) || defined(__amd64) || defined(__i386) || defined(i386))
|
||||||
__asm__ volatile ("xchgb %b0, %h0" : "=Q"(x): "0"(x));
|
__asm__ volatile ("xchgb %b0, %h0" : "=Q"(x): "0"(x));
|
||||||
return x;
|
return x;
|
||||||
#elif defined(__GNUC__) && defined(__arm__) && (defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_8__))
|
|
||||||
__asm__ volatile ("rev16 %0, %1" : "=&r"(x): "+r"(x));
|
|
||||||
return x;
|
|
||||||
#else
|
#else
|
||||||
return (x << 8) | (x >> 8);
|
return (x << 8) | (x >> 8);
|
||||||
#endif
|
#endif
|
||||||
@ -765,9 +762,6 @@ static MOO_INLINE moo_uint32_t moo_bswap32 (moo_uint32_t x)
|
|||||||
#elif defined(__GNUC__) && (defined(__x86_64) || defined(__amd64) || defined(__i386) || defined(i386))
|
#elif defined(__GNUC__) && (defined(__x86_64) || defined(__amd64) || defined(__i386) || defined(i386))
|
||||||
__asm__ volatile ("bswapl %0" : "=r"(x) : "0"(x));
|
__asm__ volatile ("bswapl %0" : "=r"(x) : "0"(x));
|
||||||
return x;
|
return x;
|
||||||
#elif defined(__GNUC__) && defined(__arm__) && (defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_8__))
|
|
||||||
__asm__ volatile ("rev32 %0, %1" : "=&r"(x): "+r"(x));
|
|
||||||
return x;
|
|
||||||
#else
|
#else
|
||||||
return ((x >> 24)) |
|
return ((x >> 24)) |
|
||||||
((x >> 8) & ((moo_uint32_t)0xff << 8)) |
|
((x >> 8) & ((moo_uint32_t)0xff << 8)) |
|
||||||
|
Loading…
Reference in New Issue
Block a user