mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Rename attribute_used to av_used and move it to attributes.h
This is consistent with most of the other attribute macros. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
parent
445996aa51
commit
365e3c7878
@ -96,6 +96,19 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Mark a variable as used and prevent the compiler from optimizing it
|
||||||
|
* away. This is useful for variables accessed only from inline
|
||||||
|
* assembler without the compiler being aware.
|
||||||
|
*/
|
||||||
|
#ifndef av_used
|
||||||
|
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
||||||
|
# define av_used __attribute__((used))
|
||||||
|
#else
|
||||||
|
# define av_used
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef av_alias
|
#ifndef av_alias
|
||||||
#if (!defined(__ICC) || __ICC > 1200) && AV_GCC_VERSION_AT_LEAST(3,3)
|
#if (!defined(__ICC) || __ICC > 1200) && AV_GCC_VERSION_AT_LEAST(3,3)
|
||||||
# define av_alias __attribute__((may_alias))
|
# define av_alias __attribute__((may_alias))
|
||||||
|
@ -46,20 +46,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Mark a variable as used and prevent the compiler from optimizing it away.
|
|
||||||
* This is useful for asm that accesses varibles in ways that the compiler does not
|
|
||||||
* understand
|
|
||||||
*/
|
|
||||||
#ifndef attribute_used
|
|
||||||
#if AV_GCC_VERSION_AT_LEAST(3,1)
|
|
||||||
# define attribute_used __attribute__((used))
|
|
||||||
#else
|
|
||||||
# define attribute_used
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef INT16_MIN
|
#ifndef INT16_MIN
|
||||||
#define INT16_MIN (-0x7fff - 1)
|
#define INT16_MIN (-0x7fff - 1)
|
||||||
#endif
|
#endif
|
||||||
|
@ -41,7 +41,7 @@
|
|||||||
static const t __attribute__((aligned(n))) v
|
static const t __attribute__((aligned(n))) v
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
|
#define DECLARE_ALIGNED(n,t,v) t __attribute__ ((aligned (n))) v
|
||||||
#define DECLARE_ASM_CONST(n,t,v) static const t attribute_used __attribute__ ((aligned (n))) v
|
#define DECLARE_ASM_CONST(n,t,v) static const t av_used __attribute__ ((aligned (n))) v
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
|
#define DECLARE_ALIGNED(n,t,v) __declspec(align(n)) t v
|
||||||
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
|
#define DECLARE_ASM_CONST(n,t,v) __declspec(align(n)) static const t v
|
||||||
|
Loading…
Reference in New Issue
Block a user