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