summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2006-09-01 17:13:21 +0000
committerMichael Sevakis <jethead71@rockbox.org>2006-09-01 17:13:21 +0000
commit43715c2199f63739ff4c0fee9dc099b83bcac55b (patch)
tree08e46e443185af1cdc3ea9571734d806f8cc0ce7
parent75c2f89172c92dd62b66ea0c6b76b102a1145aef (diff)
downloadrockbox-43715c2199f63739ff4c0fee9dc099b83bcac55b.tar.gz
rockbox-43715c2199f63739ff4c0fee9dc099b83bcac55b.zip
Hopefully this tweak to the Coldfire assembly in mp3_enc.c will fix the compiling problem for cygwin users
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10847 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/mp3_enc.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/apps/codecs/mp3_enc.c b/apps/codecs/mp3_enc.c
index 1cd84988aa..12db9a5243 100644
--- a/apps/codecs/mp3_enc.c
+++ b/apps/codecs/mp3_enc.c
@@ -2418,16 +2418,15 @@ void filter_subband(int s[SBLIMIT], int off, int k)
2418{ 2418{
2419 short *enwindow = enwindow_int; 2419 short *enwindow = enwindow_int;
2420 int i, tmp = 0; 2420 int i, tmp = 0;
2421#ifdef CPU_COLDFIRE 2421#ifdef CPU_COLDFIRE
2422 int reg_buff[14]; /* register storage buffer */ 2422 short *yint = y_int;
2423#endif 2423#endif
2424 2424
2425
2425 /* 36864=72*512: shift samples into proper window positions */ 2426 /* 36864=72*512: shift samples into proper window positions */
2426#ifdef CPU_COLDFIRE 2427#ifdef CPU_COLDFIRE
2427 { short *xint = &x_int[k][off]; 2428 { short *xint = &x_int[k][off];
2428 short *yint = y_int;
2429 2429
2430 asm volatile ("movem.l %%d0/%%d2-%%d7/%%a2-%%a7,%0\n" : "=m" (*(int*)reg_buff));
2431 asm volatile( 2430 asm volatile(
2432 "moveq.l #32, %%d0\n" 2431 "moveq.l #32, %%d0\n"
2433 "move.l %%d0, %[i]\n" /* set loop counter */ 2432 "move.l %%d0, %[i]\n" /* set loop counter */
@@ -2474,11 +2473,9 @@ void filter_subband(int s[SBLIMIT], int off, int k)
2474 "sub.l #1, %[i]\n" 2473 "sub.l #1, %[i]\n"
2475 "jbne loop_start\n" 2474 "jbne loop_start\n"
2476 2475
2477 : [xint] "+a" (xint), [yint] "+a" (yint), [i] "+m" (i) 2476 : [xint] "+a" (xint), [yint] "+a" (yint), [i] "+m" (i), [enwindow] "+a" (enwindow)
2478 : [enwindow] "a" (enwindow) 2477 :
2479 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a2", "a3", "a4", "a5"); 2478 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a2", "a3", "a4", "a5");
2480
2481 asm volatile ("movem.l %0,%%d0/%%d2-%%d7/%%a2-%%a7\n" : : "m" (*(int*)reg_buff));
2482 } 2479 }
2483#else 2480#else
2484 for(i=0; i<64; i++) 2481 for(i=0; i<64; i++)
@@ -2488,6 +2485,10 @@ void filter_subband(int s[SBLIMIT], int off, int k)
2488 y_int[i] = (short)((tmp + (1<<18)) >> 19); 2485 y_int[i] = (short)((tmp + (1<<18)) >> 19);
2489 } 2486 }
2490#endif 2487#endif
2488
2489#ifdef CPU_COLDFIRE
2490 yint = y_int;
2491#endif
2491 2492
2492 /* 147456=72*2048 */ 2493 /* 147456=72*2048 */
2493 for(i=SBLIMIT; i--; ) // SBLIMIT: 32 2494 for(i=SBLIMIT; i--; ) // SBLIMIT: 32
@@ -2568,7 +2569,8 @@ void filter_subband(int s[SBLIMIT], int off, int k)
2568 "mac.w %%d7l, %%a5l, %%acc0\n" 2569 "mac.w %%d7l, %%a5l, %%acc0\n"
2569 "lea.l (-31*4, %[yint]), %[yint]\n" /* wrap yint back to start */ 2570 "lea.l (-31*4, %[yint]), %[yint]\n" /* wrap yint back to start */
2570 "movclr.l %%acc0, %[tmp]" 2571 "movclr.l %%acc0, %[tmp]"
2571 : [tmp] "=r" (tmp) : [filt] "a" (filt), [yint] "a" (y_int) 2572 : [tmp] "=r" (tmp), [yint] "+a" (yint)
2573 : [filt] "a" (filt)
2572 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5" ); 2574 : "d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7", "a5" );
2573 } 2575 }
2574#else 2576#else