Debian Codegraph @

aacenc/src/asm/ARMV5E/PrePostMDCT_v5.s

raw
1 @/*
2 @ ** Copyright 2003-2010, VisualOn, Inc.
3 @ **
4 @ ** Licensed under the Apache License, Version 2.0 (the "License");
5 @ ** you may not use this file except in compliance with the License.
6 @ ** You may obtain a copy of the License at
7 @ **
8 @ ** http://www.apache.org/licenses/LICENSE-2.0
9 @ **
10 @ ** Unless required by applicable law or agreed to in writing, software
11 @ ** distributed under the License is distributed on an "AS IS" BASIS,
12 @ ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 @ ** See the License for the specific language governing permissions and
14 @ ** limitations under the License.
15 @ */
16
17 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
18 @ File: PrePostMDCT_v5.s
19 @
20 @ Content: premdct and postmdct function armv5 assemble
21 @
22 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
23
24 .section .text
25 .global PreMDCT
26
27 PreMDCT:
28 stmdb sp!, {r4 - r11, lr}
29
30 add r9, r0, r1, lsl #2
31 sub r3, r9, #8
32
33 movs r1, r1, asr #2
34 beq PreMDCT_END
35
36 PreMDCT_LOOP:
37 ldr r8, [r2], #4
38 ldr r9, [r2], #4
39
40 ldrd r4, [r0]
41 ldrd r6, [r3]
42
43 smull r14, r11, r4, r8 @ MULHIGH(tr1, cosa)
44 smull r10, r12, r7, r8 @ MULHIGH(ti1, cosa)
45
46 smull r14, r8, r7, r9 @ MULHIGH(ti1, sina)
47 smull r7, r10, r4, r9 @ MULHIGH(tr1, sina)
48
49 add r11, r11, r8 @ MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@
50 sub r7, r12, r10 @ MULHIGH(ti1, cosa) - MULHIGH(tr1, sina)
51
52 ldr r8, [r2], #4
53 ldr r9, [r2], #4
54
55 smull r14, r4, r6, r8 @ MULHIGH(tr2, cosa)
56 smull r10, r12, r5, r8 @ MULHIGH(ti2, cosa)
57
58 smull r14, r8, r5, r9 @ MULHIGH(ti2, sina)
59 smull r5, r10, r6, r9 @ MULHIGH(tr2, sina)
60
61 add r8, r8, r4
62 sub r9, r12, r10
63
64 mov r6, r11
65
66 strd r6, [r0]
67 strd r8, [r3]
68
69 subs r1, r1, #1
70 sub r3, r3, #8
71 add r0, r0, #8
72 bne PreMDCT_LOOP
73
74 PreMDCT_END:
75 ldmia sp!, {r4 - r11, pc}
76 @ENDP @ |PreMDCT|
77
78 .section .text
79 .global PostMDCT
80
81 PostMDCT:
82 stmdb sp!, {r4 - r11, lr}
83
84 add r9, r0, r1, lsl #2
85 sub r3, r9, #8
86
87 movs r1, r1, asr #2
88 beq PostMDCT_END
89
90 PostMDCT_LOOP:
91 ldr r8, [r2], #4
92 ldr r9, [r2], #4
93
94 ldrd r4, [r0]
95 ldrd r6, [r3]
96
97 smull r14, r11, r4, r8 @ MULHIGH(tr1, cosa)
98 smull r10, r12, r5, r8 @ MULHIGH(ti1, cosa)
99
100 smull r14, r8, r5, r9 @ MULHIGH(ti1, sina)
101 smull r5, r10, r4, r9 @ MULHIGH(tr1, sina)
102
103 add r4, r11, r8 @ MULHIGH(cosa, tr1) + MULHIGH(sina, ti1)@
104 sub r11, r10, r12 @ MULHIGH(ti1, cosa) - MULHIGH(tr1, sina)@
105
106 ldr r8, [r2], #4 @
107 ldr r9, [r2], #4
108
109 smull r14, r5, r6, r8 @ MULHIGH(tr2, cosa)
110 smull r10, r12, r7, r8 @ MULHIGH(ti2, cosa)
111
112 smull r14, r8, r7, r9 @ MULHIGH(ti2, sina)
113 smull r7, r10, r6, r9 @ MULHIGH(tr2, sina)
114
115 add r6, r8, r5 @ MULHIGH(cosb, tr2) + MULHIGH(sinb, ti2)@
116 sub r5, r10, r12 @ MULHIGH(sinb, tr2) - MULHIGH(cosb, ti2)@
117
118 mov r7, r11
119
120 strd r4, [r0]
121 strd r6, [r3]
122
123 subs r1, r1, #1
124 sub r3, r3, #8
125 add r0, r0, #8
126 bne PostMDCT_LOOP
127
128 PostMDCT_END:
129 ldmia sp!, {r4 - r11, pc}
130 @ENDP @ |PostMDCT|
131 .end