~ubuntu-branches/ubuntu/raring/mumble/raring

« back to all changes in this revision

Viewing changes to speex/libspeex/ltp_bfin.h

  • Committer: Bazaar Package Importer
  • Author(s): Thorvald Natvig
  • Date: 2010-01-09 19:28:50 UTC
  • mfrom: (9.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100109192850-zs4g5vwrrpd71kob
Tags: 1.2.1-2
Fix upgrade failure when upgrading mumble-server directly from 1.1.x
to 1.2.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
   Redistribution and use in source and binary forms, with or without
9
9
   modification, are permitted provided that the following conditions
10
10
   are met:
11
 
 
 
11
   
12
12
   - Redistributions of source code must retain the above copyright
13
13
   notice, this list of conditions and the following disclaimer.
14
 
 
 
14
   
15
15
   - Redistributions in binary form must reproduce the above copyright
16
16
   notice, this list of conditions and the following disclaimer in the
17
17
   documentation and/or other materials provided with the distribution.
18
 
 
 
18
   
19
19
   - Neither the name of the Xiph.org Foundation nor the names of its
20
20
   contributors may be used to endorse or promote products derived from
21
21
   this software without specific prior written permission.
22
 
 
 
22
   
23
23
   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24
24
   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25
25
   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
118
118
   __asm__ __volatile__
119
119
         (
120
120
         "A0 = 0;\n\t"
121
 
 
 
121
         
122
122
         "R0 = W[%1++];\n\t"
123
123
         "R1.L = %2.L*%5.L (IS);\n\t"
124
124
         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
125
 
 
 
125
         
126
126
         "R1.L = %3.L*%5.L (IS);\n\t"
127
127
         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
128
 
 
 
128
         
129
129
         "R1.L = %4.L*%5.L (IS);\n\t"
130
130
         "A0 += R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
131
 
 
 
131
         
132
132
         "R1.L = %2.L*%3.L (IS);\n\t"
133
133
         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
134
134
 
135
135
         "R1.L = %4.L*%3.L (IS);\n\t"
136
136
         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
137
 
 
 
137
         
138
138
         "R1.L = %4.L*%2.L (IS);\n\t"
139
139
         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
140
 
 
 
140
         
141
141
         "R1.L = %2.L*%2.L (IS);\n\t"
142
142
         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
143
143
 
144
144
         "R1.L = %3.L*%3.L (IS);\n\t"
145
145
         "A0 -= R1.L*R0.L (IS) || R0 = W[%1++];\n\t"
146
 
 
 
146
         
147
147
         "R1.L = %4.L*%4.L (IS);\n\t"
148
148
         "A0 -= R1.L*R0.L (IS);\n\t"
149
 
 
 
149
         
150
150
         "%0 = A0;\n\t"
151
151
   : "=&D" (sum), "=a" (C)
152
152
   : "d" (g[0]), "d" (g[1]), "d" (g[2]), "d" (pitch_control), "1" (C)
203
203
"          R2 = MAX(R1,R3);\n\t"
204
204
"eu2:      [P0++] = R2;\n\t"
205
205
       : : "d" (energy), "d" (&sw[-start-1]), "d" (&sw[-start+len-1]),
206
 
           "a" (end-start)
 
206
           "a" (end-start)  
207
207
       : "P0", "I1", "I2", "R0", "R1", "R2", "R3", "ASTAT" BFIN_HWLOOP1_REGS
208
208
       );
209
209
 
232
232
"        P0 = %4;\n\t"                     /* P0: best pitch  */
233
233
"        P1 = %4;\n\t"                     /* P1: counter     */
234
234
"        LSETUP (sl1, sl2) LC1 = %3;\n\t"
235
 
"sl1:      R0.L = W [I0++] || R1.L = W [I1++];\n\t"
 
235
"sl1:      R0.L = W [I0++] || R1.L = W [I1++];\n\t"         
236
236
"          R0 = R0.L * R0.L (IS);\n\t"
237
237
"          R1   += 1;\n\t"
238
238
"          R4   = R0.L * R3.L;\n\t"
244
244
"sl2:      P1 += 1;\n\t"
245
245
"        %0 = P0;\n\t"
246
246
       : "=&d" (pitch[0])
247
 
       : "a" (corr16), "a" (ener16), "a" (end+1-start), "d" (start)
 
247
       : "a" (corr16), "a" (ener16), "a" (end+1-start), "d" (start) 
248
248
       : "P0", "P1", "I0", "I1", "R0", "R1", "R2", "R3", "R4", "R5",
249
249
         "ASTAT", "CC" BFIN_HWLOOP1_REGS
250
250
       );
338
338
"          R4 += 32;\n\t"
339
339
"          R4.H = 64;\n\t"                 /* R4.H: pitch_control    */
340
340
 
341
 
"          R0  = B [P0++] (X);\n\t"
 
341
"          R0  = B [P0++] (X);\n\t"              
342
342
"          B0  = R0;\n\t"                  /* BO: gain_sum         */
343
 
 
 
343
          
344
344
           /* compute_pitch_error() -------------------------------*/
345
345
 
346
346
"          I1 = %3;\n\t"                   /* I1: ptr to C         */
347
347
"          A0 = 0;\n\t"
348
 
 
 
348
         
349
349
"          R0.L = W[I1++];\n\t"
350
350
"          R1.L = R2.L*R4.H (IS);\n\t"
351
351
"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
352
 
 
 
352
         
353
353
"          R1.L = R3.L*R4.H (IS);\n\t"
354
354
"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
355
 
 
 
355
         
356
356
"          R1.L = R4.L*R4.H (IS);\n\t"
357
357
"          A0 += R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
358
 
 
 
358
         
359
359
"          R1.L = R2.L*R3.L (IS);\n\t"
360
360
"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
361
361
 
362
362
"          R1.L = R4.L*R3.L (IS);\n\t"
363
363
"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
364
 
 
 
364
         
365
365
"          R1.L = R4.L*R2.L (IS);\n\t"
366
366
"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
367
 
 
 
367
         
368
368
"          R1.L = R2.L*R2.L (IS);\n\t"
369
369
"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
370
370
 
371
371
"          R1.L = R3.L*R3.L (IS);\n\t"
372
372
"          A0 -= R1.L*R0.L (IS) || R0.L = W[I1++];\n\t"
373
 
 
 
373
         
374
374
"          R1.L = R4.L*R4.L (IS);\n\t"
375
375
"          R0 = (A0 -= R1.L*R0.L) (IS);\n\t"
376
376
 
393
393
"          R1 = B0\n\t"
394
394
"          R2 = %5\n\t"
395
395
"          R3 = %6\n\t"
396
 
"          cc = R2 <= R1;\n\t"
 
396
"          cc = R2 <= R1;\n\t" 
397
397
"          if cc R0 = R3;\n\t"
398
398
"          cc = %0 <= R0;\n\t"
399
399
"          if cc %0 = R0;\n\t"
400
400
"          if cc %1 = P1;\n\t"
401
401
 
402
402
"pgs2:     P1 += 1;\n\t"
403
 
 
404
 
       : "=&d" (best_sum), "=&d" (best_cdbk)
 
403
   
 
404
       : "=&d" (best_sum), "=&d" (best_cdbk) 
405
405
       : "a" (gain_cdbk), "a" (C16), "a" (gain_cdbk_size), "a" (max_gain),
406
406
         "b" (-VERY_LARGE32)
407
 
       : "R0", "R1", "R2", "R3", "R4", "P0",
 
407
       : "R0", "R1", "R2", "R3", "R4", "P0", 
408
408
         "P1", "I1", "L1", "A0", "B0", "CC", "ASTAT" BFIN_HWLOOP1_REGS
409
409
       );
410
410