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

Måns Rullgård mans at mansr.com
Sun Nov 25 16:43:05 CET 2012


Edward Wang <edward.c.wang at compdigitec.com> writes:

> ---
>  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" )

Just delete the macro.  GCC does the right thing all by itself.

-- 
Måns Rullgård
mans at mansr.com




More information about the vlc-devel mailing list