mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-27 06:08:21 +01:00
dsp.h: collect gcc/clang version test macros
endian_inl.h already relies on dsp.h, grab the definitions from there.
(cherry picked from commit 8323a9038d
)
Change-Id: I445f7d0631723043c55da1070498f89965bec7b1
This commit is contained in:
parent
90d112466b
commit
5af7719047
@ -32,9 +32,19 @@ extern "C" {
|
||||
# define LOCAL_GCC_PREREQ(maj, min) \
|
||||
(LOCAL_GCC_VERSION >= (((maj) << 8) | (min)))
|
||||
#else
|
||||
# define LOCAL_GCC_VERSION 0
|
||||
# define LOCAL_GCC_PREREQ(maj, min) 0
|
||||
#endif
|
||||
|
||||
#ifdef __clang__
|
||||
# define LOCAL_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__)
|
||||
# define LOCAL_CLANG_PREREQ(maj, min) \
|
||||
(LOCAL_CLANG_VERSION >= (((maj) << 8) | (min)))
|
||||
#else
|
||||
# define LOCAL_CLANG_VERSION 0
|
||||
# define LOCAL_CLANG_PREREQ(maj, min) 0
|
||||
#endif // __clang__
|
||||
|
||||
#if defined(_MSC_VER) && _MSC_VER > 1310 && \
|
||||
(defined(_M_X64) || defined(_M_IX86))
|
||||
#define WEBP_MSC_SSE2 // Visual C++ SSE2 targets
|
||||
|
@ -35,25 +35,13 @@
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_CONFIG_H)
|
||||
#ifdef __GNUC__
|
||||
# define LOCAL_GCC_VERSION ((__GNUC__ << 8) | __GNUC_MINOR__)
|
||||
#else
|
||||
# define LOCAL_GCC_VERSION 0
|
||||
#endif // __GNUC__
|
||||
|
||||
#ifdef __clang__
|
||||
# define LOCAL_CLANG_VERSION ((__clang_major__ << 8) | __clang_minor__)
|
||||
#else
|
||||
# define LOCAL_CLANG_VERSION 0
|
||||
#endif // __clang__
|
||||
|
||||
// clang-3.3 and gcc-4.3 have builtin functions for swap32/swap64
|
||||
#if LOCAL_GCC_VERSION >= 0x403 || LOCAL_CLANG_VERSION >= 0x303
|
||||
#if LOCAL_GCC_PREREQ(4,3) || LOCAL_CLANG_PREREQ(3,3)
|
||||
#define HAVE_BUILTIN_BSWAP32
|
||||
#define HAVE_BUILTIN_BSWAP64
|
||||
#endif
|
||||
// clang-3.3 and gcc-4.8 have a builtin function for swap16
|
||||
#if LOCAL_GCC_VERSION >= 0x408 || LOCAL_CLANG_VERSION >= 0x303
|
||||
#if LOCAL_GCC_PREREQ(4,8) || LOCAL_CLANG_PREREQ(3,3)
|
||||
#define HAVE_BUILTIN_BSWAP16
|
||||
#endif
|
||||
#endif // !HAVE_CONFIG_H
|
||||
|
Loading…
Reference in New Issue
Block a user