1/*
2 * Copyright (C) 2007-2008 ARM Limited
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 */
17/*
18 *
19 */
20
21    .eabi_attribute 24, 1
22    .eabi_attribute 25, 1
23
24    .arm
25    .fpu neon
26    .text
27
28    .global armVCM4P10_UnpackBlock4x4
29    .func   armVCM4P10_UnpackBlock4x4
30armVCM4P10_UnpackBlock4x4:
31    PUSH     {r4-r8,lr}
32    LDR      r2,[r0,#0]
33    MOV      r7,#0x1f
34    MOV      r4,#0
35    MOV      r5,#0
36    LDRB     r3,[r2],#1
37    STRD     r4,r5,[r1,#0]
38    STRD     r4,r5,[r1,#8]
39    STRD     r4,r5,[r1,#0x10]
40    STRD     r4,r5,[r1,#0x18]
41unpackLoop:
42    TST      r3,#0x10
43    LDRNESB  r5,[r2,#1]
44    LDRNEB   r4,[r2],#2
45    AND      r6,r7,r3,LSL #1
46    LDREQSB  r4,[r2],#1
47    ORRNE    r4,r4,r5,LSL #8
48    TST      r3,#0x20
49    LDREQB   r3,[r2],#1
50    STRH     r4,[r1,r6]
51    BEQ      unpackLoop
52    STR      r2,[r0,#0]
53    POP      {r4-r8,pc}
54    .endfunc
55    .end
56