Mercurial > libavutil.hg
changeset 521:73bbedff8e92 libavutil
ARM: ARMv6 optimised bswap_16/32
author | mru |
---|---|
date | Tue, 15 Jul 2008 19:05:49 +0000 |
parents | 9354d19413f3 |
children | c0001e5c051f |
files | bswap.h |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/bswap.h Tue Jul 15 17:17:35 2008 +0000 +++ b/bswap.h Tue Jul 15 19:05:49 2008 +0000 @@ -40,6 +40,8 @@ asm("rorw $8, %0" : "+r"(x)); #elif defined(ARCH_SH4) asm("swap.b %0,%0" : "=r"(x) : "0"(x)); +#elif defined(HAVE_ARMV6) + asm("rev16 %0, %0" : "+r"(x)); #else x= (x>>8) | (x<<8); #endif @@ -62,6 +64,8 @@ "swap.w %0,%0\n" "swap.b %0,%0\n" : "=r"(x) : "0"(x)); +#elif defined(HAVE_ARMV6) + asm("rev %0, %0" : "+r"(x)); #elif defined(ARCH_ARM) uint32_t t; asm ("eor %1, %0, %0, ror #16 \n\t"