summaryrefslogtreecommitdiff
path: root/libavutil/bswap.h
diff options
context:
space:
mode:
authorDiego Biurrun <diego@biurrun.de>2008-02-15 14:58:18 +0000
committerDiego Biurrun <diego@biurrun.de>2008-02-15 14:58:18 +0000
commit27af15dc5c7be828e5ac7052a7f6c4a285c8caee (patch)
treef95dcdf97f4169997fa9a194961c245a09f56346 /libavutil/bswap.h
parentad40b1539438a779282a61767766eb658386e072 (diff)
prettyprinting cosmetics
Originally committed as revision 11941 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/bswap.h')
-rw-r--r--libavutil/bswap.h50
1 files changed, 24 insertions, 26 deletions
diff --git a/libavutil/bswap.h b/libavutil/bswap.h
index 850cbe3201..ee75f88c34 100644
--- a/libavutil/bswap.h
+++ b/libavutil/bswap.h
@@ -42,11 +42,11 @@
static av_always_inline uint16_t bswap_16(uint16_t x)
{
#if defined(ARCH_X86)
- __asm("rorw $8, %0" :
- LEGACY_REGS (x) :
- "0" (x));
+ __asm("rorw $8, %0" :
+ LEGACY_REGS (x) :
+ "0" (x));
#elif defined(ARCH_SH4)
- __asm__("swap.b %0,%0":"=r"(x):"0"(x));
+ __asm__("swap.b %0,%0":"=r"(x):"0"(x));
#else
x= (x>>8) | (x<<8);
#endif
@@ -57,35 +57,33 @@ static av_always_inline uint32_t bswap_32(uint32_t x)
{
#if defined(ARCH_X86)
#if __CPU__ != 386
- __asm("bswap %0":
- "=r" (x) :
+ __asm("bswap %0":
+ "=r" (x) :
#else
- __asm("xchgb %b0,%h0\n"
- " rorl $16,%0\n"
- " xchgb %b0,%h0":
- LEGACY_REGS (x) :
+ __asm("xchgb %b0,%h0\n"
+ "rorl $16,%0 \n"
+ "xchgb %b0,%h0":
+ LEGACY_REGS (x) :
#endif
- "0" (x));
+ "0" (x));
#elif defined(ARCH_SH4)
- __asm__(
- "swap.b %0,%0\n"
- "swap.w %0,%0\n"
- "swap.b %0,%0\n"
- :"=r"(x):"0"(x));
+ __asm__("swap.b %0,%0\n"
+ "swap.w %0,%0\n"
+ "swap.b %0,%0\n"
+ :"=r"(x):"0"(x));
#elif defined(ARCH_ARM)
uint32_t t;
- __asm__ (
- "eor %1, %0, %0, ror #16 \n\t"
- "bic %1, %1, #0xFF0000 \n\t"
- "mov %0, %0, ror #8 \n\t"
- "eor %0, %0, %1, lsr #8 \n\t"
- : "+r"(x), "+r"(t));
+ __asm__ ("eor %1, %0, %0, ror #16 \n\t"
+ "bic %1, %1, #0xFF0000 \n\t"
+ "mov %0, %0, ror #8 \n\t"
+ "eor %0, %0, %1, lsr #8 \n\t"
+ : "+r"(x), "+r"(t));
#elif defined(ARCH_BFIN)
unsigned tmp;
- asm("%1 = %0 >> 8 (V);\n\t"
- "%0 = %0 << 8 (V);\n\t"
- "%0 = %0 | %1;\n\t"
- "%0 = PACK(%0.L, %0.H);\n\t"
+ asm("%1 = %0 >> 8 (V); \n\t"
+ "%0 = %0 << 8 (V); \n\t"
+ "%0 = %0 | %1; \n\t"
+ "%0 = PACK(%0.L, %0.H); \n\t"
: "+d"(x), "=&d"(tmp));
#else
x= ((x<<8)&0xFF00FF00) | ((x>>8)&0x00FF00FF);