[vlc-devel] [PATCH] contrib: mad: fix MIPS compilation error with MAD_F_MLX

Edward Wang edward.c.wang at compdigitec.com
Sat Nov 24 22:10:49 CET 2012


---
 contrib/src/mad/mad-mips-asm-mlx.patch |   22 ++++++++++++++++++++++
 contrib/src/mad/rules.mak              |    1 +
 2 files changed, 23 insertions(+), 0 deletions(-)
 create mode 100644 contrib/src/mad/mad-mips-asm-mlx.patch

diff --git a/contrib/src/mad/mad-mips-asm-mlx.patch b/contrib/src/mad/mad-mips-asm-mlx.patch
new file mode 100644
index 0000000..99a44d2
--- /dev/null
+++ b/contrib/src/mad/mad-mips-asm-mlx.patch
@@ -0,0 +1,22 @@
+From: Edward Wang <edward.c.wang at compdigitec.com>
+
+diff --git libmad/fixed.h libmad/fixed.h
+--- libmad/fixed.h	2012-11-24 11:23:26.452022765 -0500
++++ libmad/fixed.h	2012-11-24 11:26:09.463440457 -0500
+@@ -317,9 +317,12 @@
+  * significant bit depends on OPT_ACCURACY via mad_f_scale64().
+  */
+ #  define MAD_F_MLX(hi, lo, x, y)  \
+-    asm ("mult	%2,%3"  \
+-	 : "=l" (lo), "=h" (hi)  \
+-	 : "%r" (x), "r" (y))
++    asm ("mult %2, %3\n\t" \
++         "mfhi %0\n\t" \
++         "mflo %1\n\t" \
++         : "=r" (hi), "=r" (lo) \
++         : "r" (x), "r" (y) \
++         : "hi", "lo" )
+ 
+ # if defined(HAVE_MADD_ASM)
+ #  define MAD_F_MLA(hi, lo, x, y)  \
+
diff --git a/contrib/src/mad/rules.mak b/contrib/src/mad/rules.mak
index 3732e4f..9c6df10 100644
--- a/contrib/src/mad/rules.mak
+++ b/contrib/src/mad/rules.mak
@@ -26,6 +26,7 @@ ifdef HAVE_IOS
 endif
 	$(APPLY) $(SRC)/mad/mad-noopt.patch
 	$(APPLY) $(SRC)/mad/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff
+	$(APPLY) $(SRC)/mad/mad-mips-asm-mlx.patch
 	$(MOVE)
 
 .mad: libmad
-- 
1.7.5.4




More information about the vlc-devel mailing list