• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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        .code 32
23       .eabi_attribute 24, 1            @Tag_ABI_align_needed
24       .eabi_attribute 25, 1            @Tag_ABI_align_preserved
25.text
26.p2align 2
27    .global ixheaacd_shiftrountine_with_rnd
28    .type ixheaacd_shiftrountine_with_rnd, %function
29ixheaacd_shiftrountine_with_rnd:
30    STMFD           sp!, {r4-r12, r14}
31    MOV             r4, #0x1f
32    ADD             r12, r2, r3, LSL #1
33    MOV             r9, #0x8000
34    SUBS            r3, r3, #1
35    BMI             S_WITH_R_L6
36
37S_WITH_R_L5:
38    LDR             r5, [r1, r3, LSL #2]
39    LDR             r7, [r0, r3, LSL #2]
40    LDR             r14, [r0], #4
41    LDR             r10, [r1], #4
42
43    ADD             r6, r5, r7
44    SUB             r5, r5, r7
45    ADD             r7, r10, r14
46    SUB             r4, r10, r14
47
48
49
50
51
52
53
54
55
56
57
58    MOVS            r10, r4, ASR #0x15
59    CMNLT           r10, #1
60
61    MOVLT           r4, #0x80000000
62    MVNGT           r4, #0x80000000
63    MOVEQ           r4, r4, LSL #10
64
65    MOVS            r10, r5, ASR #0x15
66    QADD            r4, r4, r9
67    CMNLT           r10, #1
68    MOV             r4, r4, ASR #16
69    MOVLT           r5, #0x80000000
70    MVNGT           r5, #0x80000000
71    MOVEQ           r5, r5, LSL #10
72    MOV             r14, r3, lsl #1
73
74
75    MOVS            r10, r6, ASR #0x15
76    QADD            r5, r5, r9
77    CMNLT           r10, #1
78    MOV             r5, r5, ASR #16
79    MOVLT           r6, #0x80000000
80
81    STRH            r5, [r2, r14]
82    MVNGT           r6, #0x80000000
83    MOVEQ           r6, r6, LSL #10
84
85    MOVS            r10, r7, ASR #0x15
86    QADD            r6, r6, r9
87    CMNLT           r10, #1
88    MOV             r6, r6, ASR #16
89    MOVLT           r7, #0x80000000
90    MVNGT           r7, #0x80000000
91    MOVEQ           r7, r7, LSL #10
92
93    QADD            r7, r7, r9
94    STRH            r4, [r2], #2
95
96    MOV             r7, r7, ASR #16
97
98
99    STRH            r7, [r12, r14]
100    SUBS            r3, r3, #2
101    STRH            r6, [r12], #2
102    BGE             S_WITH_R_L5
103S_WITH_R_L6:
104    LDMFD           sp!, {r4-r12, r15}
105
106
107
108
109
110
111
112
113