summaryrefslogtreecommitdiff
path: root/libavutil
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2012-06-22 18:46:52 +0100
committerMans Rullgard <mans@mansr.com>2012-06-25 13:23:12 +0100
commit8123e0901fc7faa3d7dcf80af9ed0d874f8e7a06 (patch)
treec974aee3e8eabea7a6a6cd3c2dc37e3a08d0f936 /libavutil
parent145a8096d53c20da7898539e521e6d4267ab2f09 (diff)
x86: place some inline asm under #if HAVE_INLINE_ASM
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/internal.h2
-rw-r--r--libavutil/x86/bswap.h3
-rw-r--r--libavutil/x86/intmath.h2
3 files changed, 6 insertions, 1 deletions
diff --git a/libavutil/internal.h b/libavutil/internal.h
index ae678d5840..41e8a9ab36 100644
--- a/libavutil/internal.h
+++ b/libavutil/internal.h
@@ -110,7 +110,7 @@ struct AVDictionary {
/* math */
-#if ARCH_X86
+#if ARCH_X86 && HAVE_INLINE_ASM
#define MASK_ABS(mask, level)\
__asm__ volatile(\
"cltd \n\t"\
diff --git a/libavutil/x86/bswap.h b/libavutil/x86/bswap.h
index c6cf007c86..c73be9af81 100644
--- a/libavutil/x86/bswap.h
+++ b/libavutil/x86/bswap.h
@@ -28,6 +28,8 @@
#include "config.h"
#include "libavutil/attributes.h"
+#if HAVE_INLINE_ASM
+
#if !AV_GCC_VERSION_AT_LEAST(4,1)
#define av_bswap16 av_bswap16
static av_always_inline av_const unsigned av_bswap16(unsigned x)
@@ -55,4 +57,5 @@ static inline uint64_t av_const av_bswap64(uint64_t x)
#endif
#endif /* !AV_GCC_VERSION_AT_LEAST(4,5) */
+#endif /* HAVE_INLINE_ASM */
#endif /* AVUTIL_X86_BSWAP_H */
diff --git a/libavutil/x86/intmath.h b/libavutil/x86/intmath.h
index a7e82b1340..b23c0f1bd0 100644
--- a/libavutil/x86/intmath.h
+++ b/libavutil/x86/intmath.h
@@ -21,6 +21,7 @@
#ifndef AVUTIL_X86_INTMATH_H
#define AVUTIL_X86_INTMATH_H
+#if HAVE_INLINE_ASM
#define FASTDIV(a,b) \
({\
int ret, dmy;\
@@ -31,5 +32,6 @@
);\
ret;\
})
+#endif
#endif /* AVUTIL_X86_INTMATH_H */