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

jm at motherfish-iii.xiph.org jm at motherfish-iii.xiph.org
Sun Jun 5 21:14:36 PDT 2005


Author: jm
Date: 2005-06-05 21:14:33 -0700 (Sun, 05 Jun 2005)
New Revision: 9366

Modified:
   trunk/speex/libspeex/cb_search_bfin.h
   trunk/speex/libspeex/filters_bfin.h
   trunk/speex/libspeex/fixed_bfin.h
   trunk/speex/libspeex/lpc_bfin.h
   trunk/speex/libspeex/ltp_bfin.h
   trunk/speex/libspeex/misc_bfin.h
   trunk/speex/libspeex/vq_bfin.h
Log:
Removed workaround (LOOP_END offset) for the LSETUP assembler bug.


Modified: trunk/speex/libspeex/cb_search_bfin.h
===================================================================
--- trunk/speex/libspeex/cb_search_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/cb_search_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -56,15 +56,15 @@
             "R0 = B[P4++] (X) || R1.L = W[I1--];\n\t"
             "LOOP inner%= LC1 = P0;\n\t"
             "LOOP_BEGIN inner%=;\n\t"
+               "A0 += R0.L*R1.L (IS) || R0 = B[P4++] (X) || R1.L = W[I1--];\n\t" /* Is there a danger of reading too far? */
             "LOOP_END inner%=;\n\t"
-               "A0 += R0.L*R1.L (IS) || R0 = B[P4++] (X) || R1.L = W[I1--];\n\t" /* Is there a danger of reading too far? */
             "R0 = A0;\n\t"
             "R0 >>>= 11;\n\t"
             "A1 += R0.L*R0.L (IS);\n\t"
             "W[P3++] = R0;\n\t"
             "P0 += 1;\n\t"
+            "P2 += 2;\n\t"
          "LOOP_END outter%=;\n\t"
-            "P2 += 2;\n\t"
          "P4 = %4;\n\t"
          "R1 = A1;\n\t"
          "[P4] = R1;\n\t"

Modified: trunk/speex/libspeex/filters_bfin.h
===================================================================
--- trunk/speex/libspeex/filters_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/filters_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -48,8 +48,8 @@
    "LOOP_BEGIN norm_max%=;\n\t"
       "R1 = [I0++];\n\t"
       "R1 = ABS R1;\n\t"
-   "LOOP_END norm_max%=;\n\t"
       "%0 = MAX(%0, R1);\n\t"
+   "LOOP_END norm_max%=;\n\t"
    : "=d" (max_val)
    : "a" (x), "a" (len)
    : "R1"
@@ -74,9 +74,8 @@
       "R1 = ASHIFT R0 by %2.L || R2 = [I0++];\n\t"
       "R3 = ASHIFT R2 by %2.L || R0 = [I0++];\n\t"
       "R3 = PACK(R3.L, R1.L);\n\t"
-   "LOOP_END norm_shift%=;\n\t"
       "[I1++] = R3;\n\t"
-   
+   "LOOP_END norm_shift%=;\n\t"
    : : "a" (x), "a" (y), "d" (-sig_shift), "a" (len)
    : "I0", "L0", "I1", "L1", "R0", "R1", "R2", "R3", "memory"
    );
@@ -152,8 +151,8 @@
          "A1 += R4.L*R5.L (IS);\n\t"
          "R4.L = W[I1++];\n\t"
          "R5.L = W[I3--];\n\t"
-      "LOOP_END filter_start_inner%=;\n\t"
          "A1 -= R4.L*R5.L (IS);\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
    
       "R1 = A1;\n\t"
       "R1 <<= 1;\n\t"
@@ -163,8 +162,8 @@
       "R1 <<= 2;\n\t"
       "W[P3] = R1.H;\n\t"
       "R2 <<= 2;\n\t"
-   "LOOP_END filter_start%=;\n\t"
       "W[P2] = R2.H;\n\t"
+   "LOOP_END filter_start%=;\n\t"
 
    /* Samples ord to N*/   
    "R0 = %7;\n\t"
@@ -194,8 +193,8 @@
       "LOOP filter_mid_inner%= LC1;\n\t"
       "LOOP_BEGIN filter_mid_inner%=;\n\t"
          "A1 += R4.L*R5.L (IS) || R4.L = W[I0++] || R5.L = W[I2--];\n\t"
-      "LOOP_END filter_mid_inner%=;\n\t"
          "A1 -= R6.L*R7.L (IS) || R6.L = W[I1++] || R7.L = W[I3--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
       "R1 = A1;\n\t"
       "R1 <<= 1;\n\t"
       "R2 = [P0++];\n\t"
@@ -204,8 +203,8 @@
       "R1 <<= 2;\n\t"
       "W[P3] = R1.H;\n\t"
       "R2 <<= 2;\n\t"
-   "LOOP_END filter_mid%=;\n\t"
       "W[P2] = R2.H;\n\t"
+   "LOOP_END filter_mid%=;\n\t"
      
    /* Update memory */
    "P4 = %8;\n\t"
@@ -230,11 +229,11 @@
       "LOOP mem_accum%= LC1;\n\t"
       "LOOP_BEGIN mem_accum%=;\n\t"
          "A0 += R4.L*R5.L (IS) || R4.L = W[I0++] || R5.L = W[I2--];\n\t"
-      "LOOP_END mem_accum%=;\n\t"
          "A0 -= R6.L*R7.L (IS) || R6.L = W[I1++] || R7.L = W[I3--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
       "R0 = A0;\n\t"
-   "LOOP_END mem_update%=;\n\t"
       "[P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
 
    : : "m" (xx), "m" (yy), "m" (_x), "m" (_y), "m" (num), "m" (den), "m" (N), "m" (ord), "m" (mem)
    : "R0", "R1", "R2", "R3", "R4", "R5", "R7", "P0", "P1", "P2", "P3", "P4", "B0", "B1", "I0", "I1", "I2", "I3", "L0", "L1", "L2", "L3", "memory"
@@ -298,8 +297,8 @@
       "LOOP_BEGIN filter_start_inner%=;\n\t"
          "R4.L = W[I1++];\n\t"
          "R5.L = W[I3--];\n\t"
-      "LOOP_END filter_start_inner%=;\n\t"
          "A1 -= R4.L*R5.L (IS);\n\t"
+      "LOOP_END filter_start_inner%=;\n\t"
    
       "R1 = A1;\n\t"
       "R1 <<= 1;\n\t"
@@ -308,8 +307,8 @@
       "[P1++] = R1;\n\t"
       "R1 <<= 2;\n\t"
       "W[P3] = R1.H;\n\t"
-   "LOOP_END filter_start%=;\n\t"
       "R2 <<= 2;\n\t"
+   "LOOP_END filter_start%=;\n\t"
 
    /* Samples ord to N*/   
    "R0 = %5;\n\t"
@@ -331,8 +330,8 @@
       "R7.L = W[I3--];\n\t"
       "LOOP filter_mid_inner%= LC1;\n\t"
       "LOOP_BEGIN filter_mid_inner%=;\n\t"
-      "LOOP_END filter_mid_inner%=;\n\t"
          "A1 -= R6.L*R7.L (IS) || R6.L = W[I1++] || R7.L = W[I3--];\n\t"
+      "LOOP_END filter_mid_inner%=;\n\t"
       "R1 = A1;\n\t"
       "R1 <<= 1;\n\t"
       "R2 = [P0++];\n\t"
@@ -340,8 +339,8 @@
       "[P1++] = R1;\n\t"
       "R1 <<= 2;\n\t"
       "W[P3] = R1.H;\n\t"
-   "LOOP_END filter_mid%=;\n\t"
       "R2 <<= 2;\n\t"
+   "LOOP_END filter_mid%=;\n\t"
      
    /* Update memory */
    "P4 = %6;\n\t"
@@ -361,11 +360,11 @@
       "R6.L = W[I1++];\n\t"
       "LOOP mem_accum%= LC1;\n\t"
       "LOOP_BEGIN mem_accum%=;\n\t"
-      "LOOP_END mem_accum%=;\n\t"
          "A0 -= R6.L*R7.L (IS) || R6.L = W[I1++] || R7.L = W[I3--];\n\t"
+      "LOOP_END mem_accum%=;\n\t"
       "R0 = A0;\n\t"
-   "LOOP_END mem_update%=;\n\t"
       "[P4++] = R0;\n\t"
+   "LOOP_END mem_update%=;\n\t"
 
    : : "m" (yy), "m" (_x), "m" (_y), "m" (den), "m" (N), "m" (ord), "m" (mem)
    : "R0", "R1", "R2", "R3", "R4", "R5", "R7", "P0", "P1", "P2", "P3", "P4", "B0", "B1", "I0", "I1", "I2", "I3", "L0", "L1", "L2", "L3", "memory"

Modified: trunk/speex/libspeex/fixed_bfin.h
===================================================================
--- trunk/speex/libspeex/fixed_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/fixed_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -49,8 +49,8 @@
          "DIVS (R0, R1);\n\t"
          "LOOP divide%= LC0 = P0;\n\t"
          "LOOP_BEGIN divide%=;\n\t"
+            "DIVQ (R0, R1);\n\t"
          "LOOP_END divide%=;\n\t"
-         "DIVQ (R0, R1);\n\t"
          "R0 = R0.L;\n\t"
          "%0 = R0;\n\t"
    : "=m" (res)

Modified: trunk/speex/libspeex/lpc_bfin.h
===================================================================
--- trunk/speex/libspeex/lpc_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/lpc_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -94,16 +94,16 @@
             "LOOP inner_prod%= LC1 = P3 >> 1;\n\t"
             "LOOP_BEGIN inner_prod%=;\n\t"
                "A0 += R0.L*R1.L , A1 += R0.L*R1.H (is) || R1.L = W[I1++];\n\t"
+               "A0 += R0.H*R1.H , A1 += R0.H*R1.L (is) || R1.H = W[I1++] || R0 = [I0++];\n\t"
             "LOOP_END inner_prod%=;\n\t"
-               "A0 += R0.H*R1.H , A1 += R0.H*R1.L (is) || R1.H = W[I1++] || R0 = [I0++];\n\t"
             "A0 = ASHIFT A0 by R4.L;\n\t"
             "A1 = ASHIFT A1 by R4.L;\n\t"
    
             "R2 = A0, R3 = A1;\n\t"
             "[P1--] = R2;\n\t"
             "[P1--] = R3;\n\t"
+            "P0 += 4;\n\t"
          "LOOP_END pitch%=;\n\t"
-            "P0 += 4;\n\t"
    : : "m" (xs), "m" (x), "m" (ac32top), "m" (N_lag), "m" (lag_1), "m" (nshift)
    : "A0", "A1", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "R3", "R4", "I0", "I1", "L0", "L1", "B0", "B1", "memory"
    );

Modified: trunk/speex/libspeex/ltp_bfin.h
===================================================================
--- trunk/speex/libspeex/ltp_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/ltp_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -47,8 +47,8 @@
       "R0.L = W[I0++] || R1.L = W[I1++];\n\t"
       "LOOP inner%= LC0 = P0;\n\t"
       "LOOP_BEGIN inner%=;\n\t"
+         "A0 += R0.L*R1.L (IS) || R0.L = W[I0++] || R1.L = W[I1++];\n\t"
       "LOOP_END inner%=;\n\t"
-         "A0 += R0.L*R1.L (IS) || R0.L = W[I0++] || R1.L = W[I1++];\n\t"
       "A0 = A0 >>> 6;\n\t"
       "R0 = A0;\n\t"
       "%0 = R0;\n\t"
@@ -87,15 +87,15 @@
          "LOOP inner_prod%= LC1 = P3 >> 1;\n\t"
          "LOOP_BEGIN inner_prod%=;\n\t"
             "A0 += R0.L*R1.L , A1 += R0.L*R1.H (is) || R1.L = W[I1++];\n\t"
+            "A0 += R0.H*R1.H , A1 += R0.H*R1.L (is) || R1.H = W[I1++] || R0 = [I0++];\n\t"
          "LOOP_END inner_prod%=;\n\t"
-            "A0 += R0.H*R1.H , A1 += R0.H*R1.L (is) || R1.H = W[I1++] || R0 = [I0++];\n\t"
          "A0 = A0 >>> 6;\n\t"
          "A1 = A1 >>> 6;\n\t"
          "R2 = A0, R3 = A1;\n\t"
          "[P1--] = r2;\n\t"
          "[P1--] = r3;\n\t"
+         "P0 += 4;\n\t"
       "LOOP_END pitch%=;\n\t"
-         "P0 += 4;\n\t"
    : : "m" (_x), "m" (_y), "m" (corr), "m" (len), "m" (nb_pitch)
    : "A0", "A1", "P0", "P1", "P2", "P3", "P4", "R0", "R1", "R2", "R3", "I0", "I1", "L0", "L1", "B0", "B1", "memory"
    );

Modified: trunk/speex/libspeex/misc_bfin.h
===================================================================
--- trunk/speex/libspeex/misc_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/misc_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -38,9 +38,9 @@
          (
          "LOOP move%= LC0 = %2;\n\t"
          "LOOP_BEGIN move%=;\n\t"
-         "R0 = [%0++];\n\t"
+            "R0 = [%0++];\n\t"
+            "[%1++] = R0;\n\t"
          "LOOP_END move%=;\n\t"
-         "[%1++] = R0;\n\t"
    : "=a" (src), "=a" (dest)
    : "a" (n>>2), "0" (src), "1" (dest)
    : "R0", "memory"

Modified: trunk/speex/libspeex/vq_bfin.h
===================================================================
--- trunk/speex/libspeex/vq_bfin.h	2005-06-06 03:41:09 UTC (rev 9365)
+++ trunk/speex/libspeex/vq_bfin.h	2005-06-06 04:14:33 UTC (rev 9366)
@@ -48,8 +48,8 @@
             "R0.L = W[%1++%4] || R1.L = W[I0++];\n\t"
             "LOOP vq_loop%= LC0 = %2;\n\t"
             "LOOP_BEGIN vq_loop%=;\n\t"
+               "%0 = (A0 -= R0.L*R1.L) (IS) || R0.L = W[%1++%4] || R1.L = W[I0++];\n\t"
             "LOOP_END vq_loop%=;\n\t"
-               "%0 = (A0 -= R0.L*R1.L) (IS) || R0.L = W[%1++%4] || R1.L = W[I0++];\n\t"
             "%0 = (A0 -= R0.L*R1.L) (IS);\n\t"
          : "=D" (dist), "=a" (codebook)
          : "a" (len-1), "a" (in), "a" (2), "1" (codebook), "0" (E[i])



More information about the commits mailing list