mk/image.mk: Ship /init in initramfs
[openadk.git] / package / libmad / patches / patch-fixed_h
blob3e6eb292d968a31531ce6160d7bb14f46bb7faba
1 --- libmad-0.15.1b.orig/fixed.h 2004-02-17 03:02:03.000000000 +0100
2 +++ libmad-0.15.1b/fixed.h      2013-10-16 10:51:56.000000000 +0200
3 @@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
4          : "+r" (lo), "+r" (hi)  \
5          : "%r" (x), "r" (y))
6  
7 +#ifdef __thumb__
8 +/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero
9 +       operand.  If needed this code can also support Thumb-1 
10 +       (simply append "s" to the end of the second two instructions). */
11 +#  define MAD_F_MLN(hi, lo)  \
12 +    asm ("rsbs        %0, %0, #0\n\t"  \
13 +        "sbc   %1, %1, %1\n\t"  \
14 +        "sub   %1, %1, %2"  \
15 +        : "+&r" (lo), "=&r" (hi)  \
16 +        : "r" (hi)  \
17 +        : "cc")
18 +#else /* ! __thumb__ */
19  #  define MAD_F_MLN(hi, lo)  \
20      asm ("rsbs %0, %2, #0\n\t"  \
21          "rsc   %1, %3, #0"  \
22 -        : "=r" (lo), "=r" (hi)  \
23 +        : "=&r" (lo), "=r" (hi)  \
24          : "0" (lo), "1" (hi)  \
25          : "cc")
26 +#endif /* __thumb__ */
28  #  define mad_f_scale64(hi, lo)  \
29      ({ mad_fixed_t __result;  \
30 @@ -297,6 +310,14 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t
32  /* --- MIPS ---------------------------------------------------------------- */
34 +# elif defined(FPM_MIPS) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
35 +   typedef unsigned int u64_di_t __attribute__ ((mode (DI))); 
36 +#  define MAD_F_MLX(hi, lo, x, y) \
37 +   do { \
38 +      u64_di_t __ll = (u64_di_t) (x) * (y); \
39 +      hi = __ll >> 32; \
40 +      lo = __ll; \
41 +   } while (0)
42  # elif defined(FPM_MIPS)
44  /*