Home | History | Annotate | Download | only in src_gcc
      1 /*
      2  * Copyright (C) 2007-2008 ARM Limited
      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  *
     19  */
     20 
     21     .eabi_attribute 24, 1
     22     .eabi_attribute 25, 1
     23 
     24     .arm
     25     .fpu neon
     26     .text
     27 
     28     .global armVCM4P10_InterpolateLuma_HorAlign9x_unsafe
     29 armVCM4P10_InterpolateLuma_HorAlign9x_unsafe:
     30     MOV      r12,r8
     31     AND      r7,r0,#3
     32     BIC      r0,r0,#3
     33     ADD      pc,pc,r7,LSL #2
     34     NOP
     35     B        Copy0toAligned
     36     B        Copy1toAligned
     37     B        Copy2toAligned
     38     B        Copy3toAligned
     39 Copy0toAligned:
     40     LDM      r0,{r7,r10,r11}
     41     SUBS     r9,r9,#1
     42     ADD      r0,r0,r1
     43     STM      r8!,{r7,r10,r11}
     44     BGT      Copy0toAligned
     45     B        CopyEnd
     46 Copy1toAligned:
     47     LDM      r0,{r7,r10,r11}
     48     SUBS     r9,r9,#1
     49     ADD      r0,r0,r1
     50     LSR      r7,r7,#8
     51     ORR      r7,r7,r10,LSL #24
     52     LSR      r10,r10,#8
     53     ORR      r10,r10,r11,LSL #24
     54     LSR      r11,r11,#8
     55     STM      r8!,{r7,r10,r11}
     56     BGT      Copy1toAligned
     57     B        CopyEnd
     58 Copy2toAligned:
     59     LDM      r0,{r7,r10,r11}
     60     SUBS     r9,r9,#1
     61     ADD      r0,r0,r1
     62     LSR      r7,r7,#16
     63     ORR      r7,r7,r10,LSL #16
     64     LSR      r10,r10,#16
     65     ORR      r10,r10,r11,LSL #16
     66     LSR      r11,r11,#16
     67     STM      r8!,{r7,r10,r11}
     68     BGT      Copy2toAligned
     69     B        CopyEnd
     70 Copy3toAligned:
     71     LDM      r0,{r7,r10,r11}
     72     SUBS     r9,r9,#1
     73     ADD      r0,r0,r1
     74     LSR      r7,r7,#24
     75     ORR      r7,r7,r10,LSL #8
     76     LSR      r10,r10,#24
     77     ORR      r10,r10,r11,LSL #8
     78     LSR      r11,r11,#24
     79     STM      r8!,{r7,r10,r11}
     80     BGT      Copy3toAligned
     81 CopyEnd:
     82     MOV      r0,r12
     83     MOV      r1,#0xc
     84     BX       lr
     85 
     86     .global armVCM4P10_InterpolateLuma_VerAlign4x_unsafe
     87 armVCM4P10_InterpolateLuma_VerAlign4x_unsafe:
     88     AND      r7,r0,#3
     89     BIC      r0,r0,#3
     90     ADD      pc,pc,r7,LSL #2
     91     NOP
     92     B        Copy0toVAligned
     93     B        Copy1toVAligned
     94     B        Copy2toVAligned
     95     B        Copy3toVAligned
     96 Copy0toVAligned:
     97     LDR      r7,[r0],r1
     98     SUBS     r9,r9,#1
     99     STR      r7,[r8],#4
    100     BGT      Copy0toVAligned
    101     B        CopyVEnd
    102 Copy1toVAligned:
    103     LDR      r10,[r0,#4]
    104     LDR      r7,[r0],r1
    105     SUBS     r9,r9,#1
    106     LSL      r10,r10,#24
    107     ORR      r7,r10,r7,LSR #8
    108     STR      r7,[r8],#4
    109     BGT      Copy1toVAligned
    110     B        CopyVEnd
    111 Copy2toVAligned:
    112     LDR      r10,[r0,#4]
    113     LDR      r7,[r0],r1
    114     SUBS     r9,r9,#1
    115     LSL      r10,r10,#16
    116     ORR      r7,r10,r7,LSR #16
    117     STR      r7,[r8],#4
    118     BGT      Copy2toVAligned
    119     B        CopyVEnd
    120 Copy3toVAligned:
    121     LDR      r10,[r0,#4]
    122     LDR      r7,[r0],r1
    123     SUBS     r9,r9,#1
    124     LSL      r10,r10,#8
    125     ORR      r7,r10,r7,LSR #24
    126     STR      r7,[r8],#4
    127     BGT      Copy3toVAligned
    128 CopyVEnd:
    129     SUB      r0,r8,#0x1c
    130     MOV      r1,#4
    131     BX       lr
    132 
    133     .end
    134 
    135