[FFmpeg-cvslog] x86: move MANGLE() and related macros to libavutil/x86/asm.h
Mans Rullgard
git at videolan.org
Thu Aug 9 19:34:53 CEST 2012
ffmpeg | branch: master | Mans Rullgard <mans at mansr.com> | Wed Aug 8 14:37:57 2012 +0100| [070a402b60cb4ebc6fd2ba59c13758811815bb19] | committer: Mans Rullgard
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 at mansr.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=070a402b60cb4ebc6fd2ba59c13758811815bb19
---
libavutil/internal.h | 12 ------------
libavutil/x86/asm.h | 12 ++++++++++++
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/libavutil/internal.h b/libavutil/internal.h
index e8bcca5..0a7ed83 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -92,18 +92,6 @@ struct AVDictionary {
# define offsetof(T, F) ((unsigned int)((char *)&((T *)0)->F))
#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 */
#define av_abort() do { av_log(NULL, AV_LOG_ERROR, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0)
diff --git a/libavutil/x86/asm.h b/libavutil/x86/asm.h
index b447fab..a43ab3c 100644
--- a/libavutil/x86/asm.h
+++ b/libavutil/x86/asm.h
@@ -95,4 +95,16 @@ typedef int x86_reg;
# define XMM_CLOBBERS_ONLY(...)
#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 */
More information about the ffmpeg-cvslog
mailing list