10c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
20c1bc742181ded4930842b46e9507372f0b1b963James Dong * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
30c1bc742181ded4930842b46e9507372f0b1b963James Dong *
40c1bc742181ded4930842b46e9507372f0b1b963James Dong */
50c1bc742181ded4930842b46e9507372f0b1b963James Dong
60c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 24, 1
70c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 25, 1
80c1bc742181ded4930842b46e9507372f0b1b963James Dong
90c1bc742181ded4930842b46e9507372f0b1b963James Dong    .arm
100c1bc742181ded4930842b46e9507372f0b1b963James Dong    .fpu neon
110c1bc742181ded4930842b46e9507372f0b1b963James Dong    .text
120c1bc742181ded4930842b46e9507372f0b1b963James Dong
130c1bc742181ded4930842b46e9507372f0b1b963James Dong    .global armVCM4P10_UnpackBlock4x4
140c1bc742181ded4930842b46e9507372f0b1b963James Dong    .func   armVCM4P10_UnpackBlock4x4
150c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_UnpackBlock4x4:
160c1bc742181ded4930842b46e9507372f0b1b963James Dong    PUSH     {r4-r8,lr}
170c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r2,[r0,#0]
180c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r7,#0x1f
190c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r4,#0
200c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r5,#0
210c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRB     r3,[r2],#1
220c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRD     r4,r5,[r1,#0]
230c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRD     r4,r5,[r1,#8]
240c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRD     r4,r5,[r1,#0x10]
250c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRD     r4,r5,[r1,#0x18]
260c1bc742181ded4930842b46e9507372f0b1b963James DongunpackLoop:
270c1bc742181ded4930842b46e9507372f0b1b963James Dong    TST      r3,#0x10
280c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRNESB  r5,[r2,#1]
290c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDRNEB   r4,[r2],#2
300c1bc742181ded4930842b46e9507372f0b1b963James Dong    AND      r6,r7,r3,LSL #1
310c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDREQSB  r4,[r2],#1
320c1bc742181ded4930842b46e9507372f0b1b963James Dong    ORRNE    r4,r4,r5,LSL #8
330c1bc742181ded4930842b46e9507372f0b1b963James Dong    TST      r3,#0x20
340c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDREQB   r3,[r2],#1
350c1bc742181ded4930842b46e9507372f0b1b963James Dong    STRH     r4,[r1,r6]
360c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      unpackLoop
370c1bc742181ded4930842b46e9507372f0b1b963James Dong    STR      r2,[r0,#0]
380c1bc742181ded4930842b46e9507372f0b1b963James Dong    POP      {r4-r8,pc}
390c1bc742181ded4930842b46e9507372f0b1b963James Dong    .endfunc
400c1bc742181ded4930842b46e9507372f0b1b963James Dong    .end
41