10c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited
378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License");
578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License.
678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at
778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *      http://www.apache.org/licenses/LICENSE-2.0
978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software
1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS,
1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and
1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License.
1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar *
1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */
1778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/*
180c1bc742181ded4930842b46e9507372f0b1b963James Dong *
190c1bc742181ded4930842b46e9507372f0b1b963James Dong */
200c1bc742181ded4930842b46e9507372f0b1b963James Dong
210c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 24, 1
220c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 25, 1
230c1bc742181ded4930842b46e9507372f0b1b963James Dong
240c1bc742181ded4930842b46e9507372f0b1b963James Dong    .arm
250c1bc742181ded4930842b46e9507372f0b1b963James Dong    .fpu neon
260c1bc742181ded4930842b46e9507372f0b1b963James Dong    .text
270c1bc742181ded4930842b46e9507372f0b1b963James Dong
280c1bc742181ded4930842b46e9507372f0b1b963James Dong    .global armVCM4P10_InterpolateLuma_HorAlign9x_unsafe
290c1bc742181ded4930842b46e9507372f0b1b963James Dong    .func   armVCM4P10_InterpolateLuma_HorAlign9x_unsafe
300c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_InterpolateLuma_HorAlign9x_unsafe:
310c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r12,r8
320c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r7,r0,#3
330c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r0,r0,#3
340c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      pc,pc,r7,LSL #2
350c1bc742181ded4930842b46e9507372f0b1b963James Dong    NOP
360c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy0toAligned
370c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy1toAligned
380c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy2toAligned
390c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy3toAligned
400c1bc742181ded4930842b46e9507372f0b1b963James DongCopy0toAligned:
410c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDM      r0,{r7,r10,r11}
420c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
430c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r0,r0,r1
440c1bc742181ded4930842b46e9507372f0b1b963James Dong    STM      r8!,{r7,r10,r11}
450c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy0toAligned
460c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyEnd
470c1bc742181ded4930842b46e9507372f0b1b963James DongCopy1toAligned:
480c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDM      r0,{r7,r10,r11}
490c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
500c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r0,r0,r1
510c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r7,r7,#8
520c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r7,r10,LSL #24
530c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r10,r10,#8
540c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r10,r10,r11,LSL #24
550c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r11,r11,#8
560c1bc742181ded4930842b46e9507372f0b1b963James Dong    STM      r8!,{r7,r10,r11}
570c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy1toAligned
580c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyEnd
590c1bc742181ded4930842b46e9507372f0b1b963James DongCopy2toAligned:
600c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDM      r0,{r7,r10,r11}
610c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
620c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r0,r0,r1
630c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r7,r7,#16
640c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r7,r10,LSL #16
650c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r10,r10,#16
660c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r10,r10,r11,LSL #16
670c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r11,r11,#16
680c1bc742181ded4930842b46e9507372f0b1b963James Dong    STM      r8!,{r7,r10,r11}
690c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy2toAligned
700c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyEnd
710c1bc742181ded4930842b46e9507372f0b1b963James DongCopy3toAligned:
720c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDM      r0,{r7,r10,r11}
730c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
740c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r0,r0,r1
750c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r7,r7,#24
760c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r7,r10,LSL #8
770c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r10,r10,#24
780c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r10,r10,r11,LSL #8
790c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSR      r11,r11,#24
800c1bc742181ded4930842b46e9507372f0b1b963James Dong    STM      r8!,{r7,r10,r11}
810c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy3toAligned
820c1bc742181ded4930842b46e9507372f0b1b963James DongCopyEnd:
830c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,r12
840c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r1,#0xc
850c1bc742181ded4930842b46e9507372f0b1b963James Dong    BX       lr
860c1bc742181ded4930842b46e9507372f0b1b963James Dong    .endfunc
870c1bc742181ded4930842b46e9507372f0b1b963James Dong
880c1bc742181ded4930842b46e9507372f0b1b963James Dong    .global armVCM4P10_InterpolateLuma_VerAlign4x_unsafe
890c1bc742181ded4930842b46e9507372f0b1b963James Dong    .func   armVCM4P10_InterpolateLuma_VerAlign4x_unsafe
900c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_InterpolateLuma_VerAlign4x_unsafe:
910c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r7,r0,#3
920c1bc742181ded4930842b46e9507372f0b1b963James Dong    BIC      r0,r0,#3
930c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      pc,pc,r7,LSL #2
940c1bc742181ded4930842b46e9507372f0b1b963James Dong    NOP
950c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy0toVAligned
960c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy1toVAligned
970c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy2toVAligned
980c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        Copy3toVAligned
990c1bc742181ded4930842b46e9507372f0b1b963James DongCopy0toVAligned:
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r7,[r0],r1
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r7,[r8],#4
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy0toVAligned
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyVEnd
1050c1bc742181ded4930842b46e9507372f0b1b963James DongCopy1toVAligned:
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r10,[r0,#4]
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r7,[r0],r1
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSL      r10,r10,#24
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r10,r7,LSR #8
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r7,[r8],#4
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy1toVAligned
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyVEnd
1140c1bc742181ded4930842b46e9507372f0b1b963James DongCopy2toVAligned:
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r10,[r0,#4]
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r7,[r0],r1
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSL      r10,r10,#16
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r10,r7,LSR #16
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r7,[r8],#4
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy2toVAligned
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        CopyVEnd
1230c1bc742181ded4930842b46e9507372f0b1b963James DongCopy3toVAligned:
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r10,[r0,#4]
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r7,[r0],r1
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUBS     r9,r9,#1
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong    LSL      r10,r10,#8
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORR      r7,r10,r7,LSR #24
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r7,[r8],#4
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong    BGT      Copy3toVAligned
1310c1bc742181ded4930842b46e9507372f0b1b963James DongCopyVEnd:
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    SUB      r0,r8,#0x1c
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r1,#4
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    BX       lr
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    .endfunc
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    .end
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong
139