[xiph-commits] r11493 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Thu Jun 1 08:15:23 PDT 2006


Author: jm
Date: 2006-06-01 08:15:18 -0700 (Thu, 01 Jun 2006)
New Revision: 11493

Modified:
   trunk/speex/libspeex/fixed_bfin.h
Log:
saved a few cycles on Blackfin by using the assembly constraints properly


Modified: trunk/speex/libspeex/fixed_bfin.h
===================================================================
--- trunk/speex/libspeex/fixed_bfin.h	2006-06-01 14:34:22 UTC (rev 11492)
+++ trunk/speex/libspeex/fixed_bfin.h	2006-06-01 15:15:18 UTC (rev 11493)
@@ -108,14 +108,12 @@
    spx_word32_t res;
    __asm__
    (
-         "%1 <<= 1;\n\t"
-         "A1 = %2.L*%1.L (M,IS);\n\t"
-         "A1 = A1 >>> 16;\n\t"
-         "R1 = (A1 += %2.L*%1.H) (IS);\n\t"
-         "%0 = R1;\n\t"
-   : "=&d" (res), "=&d" (b)
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H) ;\n\t"
+   : "=&W" (res), "=&d" (b)
    : "d" (a), "1" (b)
-   : "A1", "R1"
+   : "A1"
    );
    return res;
 }
@@ -126,14 +124,13 @@
    spx_word32_t res;
    __asm__
          (
-         "%1 <<= 1;\n\t"
-         "A1 = %2.L*%1.L (M,IS);\n\t"
-         "A1 = A1 >>> 16;\n\t"
-         "R1 = (A1 += %2.L*%1.H) (IS);\n\t"
-         "%0 = R1 + %4;\n\t"
-   : "=&d" (res), "=&d" (b)
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H);\n\t"
+         "%0 = %0 + %4;\n\t"
+   : "=&W" (res), "=&d" (b)
    : "d" (a), "1" (b), "d" (c)
-   : "A1", "R1"
+   : "A1"
          );
    return res;
 }
@@ -144,14 +141,13 @@
    spx_word32_t res;
    __asm__
          (
-         "%2 <<= 2;\n\t"
-         "A1 = %1.L*%2.L (M,IS);\n\t"
-         "A1 = A1 >>> 16;\n\t"
-         "R1 = (A1 += %1.L*%2.H) (IS);\n\t"
-         "%0 = R1;\n\t"
-   : "=d" (res), "=d" (a), "=d" (b)
+         "%2 <<= 1;\n\t"
+         "A1 = %1.L*%2.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %1.L*%2.H);\n\t"
+   : "=W" (res), "=d" (a), "=d" (b)
    : "1" (a), "2" (b)
-   : "A1", "R1"
+   : "A1"
          );
    return res;
 }
@@ -162,14 +158,14 @@
    spx_word32_t res;
    __asm__
          (
-         "%1 <<= 2;\n\t"
-         "A1 = %2.L*%1.L (M,IS);\n\t"
-         "A1 = A1 >>> 16;\n\t"
-         "R1 = (A1 += %2.L*%1.H) (IS);\n\t"
-         "%0 = R1 + %4;\n\t"
-   : "=&d" (res), "=&d" (b)
+         "%1 <<= 1;\n\t"
+         "A1 = %2.L*%1.L (M);\n\t"
+         "A1 = A1 >>> 15;\n\t"
+         "%0 = (A1 += %2.L*%1.H);\n\t"
+         "%0 = %0 + %4;\n\t"
+   : "=&W" (res), "=&d" (b)
    : "d" (a), "1" (b), "d" (c)
-   : "A1", "R1"
+   : "A1"
          );
    return res;
 }



More information about the commits mailing list