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;//
170c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
180c1bc742181ded4930842b46e9507372f0b1b963James Dong;// File Name:  armVCM4P10_InterpolateLuma_Copy_unsafe_s.s
190c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OpenMAX DL: v1.0.2
200c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Revision:   12290
210c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Date:       Wednesday, April 9, 2008
220c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
230c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
240c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
250c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
260c1bc742181ded4930842b46e9507372f0b1b963James Dong
270c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Function:
280c1bc742181ded4930842b46e9507372f0b1b963James Dong;//     armVCM4P10_InterpolateLuma_Copy4x4_unsafe
290c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
300c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Implements copy from an arbitrary aligned source memory location (pSrc) to an aligned
310c1bc742181ded4930842b46e9507372f0b1b963James Dong;// destination pointed by (pDst)
320c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
330c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Registers preserved for top level function
340c1bc742181ded4930842b46e9507372f0b1b963James Dong;// r1,r3,r4,r5,r6,r7,r10,r11,r14
350c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
360c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Registers modified by the function
370c1bc742181ded4930842b46e9507372f0b1b963James Dong;// r0,r2,r8,r9,r12
380c1bc742181ded4930842b46e9507372f0b1b963James Dong
390c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE omxtypes_s.h
400c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE armCOMM_s.h
410c1bc742181ded4930842b46e9507372f0b1b963James Dong
420c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_VARIANTS ARM1136JS
430c1bc742181ded4930842b46e9507372f0b1b963James Dong
440c1bc742181ded4930842b46e9507372f0b1b963James Dong        EXPORT armVCM4P10_InterpolateLuma_Copy4x4_unsafe
450c1bc742181ded4930842b46e9507372f0b1b963James Dong
460c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare input registers
470c1bc742181ded4930842b46e9507372f0b1b963James DongpSrc            RN 0
480c1bc742181ded4930842b46e9507372f0b1b963James DongsrcStep         RN 1
490c1bc742181ded4930842b46e9507372f0b1b963James DongpDst            RN 2
500c1bc742181ded4930842b46e9507372f0b1b963James DongdstStep         RN 3
510c1bc742181ded4930842b46e9507372f0b1b963James Dong
520c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare other intermediate registers
530c1bc742181ded4930842b46e9507372f0b1b963James Dongx0              RN 4
540c1bc742181ded4930842b46e9507372f0b1b963James Dongx1              RN 5
550c1bc742181ded4930842b46e9507372f0b1b963James Dongx2              RN 8
560c1bc742181ded4930842b46e9507372f0b1b963James Dongx3              RN 9
570c1bc742181ded4930842b46e9507372f0b1b963James DongTemp            RN 12
580c1bc742181ded4930842b46e9507372f0b1b963James Dong
590c1bc742181ded4930842b46e9507372f0b1b963James Dong    IF ARM1136JS
600c1bc742181ded4930842b46e9507372f0b1b963James Dong
610c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_START armVCM4P10_InterpolateLuma_Copy4x4_unsafe, r6
620c1bc742181ded4930842b46e9507372f0b1b963James Dong
630c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4Start
640c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Do Copy and branch to EndOfInterpolation
650c1bc742181ded4930842b46e9507372f0b1b963James Dong        AND     Temp, pSrc, #3
660c1bc742181ded4930842b46e9507372f0b1b963James Dong        BIC     pSrc, pSrc, #3
670c1bc742181ded4930842b46e9507372f0b1b963James Dong
680c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_SWITCH Temp
690c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_CASE  Copy4x4Align0
700c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_CASE  Copy4x4Align1
710c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_CASE  Copy4x4Align2
720c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_CASE  Copy4x4Align3
730c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ENDSWITCH
740c1bc742181ded4930842b46e9507372f0b1b963James Dong
750c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4Align0
760c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
770c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x1, [pSrc], srcStep
780c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
790c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
800c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x1, [pDst], dstStep
810c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x3, [pSrc], srcStep
820c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
830c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x3, [pDst], dstStep
840c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       Copy4x4End
850c1bc742181ded4930842b46e9507372f0b1b963James Dong
860c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4Align1
870c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
880c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
890c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
900c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
910c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #8
920c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #24
930c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
940c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #8
950c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #24
960c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
970c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
980c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
990c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
1010c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #8
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #24
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #8
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #24
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       Copy4x4End
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong
1090c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4Align2
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #16
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #16
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #16
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #16
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong
1210c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #16
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #16
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #16
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #16
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       Copy4x4End
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong
1330c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4Align3
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #24
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #8
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #24
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #8
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x1, [pSrc, #4]
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x0, [pSrc], srcStep
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     x3, [pSrc, #4]
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDR   x2, [pSrc], srcStep
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x0, x0, LSR #24
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x0, x0, x1, LSL #8
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x0, [pDst], dstStep
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     x2, x2, LSR #24
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong        ORR     x2, x2, x3, LSL #8
1540c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_STR   x2, [pDst], dstStep
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       Copy4x4End
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong
1570c1bc742181ded4930842b46e9507372f0b1b963James DongCopy4x4End
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong    ENDIF
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong    END
16378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar
164