~ubuntu-branches/ubuntu/saucy/libmad/saucy

« back to all changes in this revision

Viewing changes to debian/patches/Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff

  • Committer: Package Import Robot
  • Author(s): Kurt Roeckx, Konstantinos Margaritis
  • Date: 2011-03-29 22:26:22 UTC
  • mfrom: (4.1.4 sid)
  • Revision ID: package-import@ubuntu.com-20110329222622-pjk317uel7nybnjg
Tags: 0.15.1b-6
[ Konstantinos Margaritis ]
* Add support for armhf (Closes: #596936)
  - libmad.thumb.diff: use "adr" instead of "add" to make code ready for
    thumb2
  - Provide-Thumb-2-alternative-code-for-MAD_F_MLN.diff: fix another
    ftbfs with thumb2 as "rsc" doesnt exist anymore - thanks to Dave
    Martin for this patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
--- libmad/fixed.h      2010-09-15 12:49:18.340305000 +0000
2
 
+++ libmad/fixed.h      2010-09-15 12:55:50.333757001 +0000
3
 
@@ -275,12 +275,25 @@
 
1
From: Dave Martin
 
2
Subject: "rsc" doesnt exist anymore in thumb2
 
3
 
 
4
diff --git a/fixed.h b/fixed.h
 
5
index 4b58abf..ba4bc26 100644
 
6
--- a/fixed.h
 
7
+++ b/fixed.h
 
8
@@ -275,12 +275,25 @@ mad_fixed_t mad_f_mul_inline(mad_fixed_t x, mad_fixed_t y)
4
9
         : "+r" (lo), "+r" (hi)  \
5
10
         : "%r" (x), "r" (y))
6
11
 
9
14
+       operand.  If needed this code can also support Thumb-1 
10
15
+       (simply append "s" to the end of the second two instructions). */
11
16
+#  define MAD_F_MLN(hi, lo)  \
12
 
+    asm ("rsbs %0, %0, #0\n\t"  \
 
17
+    asm ("rsbs %0, %2, #0\n\t"  \
13
18
+        "sbc   %1, %1, %1\n\t"  \
14
 
+        "sub   %1, %1, %2"  \
15
 
+        : "+&r" (lo), "=&r" (hi)  \
16
 
+        : "r" (hi)  \
 
19
+        "sub   %1, %1, %3\n\t"  \
 
20
+        : "=&r" (lo), "=&r" (hi)  \
 
21
+        : "0" (lo), "1" (hi)  \
17
22
+        : "cc")
18
23
+#else /* ! __thumb__ */
19
24
 #  define MAD_F_MLN(hi, lo)  \