h264bsdFillRow7.s revision 0c1bc742181ded4930842b46e9507372f0b1b963
10c1bc742181ded4930842b46e9507372f0b1b963James Dong;
20c1bc742181ded4930842b46e9507372f0b1b963James Dong; Copyright (C) 2009 The Android Open Source Project
30c1bc742181ded4930842b46e9507372f0b1b963James Dong;
40c1bc742181ded4930842b46e9507372f0b1b963James Dong; Licensed under the Apache License, Version 2.0 (the "License");
50c1bc742181ded4930842b46e9507372f0b1b963James Dong; you may not use this file except in compliance with the License.
60c1bc742181ded4930842b46e9507372f0b1b963James Dong; You may obtain a copy of the License at
70c1bc742181ded4930842b46e9507372f0b1b963James Dong;
80c1bc742181ded4930842b46e9507372f0b1b963James Dong;      http://www.apache.org/licenses/LICENSE-2.0
90c1bc742181ded4930842b46e9507372f0b1b963James Dong;
100c1bc742181ded4930842b46e9507372f0b1b963James Dong; Unless required by applicable law or agreed to in writing, software
110c1bc742181ded4930842b46e9507372f0b1b963James Dong; distributed under the License is distributed on an "AS IS" BASIS,
120c1bc742181ded4930842b46e9507372f0b1b963James Dong; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
130c1bc742181ded4930842b46e9507372f0b1b963James Dong; See the License for the specific language governing permissions and
140c1bc742181ded4930842b46e9507372f0b1b963James Dong; limitations under the License.
150c1bc742181ded4930842b46e9507372f0b1b963James Dong;
160c1bc742181ded4930842b46e9507372f0b1b963James Dong
170c1bc742181ded4930842b46e9507372f0b1b963James Dong    REQUIRE8
180c1bc742181ded4930842b46e9507372f0b1b963James Dong    PRESERVE8
190c1bc742181ded4930842b46e9507372f0b1b963James Dong
200c1bc742181ded4930842b46e9507372f0b1b963James Dong    AREA    |.text|, CODE
210c1bc742181ded4930842b46e9507372f0b1b963James Dong
220c1bc742181ded4930842b46e9507372f0b1b963James Dong    EXPORT h264bsdFillRow7
230c1bc742181ded4930842b46e9507372f0b1b963James Dong
240c1bc742181ded4930842b46e9507372f0b1b963James Dong; Input / output registers
250c1bc742181ded4930842b46e9507372f0b1b963James Dong
260c1bc742181ded4930842b46e9507372f0b1b963James Dongref     RN 0
270c1bc742181ded4930842b46e9507372f0b1b963James Dongfill    RN 1
280c1bc742181ded4930842b46e9507372f0b1b963James Dongleft    RN 2
290c1bc742181ded4930842b46e9507372f0b1b963James Dongtmp2    RN 2
300c1bc742181ded4930842b46e9507372f0b1b963James Dongcenter  RN 3
310c1bc742181ded4930842b46e9507372f0b1b963James Dongright   RN 4
320c1bc742181ded4930842b46e9507372f0b1b963James Dongtmp1    RN 5
330c1bc742181ded4930842b46e9507372f0b1b963James Dong
340c1bc742181ded4930842b46e9507372f0b1b963James Dong; -- NEON registers --
350c1bc742181ded4930842b46e9507372f0b1b963James Dong
360c1bc742181ded4930842b46e9507372f0b1b963James DongqTmp0   QN  Q0.U8
370c1bc742181ded4930842b46e9507372f0b1b963James DongqTmp1   QN  Q1.U8
380c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp0   DN  D0.U8
390c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp1   DN  D1.U8
400c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp2   DN  D2.U8
410c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp3   DN  D3.U8
420c1bc742181ded4930842b46e9507372f0b1b963James Dong
430c1bc742181ded4930842b46e9507372f0b1b963James Dong
440c1bc742181ded4930842b46e9507372f0b1b963James Dong;/*------------------------------------------------------------------------------
450c1bc742181ded4930842b46e9507372f0b1b963James Dong;
460c1bc742181ded4930842b46e9507372f0b1b963James Dong;    Function: h264bsdFillRow7
470c1bc742181ded4930842b46e9507372f0b1b963James Dong;
480c1bc742181ded4930842b46e9507372f0b1b963James Dong;        Functional description:
490c1bc742181ded4930842b46e9507372f0b1b963James Dong;
500c1bc742181ded4930842b46e9507372f0b1b963James Dong;        Inputs:
510c1bc742181ded4930842b46e9507372f0b1b963James Dong;
520c1bc742181ded4930842b46e9507372f0b1b963James Dong;        Outputs:
530c1bc742181ded4930842b46e9507372f0b1b963James Dong;
540c1bc742181ded4930842b46e9507372f0b1b963James Dong;        Returns:
550c1bc742181ded4930842b46e9507372f0b1b963James Dong;
560c1bc742181ded4930842b46e9507372f0b1b963James Dong;------------------------------------------------------------------------------*/
570c1bc742181ded4930842b46e9507372f0b1b963James Dong
580c1bc742181ded4930842b46e9507372f0b1b963James Dongh264bsdFillRow7
590c1bc742181ded4930842b46e9507372f0b1b963James Dong        PUSH     {r4-r6,lr}
600c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP      left, #0
610c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR      right, [sp,#0x10]
620c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ      switch_center
630c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDRB     tmp1, [ref,#0]
640c1bc742181ded4930842b46e9507372f0b1b963James Dong
650c1bc742181ded4930842b46e9507372f0b1b963James Dongloop_left
660c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUBS     left, left, #1
670c1bc742181ded4930842b46e9507372f0b1b963James Dong        STRB     tmp1, [fill], #1
680c1bc742181ded4930842b46e9507372f0b1b963James Dong        BNE      loop_left
690c1bc742181ded4930842b46e9507372f0b1b963James Dong
700c1bc742181ded4930842b46e9507372f0b1b963James Dongswitch_center
710c1bc742181ded4930842b46e9507372f0b1b963James Dong        ASR      tmp2,center,#2
720c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP      tmp2,#9
730c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADDCC    pc,pc,tmp2,LSL #2
740c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        loop_center
750c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        loop_center
760c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_1
770c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_2
780c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_3
790c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_4
800c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_5
810c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_6
820c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_7
830c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        case_8
840c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_8
850c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref], #4
860c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
870c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
880c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_7
890c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref], #4
900c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
910c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
920c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_6
930c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref], #4
940c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
950c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill],#4
960c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_5
970c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref], #4
980c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
990c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill],#4
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_4
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref],#4
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_3
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref],#4
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_2
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref],#4
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong;case_1
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong;        LDR      tmp2, [ref],#4
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong;        SUB      center, center, #4
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong;        STR      tmp2, [fill], #4
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong
1170c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_8
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {qTmp0, qTmp1}, [ref]!
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #32
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    qTmp0, [fill]!
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    qTmp1, [fill]!
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1230c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_7
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dTmp0,dTmp1,dTmp2}, [ref]!
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #28
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     tmp2, [ref], #4
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    {dTmp0,dTmp1,dTmp2}, [fill]!
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong        STR     tmp2, [fill],#4
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1300c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_6
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dTmp0,dTmp1,dTmp2}, [ref]!
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #24
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    {dTmp0,dTmp1,dTmp2}, [fill]!
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1350c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_5
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    qTmp0, [ref]!
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #20
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     tmp2, [ref], #4
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    qTmp0, [fill]!
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong        STR     tmp2, [fill],#4
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1420c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_4
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    qTmp0, [ref]!
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #16
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    qTmp0, [fill]!
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1470c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_3
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dTmp0, [ref]!
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB     center, center, #12
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     tmp2, [ref], #4
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp0, [fill]!
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong        STR     tmp2, [fill],#4
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       loop_center
1540c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_2
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR      tmp2, [ref],#4
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB      center, center, #4
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong        STR      tmp2, [fill], #4
1580c1bc742181ded4930842b46e9507372f0b1b963James Dongcase_1
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR      tmp2, [ref],#4
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUB      center, center, #4
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong        STR      tmp2, [fill], #4
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong
1630c1bc742181ded4930842b46e9507372f0b1b963James Dongloop_center
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP      center, #0
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDRBNE   tmp2, [ref], #1
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUBNE    center, center, #1
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong        STRBNE   tmp2, [fill], #1
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong        BNE      loop_center
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong        CMP      right,#0
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong        POPEQ    {r4-r6,pc}
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDRB     tmp2, [ref,#-1]
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong
1730c1bc742181ded4930842b46e9507372f0b1b963James Dongloop_right
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong        STRB     tmp2, [fill], #1
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong        SUBS     right, right, #1
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong        BNE      loop_right
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong        POP      {r4-r6,pc}
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong        END
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong
181