• 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.text
23.p2align 2
24    .global ixheaacd_tns_parcor_lpc_convert_armv7
25ixheaacd_tns_parcor_lpc_convert_armv7:
26    STMFD           SP!, {R2, R4-R12, R14}
27    SUB             SP, SP, #128
28    MOV             R4, SP
29    MOV             R8, #0
30    MOV             R5, #0x8000
31
32OUTLOOP:
33    MOV             R6, #0
34    MOV             R7, #16
35LOOP1:
36    STR             R6, [R4], #4
37    STR             R6, [R4, #60]
38    SUBS            R7, R7, #1
39    BGT             LOOP1
40
41    SUB             R4, R4, #64
42    MOV             R9, #0x7FFFFFFF
43    MOV             R10, R9, ASR R8
44
45
46    MOV             R7, R3
47LOOP2:
48    MOV             R11, R10
49    LDRSH           R2, [R4], #2
50    LDRSH           R14, [R0], #2
51    MOV             R12, R3
52
53LOOP2_1:
54    SMULBB          R2, R2, R14
55    QADD            R14, R10, R5
56    CMP             R2, #0x40000000
57    MOV             R14, R14, ASR #16
58    MOVNE           R2, R2, LSL #1
59    MOVEQ           R2, #0x7FFFFFFF
60    QADD            R10, R10, R2
61    STRH            R14, [R4, #62]
62    MOVS            R2, R10
63    RSBSMI          R2, R2, #0
64    MOVMI           R2, #0x7FFFFFFF
65    CMP             R2, #0x7FFFFFFF
66    MOVEQ           R6, #1
67    SUBS            R12, R12, #1
68@   LDRGTSH     R2, [R4], #2
69@   LDRGTSH     R14, [R0], #2
70    LDRSHGT         R2, [R4], #2
71    LDRSHGT         R14, [R0], #2
72    BGT             LOOP2_1
73
74    LDRSH           R2, [R4, #62]
75    MOV             R12, R3
76LOOP2_2:
77    LDRSH           R14, [R0, #-2]!
78    LDRSH           R9, [R4, #-2]!
79    SMULBB          R2, R2, R14
80    MOV             R9, R9, LSL #16
81    CMP             R2, #0x40000000
82    MOVNE           R2, R2, LSL #1
83    MOVEQ           R2, #0x7FFFFFFF
84    QADD            R9, R9, R2
85    LDRSH           R2, [R4, #62]
86    QADD            R14, R9, R5
87    MOVS            R9, R9
88    MOV             R14, R14, ASR #16
89    STRH            R14, [R4, #2]
90@   RSBMIS      R9, R9, #0
91    RSBSMI          R9, R9, #0
92    MOVMI           R9, #0x7FFFFFFF
93    CMP             R9, #0x7FFFFFFF
94    MOVEQ           R6, #1
95    SUBS            R12, R12, #1
96    BGT             LOOP2_2
97
98    QADD            R11, R11, R5
99    QADD            R2, R10, R5
100    MOV             R11, R11, ASR #16
101    MOV             R2, R2, ASR #16
102    STRH            R11, [R4]
103    STRH            R2, [R1], #2
104    MOV             R10, #0
105
106    SUBS            R7, R7, #1
107    BGE             LOOP2
108
109    SUB             R1, R1, R3, LSL #1
110    SUB             R1, R1, #2
111    SUBS            R10, R6, #1
112    ADDEQ           R8, R8, #1
113    BEQ             OUTLOOP
114
115    LDR             R2, [SP, #128]
116    ADD             SP, SP, #132
117    STRH            R8, [R2]
118    LDMFD           sp!, {r4-r12, r15}
119
120
121
122
123