Browse Source

MIPS: use inline asm only when supported by compiler
(cherry picked from commit 7a5a168abe36c91087e58d89262a3658d21ea2cc)

Mans Rullgard 14 years ago
parent
commit
d112aa5acc
2 changed files with 8 additions and 0 deletions
  1. 4 0
      libavcodec/mips/mathops.h
  2. 4 0
      libavutil/mips/intreadwrite.h

+ 4 - 0
libavcodec/mips/mathops.h

@@ -25,6 +25,8 @@
 #include "config.h"
 #include "config.h"
 #include "libavutil/common.h"
 #include "libavutil/common.h"
 
 
+#if HAVE_INLINE_ASM
+
 #if HAVE_LOONGSON
 #if HAVE_LOONGSON
 
 
 static inline av_const int64_t MAC64(int64_t d, int a, int b)
 static inline av_const int64_t MAC64(int64_t d, int a, int b)
@@ -73,4 +75,6 @@ static inline av_const int64_t MLS64(int64_t d, int a, int b)
 
 
 #endif
 #endif
 
 
+#endif /* HAVE_INLINE_ASM */
+
 #endif /* AVCODEC_MIPS_MATHOPS_H */
 #endif /* AVCODEC_MIPS_MATHOPS_H */

+ 4 - 0
libavutil/mips/intreadwrite.h

@@ -24,6 +24,8 @@
 #include <stdint.h>
 #include <stdint.h>
 #include "config.h"
 #include "config.h"
 
 
+#if HAVE_INLINE_ASM
+
 #define AV_RN32 AV_RN32
 #define AV_RN32 AV_RN32
 static av_always_inline uint32_t AV_RN32(const void *p)
 static av_always_inline uint32_t AV_RN32(const void *p)
 {
 {
@@ -91,4 +93,6 @@ static av_always_inline void AV_WN64(void *p, uint64_t v)
 
 
 #endif /* ARCH_MIPS64 */
 #endif /* ARCH_MIPS64 */
 
 
+#endif /* HAVE_INLINE_ASM */
+
 #endif /* AVUTIL_MIPS_INTREADWRITE_H */
 #endif /* AVUTIL_MIPS_INTREADWRITE_H */