You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-09-16 08:36:51 +02:00
x86: move MANGLE() and related macros to libavutil/x86/asm.h
These x86-specific macros do not belong in generic code. Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
@@ -92,18 +92,6 @@ struct AVDictionary {
|
|||||||
# define offsetof(T, F) ((unsigned int)((char *)&((T *)0)->F))
|
# define offsetof(T, F) ((unsigned int)((char *)&((T *)0)->F))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Use to export labels from asm. */
|
|
||||||
#define LABEL_MANGLE(a) EXTERN_PREFIX #a
|
|
||||||
|
|
||||||
// Use rip-relative addressing if compiling PIC code on x86-64.
|
|
||||||
#if ARCH_X86_64 && defined(PIC)
|
|
||||||
# define LOCAL_MANGLE(a) #a "(%%rip)"
|
|
||||||
#else
|
|
||||||
# define LOCAL_MANGLE(a) #a
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
|
|
||||||
|
|
||||||
/* debug stuff */
|
/* debug stuff */
|
||||||
|
|
||||||
#define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
|
#define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
|
||||||
|
@@ -95,4 +95,16 @@ typedef int x86_reg;
|
|||||||
# define XMM_CLOBBERS_ONLY(...)
|
# define XMM_CLOBBERS_ONLY(...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Use to export labels from asm. */
|
||||||
|
#define LABEL_MANGLE(a) EXTERN_PREFIX #a
|
||||||
|
|
||||||
|
// Use rip-relative addressing if compiling PIC code on x86-64.
|
||||||
|
#if ARCH_X86_64 && defined(PIC)
|
||||||
|
# define LOCAL_MANGLE(a) #a "(%%rip)"
|
||||||
|
#else
|
||||||
|
# define LOCAL_MANGLE(a) #a
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define MANGLE(a) EXTERN_PREFIX LOCAL_MANGLE(a)
|
||||||
|
|
||||||
#endif /* AVUTIL_X86_ASM_H */
|
#endif /* AVUTIL_X86_ASM_H */
|
||||||
|
Reference in New Issue
Block a user