1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
10 * Copyright (C) 2007 by Tomasz Malesinski
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.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
26 .section ICODE_SECTION_MPA_ARM,"ax",%progbits
29 stmdb sp!, {r4-r11, lr}
41 sub r4, r5, r3, lsl #4
42 add r3, r5, r3, lsl #4
46 sub r8, r6, r8, lsl #1
50 sub lr, r7, lr, lsl #1
54 sub r9, r10, r9, lsl #1
58 sub r12, r11, r12, lsl #1
60 sub r10, r6, r10, lsl #1
62 sub r11, r7, r11, lsl #1
64 sub r12, r8, r12, lsl #1
66 sub r9, lr, r9, lsl #1
67 stmia r0!, {r6, r7, r8, r9, r10, r11, r12, lr}
75 ldmia r2, {r4, r5, r8, r9}
76 ldmia r1, {r6, r7, r10, r11}
78 sub r4, r6, r4, lsl #1
80 sub r5, r7, r5, lsl #1
84 sub r8, r9, r8, lsl #1
87 adc r4, r4, r6, lsl #4
90 adc r5, r5, r6, lsl #4
92 sub r4, r10, r4, lsl #1
94 sub r5, r11, r5, lsl #1
97 ldmia r2, {r5, r6, r8, r11}
98 ldmia r1, {r4, r7, r9, r10}
100 sub r6, r4, r6, lsl #1
102 sub r5, r7, r5, lsl #1
106 sub r8, r11, r8, lsl #1
109 adc r5, r5, r4, lsl #4
110 smull r6, r4, r11, r0
112 adc r6, r6, r4, lsl #4
114 sub r5, r9, r5, lsl #1
116 add r6, r10, r6, lsl #1
131 smlal r6, r5, r10, r8
133 adc r6, r6, r5, lsl #4
134 smull r10, r5, r7, r10
136 smlal r10, r5, r8, r9
137 movs r10, r10, lsr #28
138 adc r5, r10, r5, lsl #4
141 sub r5, r7, r5, lsl #1
143 sub r6, r8, r6, lsl #1
163 add r12, lr, r12, lsl #3
164 ldmia r1!, {r10, r11}
167 sub r10, r6, r10, lsl #1
169 sub r7, r11, r7, lsl #1
171 smull r9, r8, r11, r12
172 smlal r9, r8, lr, r10
174 adc r9, r9, r8, lsl #4
175 smull lr, r8, r11, lr
177 smlal lr, r8, r10, r12
179 adc r8, lr, r8, lsl #4
181 sub r8, r6, r8, lsl #1
183 sub r9, r7, r9, lsl #1
186 smull lr, r12, r8, r11
187 smlal lr, r12, r9, r10
189 adc r12, lr, r12, lsl #4
194 smull lr, r12, r8, r10
196 smlal lr, r12, r9, r11
198 adc r12, lr, r12, lsl #4
199 add lr, r5, r0, lsl #6
202 ldmia r3!, {r10, r11}
203 smull lr, r12, r7, r10
204 smlal lr, r12, r6, r11
206 adc r12, lr, r12, lsl #4
211 smull lr, r12, r6, r10
213 smlal lr, r12, r7, r11
215 adc r12, lr, r12, lsl #4
216 sub lr, r4, r0, lsl #6
223 ldmia sp!, {r4-r11, pc}