Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37889609
en ru br
ALT Linux repos
S:0.15.1b-alt9
5.0: 0.15.1b-alt4
4.1: 0.15.1b-alt3
4.0: 0.15.1b-alt3
3.0: 0.15.1b-alt2

Group :: Sound
RPM: libmad

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libmad-0.15.1b-speedup.patch
Download


diff -ur libmad-0.15.1b.orig/fixed.h libmad-0.15.1b/fixed.h
--- libmad-0.15.1b.orig/fixed.h	2004-02-17 05:02:03 +0300
+++ libmad-0.15.1b/fixed.h	2004-02-18 22:30:37 +0300
@@ -202,9 +202,11 @@
 	    : "0" (lo), "1" (hi),  \
 	      "ir" (1L << (MAD_F_SCALEBITS - 1)), "ir" (0)  \
 	    : "cc");  \
-       asm ("shrdl %3,%2,%1"  \
+       asm ("shrl %3,%1\n\t"  \
+	    "shll %4,%2\n\t"  \
+	    "orl %2,%1\n\t"  \
 	    : "=rm" (__result)  \
-	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS)  \
+	    : "0" (__lo_), "r" (__hi_), "I" (MAD_F_SCALEBITS), "I" (32-MAD_F_SCALEBITS) \
 	    : "cc");  \
        __result;  \
     })
@@ -226,9 +228,11 @@
 #   else
 #    define mad_f_scale64(hi, lo)  \
     ({ mad_fixed_t __result;  \
-       asm ("shrdl %3,%2,%1"  \
+       asm ("shrl %3,%1\n\t"  \
+	    "shll %4,%2\n\t"  \
+	    "orl %2,%1\n\t"  \
 	    : "=rm" (__result)  \
-	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS)  \
+	    : "0" (lo), "r" (hi), "I" (MAD_F_SCALEBITS), "I" (32-MAD_F_SCALEBITS) \
 	    : "cc");  \
        __result;  \
     })
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin