1 Fixes Thumb2-related build failure
3 Patch below comes from the Debian libmad package.
5 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
8 Subject: "rsc" doesnt exist anymore in thumb2
10 diff --git a/fixed.h b/fixed.h
11 index 4b58abf..ba4bc26 100644
14 @@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
15 : "+r" (lo), "+r" (hi) \
19 +/* In Thumb-2, the RSB-immediate instruction is only allowed with a zero
20 + operand. If needed this code can also support Thumb-1
21 + (simply append "s" to the end of the second two instructions). */
22 +# define MAD_F_MLN(hi, lo) \
23 + asm ("rsbs %0, %0, #0\n\t" \
24 + "sbc %1, %1, %1\n\t" \
26 + : "+&r" (lo), "=&r" (hi) \
29 +#else /* ! __thumb__ */
30 # define MAD_F_MLN(hi, lo) \
31 asm ("rsbs %0, %2, #0\n\t" \
33 - : "=r" (lo), "=r" (hi) \
34 + : "=&r" (lo), "=r" (hi) \
35 : "0" (lo), "1" (hi) \
37 +#endif /* __thumb__ */
39 # define mad_f_scale64(hi, lo) \
40 ({ mad_fixed_t __result; \