mirror of
https://github.com/X11Libre/xf86-video-ati.git
synced 2026-03-24 01:24:43 +00:00
drop unused byteswap functions
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
@@ -158,9 +158,9 @@ XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
|
|||||||
|
|
||||||
# Checks for headers/macros for byte swapping
|
# Checks for headers/macros for byte swapping
|
||||||
# Known variants:
|
# Known variants:
|
||||||
# <byteswap.h> bswap_16, bswap_32, bswap_64 (glibc)
|
# <byteswap.h> bswap_16, bswap_32 (glibc)
|
||||||
# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
|
# <sys/endian.h> __swap16, __swap32, __swap64 (OpenBSD)
|
||||||
# <sys/endian.h> bswap16, bswap32, bswap64 (other BSD's)
|
# <sys/endian.h> bswap16, bswap32 (other BSD's)
|
||||||
# and a fallback to local macros if none of the above are found
|
# and a fallback to local macros if none of the above are found
|
||||||
|
|
||||||
# if <byteswap.h> is found, assume it's the correct version
|
# if <byteswap.h> is found, assume it's the correct version
|
||||||
@@ -211,8 +211,6 @@ b = bswap16(a);
|
|||||||
[Define to 16-bit byteswap macro])
|
[Define to 16-bit byteswap macro])
|
||||||
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
|
AC_DEFINE_UNQUOTED([radeon_bswap_32], ${BSWAP}32,
|
||||||
[Define to 32-bit byteswap macro])
|
[Define to 32-bit byteswap macro])
|
||||||
AC_DEFINE_UNQUOTED([radeon_bswap_64], ${BSWAP}64,
|
|
||||||
[Define to 64-bit byteswap macro])
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
11
src/radeon.h
11
src/radeon.h
@@ -108,7 +108,6 @@ struct _SyncFence;
|
|||||||
#include <byteswap.h>
|
#include <byteswap.h>
|
||||||
#define radeon_bswap_16 bswap_16
|
#define radeon_bswap_16 bswap_16
|
||||||
#define radeon_bswap_32 bswap_32
|
#define radeon_bswap_32 bswap_32
|
||||||
#define radeon_bswap_64 bswap_64
|
|
||||||
#elif defined(USE_SYS_ENDIAN_H)
|
#elif defined(USE_SYS_ENDIAN_H)
|
||||||
#include <sys/endian.h>
|
#include <sys/endian.h>
|
||||||
#else
|
#else
|
||||||
@@ -119,22 +118,12 @@ struct _SyncFence;
|
|||||||
(((uint32_t)radeon_bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
|
(((uint32_t)radeon_bswap_16((uint16_t)((value) & 0xffff)) << 16) | \
|
||||||
(uint32_t)radeon_bswap_16((uint16_t)((value) >> 16)))
|
(uint32_t)radeon_bswap_16((uint16_t)((value) >> 16)))
|
||||||
|
|
||||||
#define radeon_bswap_64(value) \
|
|
||||||
(((uint64_t)radeon_bswap_32((uint32_t)((value) & 0xffffffff)) \
|
|
||||||
<< 32) | \
|
|
||||||
(uint64_t)radeon_bswap_32((uint32_t)((value) >> 32)))
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
#if X_BYTE_ORDER == X_BIG_ENDIAN
|
||||||
#define le32_to_cpu(x) radeon_bswap_32(x)
|
|
||||||
#define le16_to_cpu(x) radeon_bswap_16(x)
|
|
||||||
#define cpu_to_le32(x) radeon_bswap_32(x)
|
#define cpu_to_le32(x) radeon_bswap_32(x)
|
||||||
#define cpu_to_le16(x) radeon_bswap_16(x)
|
|
||||||
#else
|
#else
|
||||||
#define le32_to_cpu(x) (x)
|
|
||||||
#define le16_to_cpu(x) (x)
|
|
||||||
#define cpu_to_le32(x) (x)
|
#define cpu_to_le32(x) (x)
|
||||||
#define cpu_to_le16(x) (x)
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Provide substitutes for gcc's __FUNCTION__ on other compilers */
|
/* Provide substitutes for gcc's __FUNCTION__ on other compilers */
|
||||||
|
|||||||
Reference in New Issue
Block a user