Fix up configure and buildzip/wpsbuild.pl a bit
[kugel-rb.git] / apps / codecs / libmusepack / synth_filter_coldfire.S
blob758ab3d4969cfc287db2be20063701424a3fa296
1 /***************************************************************************
2  *             __________               __   ___.
3  *   Open      \______   \ ____   ____ |  | _\_ |__   _______  ___
4  *   Source     |       _//  _ \_/ ___\|  |/ /| __ \ /  _ \  \/  /
5  *   Jukebox    |    |   (  <_> )  \___|    < | \_\ (  <_> > <  <
6  *   Firmware   |____|_  /\____/ \___  >__|_ \|___  /\____/__/\_ \
7  *                     \/            \/     \/    \/            \/
8  * $Id$
9  *
10  * Copyright (C) 2005 by Thom Johansen 
11  *
12  * This program is free software; you can redistribute it and/or
13  * modify it under the terms of the GNU General Public License
14  * as published by the Free Software Foundation; either version 2
15  * of the License, or (at your option) any later version.
16  *
17  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18  * KIND, either express or implied.
19  *
20  ****************************************************************************/
22 #include "config.h"
24  * static void 
25  * mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, 
26  *                         const MPC_SAMPLE_FORMAT * V,
27  *                         const MPC_SAMPLE_FORMAT * D)
28  */
30 #if defined(USE_IRAM)
31     .section .icode
32 #else
33     .text
34 #endif
35     .align 2
36     .global     mpc_decoder_windowing_D
37     .type       mpc_decoder_windowing_D, @function
39 mpc_decoder_windowing_D:
40     lea.l    (-9*4, %sp), %sp
41     movem.l  %d2-%d7/%a2-%a4, (%sp)       | save some registers
42     movem.l  (9*4+4, %sp), %a0-%a2        | a0 = Data, a1 = V, a2 = D
43     moveq.l  #32, %d0                     | loop counter
45     move.l   (%a1), %a4
46     0:                                    | loop
47     movem.l  (%a2), %d1-%d7/%a3
49     mac.l %d1, %a4, ( 96*4, %a1), %a4, %acc0
50     mac.l %d2, %a4, (128*4, %a1), %a4, %acc0
51     mac.l %d3, %a4, (224*4, %a1), %a4, %acc0
52     mac.l %d4, %a4, (256*4, %a1), %a4, %acc0
53     mac.l %d5, %a4, (352*4, %a1), %a4, %acc0
54     mac.l %d6, %a4, (384*4, %a1), %a4, %acc0
55     mac.l %d7, %a4, (480*4, %a1), %a4, %acc0
56     mac.l %a3, %a4, (512*4, %a1), %a4, %acc0
57     movem.l (8*4, %a2), %d1-%d7/%a3
58     mac.l %d1, %a4, (608*4, %a1), %a4, %acc0
59     mac.l %d2, %a4, (640*4, %a1), %a4, %acc0
60     mac.l %d3, %a4, (736*4, %a1), %a4, %acc0
61     mac.l %d4, %a4, (768*4, %a1), %a4, %acc0
62     mac.l %d5, %a4, (864*4, %a1), %a4, %acc0
63     mac.l %d6, %a4, (896*4, %a1), %a4, %acc0
64     mac.l %d7, %a4, (992*4, %a1), %a4, %acc0
65     mac.l %a3, %a4, (    4, %a1), %a4, %acc0
67     lea.l    (16*4, %a2), %a2
68     addq.l   #4, %a1
69     movclr.l %acc0, %d1
70     lsl.l    #1, %d1
71     move.l   %d1, (%a0)+
72     subq.l   #1, %d0
73     bne 0b
75     movem.l  (%sp), %d2-%d7/%a2-%a4       | restore stacked regs
76     lea.l    (9*4, %sp), %sp
77     rts