Home | History | Annotate | Download | only in armv7
      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_calc_max_spectral_line_armv7
     25 
     26 ixheaacd_calc_max_spectral_line_armv7:
     27 
     28     STMFD           sp!, {R4-R12, R14}
     29     MOV             R4, R1, LSR #3
     30     MOV             R6, R4, LSL #3
     31     VMOV.S32        D6, #0x00000000
     32     VMOV.S32        D7, #0x00000000
     33 
     34 LOOP_1:
     35     VLD1.32         {D0, D1}, [R0]!
     36 
     37     VLD1.32         {D2, D3}, [R0]!
     38     VABS.S32        Q0, Q0
     39 
     40 
     41     VABS.S32        Q1, Q1
     42     SUBS            R4, R4, #1
     43 
     44     VORR            Q3, Q0, Q3
     45 
     46     VORR            Q3, Q1, Q3
     47     BGT             LOOP_1
     48 
     49     SUBS            R7, R1, R6
     50 
     51     VMOV.32         R4, D6[0]
     52     VMOV.32         R1, D6[1]
     53     VMOV.32         R2, D7[0]
     54     ORR             R4, R4, R1
     55     VMOV.32         R3, D7[1]
     56     ORR             R4, R4, R2
     57 
     58 
     59     ORR             R4, R4, R3
     60     BEQ             END_FUNC
     61 LOOP_2:
     62 
     63     LDR             R2, [R0], #4
     64     MOVS            R2, R2
     65     RSBMI           R2, R2, #0
     66     ORR             R4, R4, R2
     67     SUBS            R7, R7, #1
     68     BGT             LOOP_2
     69 
     70 END_FUNC:
     71 
     72     MOVS            R0, R4
     73     MVNMI           R0, R0
     74     CLZ             R0, R0
     75     SUB             R0, R0, #1
     76 
     77     LDMFD           sp!, {R4-R12, R15}
     78 
     79 
     80 
     81 
     82 
     83