xref: /aosp_15_r20/external/libxaac/decoder/armv7/ixheaacd_post_radix_compute2.s (revision 15dc779a375ca8b5125643b829a8aa4b70d7f451)
1@/******************************************************************************
2@ *
3@ * Copyright (C) 2018 The Android Open Source Project
4@ *
5@ * Licensed under the Apache License, Version 2.0 (the "License");
6@ * you may not use this file except in compliance with the License.
7@ * You may obtain a copy of the License at:
8@ *
9@ * http://www.apache.org/licenses/LICENSE-2.0
10@ *
11@ * Unless required by applicable law or agreed to in writing, software
12@ * distributed under the License is distributed on an "AS IS" BASIS,
13@ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14@ * See the License for the specific language governing permissions and
15@ * limitations under the License.
16@ *
17@ *****************************************************************************
18@ * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19@*/
20
21
22.text
23.p2align 2
24        .global ixheaacd_postradixcompute2
25        .type ixheaacd_postradixcompute2, %function
26
27
28ixheaacd_postradixcompute2:
29
30    STMFD           sp!, {r4-r12, r14}
31
32    SUB             sp, sp, #20
33
34
35
36
37
38
39
40
41
42
43
44
45    STR             r0, [sp, #16]
46
47
48    ADD             r4, r1, r3, lsl #1
49    MOV             r3, r3, asr #4
50    STR             r3, [sp, #4]
51    MOV             r5, #1
52    STR             r5, [sp]
53
54POSTRADIX2_START:
55
56    LDR             r14, [r2]
57
58    LDMIA           r1!, {r5-r12}
59    ADD             r0, r0, r14
60
61    ADD             r14, r5, r7
62    SUB             r5, r5, r7
63
64    ADD             r7, r9, r11
65    SUB             r9, r9, r11
66
67    ADD             r11, r6, r8
68    SUB             r6, r6, r8
69
70    ADD             r8, r10, r12
71    SUB             r10, r10, r12
72
73    STR             r14, [r0], #4
74    STR             r11, [r0], #32-4
75
76    STR             r7, [r0], #4
77    STR             r8, [r0], #(32+(32<<1))-4
78
79    STR             r5, [r0], #4
80    STR             r6, [r0], #32-4
81
82    STR             r9, [r0], #4
83    STR             r10, [r0], #0
84
85    LDR             r0, [sp, #16]
86
87    LDR             r14, [r2], #4
88
89    LDMIA           r4!, {r5-r12}
90
91    ADD             r0, r0, r14
92
93
94    ADD             r0, r0, #8
95
96    ADD             r14, r5, r7
97    SUB             r5, r5, r7
98
99    ADD             r7, r9, r11
100    SUB             r9, r9, r11
101
102    ADD             r11, r6, r8
103    SUB             r6, r6, r8
104
105    ADD             r8, r10, r12
106    SUB             r10, r10, r12
107
108    STR             r14, [r0], #4
109    STR             r11, [r0], #32-4
110
111    STR             r7, [r0], #4
112    STR             r8, [r0], #(32+(32<<1))-4
113
114    STR             r5, [r0], #4
115    STR             r6, [r0], #32-4
116
117
118    STR             r9, [r0], #4
119    STR             r10, [r0], #0
120
121    SUBS            r3, r3, #1
122
123
124    LDR             r0, [sp, #16]
125    BGT             POSTRADIX2_START
126
127    LDR             r0, [sp, #16]
128
129    LDR             r3, [sp, #4]
130    LDR             r6, [sp]
131
132    ADD             r1, r1, r3, lsl #5
133    ADD             r4, r4, r3, lsl #5
134
135    SUBS            r6, r6, #1
136    STR             r6, [sp]
137
138
139    BPL             POSTRADIX2_START
140
141
142    ADD             sp, sp, #20
143    LDMFD           sp!, {r4-r12, r15}
144
145
146