1 http://patchwork.openembedded.org/patch/921/
3 diff -ur libmad-0.15.1b-orig/fixed.h libmad-0.15.1b/fixed.h
4 --- libmad-0.15.1b-orig/fixed.h 2004-02-17 12:32:03.000000000 +1030
5 +++ libmad-0.15.1b/fixed.h 2009-08-05 10:46:30.000000000 +0930
8 # elif defined(FPM_MIPS)
10 +/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
11 +#if defined (__GNUC__) && defined (__GNUC_MINOR__)
12 +#define __GNUC_PREREQ(maj, min) \
13 + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
15 +#define __GNUC_PREREQ(maj, min) 0
18 +#if __GNUC_PREREQ(4,4)
19 + typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
20 +# define MAD_F_MLX(hi, lo, x, y) \
22 + u64_di_t __ll = (u64_di_t) (x) * (y); \
28 * This MIPS version is fast and accurate; the disposition of the least
29 * significant bit depends on OPT_ACCURACY via mad_f_scale64().
31 : "%r" ((x) >> 12), "r" ((y) >> 16))
32 # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
34 +#endif /* __GNU_PREREQ(4,4) */
36 # if defined(OPT_SPEED)
37 # define mad_f_scale64(hi, lo) \
38 diff -ur libmad-0.15.1b-orig/mad.h libmad-0.15.1b/mad.h
39 --- libmad-0.15.1b-orig/mad.h 2004-02-17 13:25:44.000000000 +1030
40 +++ libmad-0.15.1b/mad.h 2009-08-05 10:42:40.000000000 +0930
43 # elif defined(FPM_MIPS)
45 +/* Test for gcc >= maj.min, as per __GNUC_PREREQ in glibc */
46 +#if defined (__GNUC__) && defined (__GNUC_MINOR__)
47 +#define __GNUC_PREREQ(maj, min) \
48 + ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
50 +#define __GNUC_PREREQ(maj, min) 0
53 +#if __GNUC_PREREQ(4,4)
54 + typedef unsigned int u64_di_t __attribute__ ((mode (DI)));
55 +# define MAD_F_MLX(hi, lo, x, y) \
57 + u64_di_t __ll = (u64_di_t) (x) * (y); \
63 * This MIPS version is fast and accurate; the disposition of the least
64 * significant bit depends on OPT_ACCURACY via mad_f_scale64().
66 : "%r" ((x) >> 12), "r" ((y) >> 16))
67 # define MAD_F_MLZ(hi, lo) ((mad_fixed_t) (lo))
69 +#endif /* __GNU_PREREQ(4,4) */
71 # if defined(OPT_SPEED)
72 # define mad_f_scale64(hi, lo) \