1 /* File: libc/sysdeps/linux/bfin/bits/byteswap.h
3 * Copyright 2004-2006 Analog Devices Inc.
5 * Enter bugs at http://blackfin.uclinux.org/
7 * Licensed under the GPL-2 or later.
10 #ifndef _ASM_BITS_BYTESWAP_H
11 #define _ASM_BITS_BYTESWAP_H 1
13 #define __bswap_non_constant_16(x) \
15 ({ register unsigned short int __v; \
16 __asm__ ("%0 = PACK (%1.L, %1.L);" \
22 #define __bswap_non_constant_32(x) \
24 ({ register unsigned int __v; \
25 __asm__ ("%1 = %0 >> 8 (V);" \
28 "%1 = PACK(%0.L, %0.H);" \
29 : "+d"(x), "=&d"(__v)); \
34 #include <bits/byteswap-common.h>