1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Tomasz Malesinski
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
24 /* This performs slower in IRAM on PP502x and there is no space in
25 mpegplayer on the PP5002 */
26 #if defined(CPU_PP502x) || (CONFIG_CPU == PP5002 && defined(MPEGPLAYER)) || defined(TOSHIBA_GIGABEAT_F)
27 .section .text,"ax",%progbits
29 .section .icode,"ax",%progbits
33 stmdb r13!, {r4, r5, r6, r7, r8, r9, r10, r11, r12, lr}
45 sub r4, r5, r3, lsl #4
46 add r3, r5, r3, lsl #4
50 sub r8, r6, r8, lsl #1
54 sub lr, r7, lr, lsl #1
58 sub r9, r10, r9, lsl #1
62 sub r12, r11, r12, lsl #1
64 sub r10, r6, r10, lsl #1
66 sub r11, r7, r11, lsl #1
68 sub r12, r8, r12, lsl #1
70 sub r9, lr, r9, lsl #1
71 stmia r0!, {r6, r7, r8, r9, r10, r11, r12, lr}
79 ldmia r2, {r4, r5, r8, r9}
80 ldmia r1, {r6, r7, r10, r11}
82 sub r4, r6, r4, lsl #1
84 sub r5, r7, r5, lsl #1
88 sub r8, r9, r8, lsl #1
91 adc r4, r4, r6, lsl #4
94 adc r5, r5, r6, lsl #4
96 sub r4, r10, r4, lsl #1
98 sub r5, r11, r5, lsl #1
100 stmia r1!, {r10, r11}
101 ldmia r2, {r5, r6, r8, r11}
102 ldmia r1, {r4, r7, r9, r10}
104 sub r6, r4, r6, lsl #1
106 sub r5, r7, r5, lsl #1
110 sub r8, r11, r8, lsl #1
113 adc r5, r5, r4, lsl #4
114 smull r6, r4, r11, r0
116 adc r6, r6, r4, lsl #4
118 sub r5, r9, r5, lsl #1
120 add r6, r10, r6, lsl #1
135 smlal r6, r5, r10, r8
137 adc r6, r6, r5, lsl #4
138 smull r10, r5, r7, r10
140 smlal r10, r5, r8, r9
141 movs r10, r10, lsr #28
142 adc r5, r10, r5, lsl #4
145 sub r5, r7, r5, lsl #1
147 sub r6, r8, r6, lsl #1
167 add r12, lr, r12, lsl #3
168 ldmia r1!, {r10, r11}
171 sub r10, r6, r10, lsl #1
173 sub r7, r11, r7, lsl #1
175 smull r9, r8, r11, r12
176 smlal r9, r8, lr, r10
178 adc r9, r9, r8, lsl #4
179 smull lr, r8, r11, lr
181 smlal lr, r8, r10, r12
183 adc r8, lr, r8, lsl #4
185 sub r8, r6, r8, lsl #1
187 sub r9, r7, r9, lsl #1
190 smull lr, r12, r8, r11
191 smlal lr, r12, r9, r10
193 adc r12, lr, r12, lsl #4
198 smull lr, r12, r8, r10
200 smlal lr, r12, r9, r11
202 adc r12, lr, r12, lsl #4
203 add lr, r5, r0, lsl #6
206 ldmia r3!, {r10, r11}
207 smull lr, r12, r7, r10
208 smlal lr, r12, r6, r11
210 adc r12, lr, r12, lsl #4
215 smull lr, r12, r6, r10
217 smlal lr, r12, r7, r11
219 adc r12, lr, r12, lsl #4
220 sub lr, r4, r0, lsl #6
227 ldmia r13!, {r4, r5, r6, r7, r8, r9, r10, r11, r12, pc}