arm: remove duplicate functions
[libvpx.git] / vp8 / common / arm / armv6 / copymem16x16_v6.asm
blobfca91a0db9e6f9f0d46a76c196d3bf9f5571951c
2 ; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 ; Use of this source code is governed by a BSD-style license
5 ; that can be found in the LICENSE file in the root of the source
6 ; tree. An additional intellectual property rights grant can be found
7 ; in the file PATENTS. All contributing project authors may
8 ; be found in the AUTHORS file in the root of the source tree.
12 EXPORT |vp8_copy_mem16x16_v6|
13 ; ARM
14 ; REQUIRE8
15 ; PRESERVE8
17 AREA Block, CODE, READONLY ; name this block of code
18 ;void copy_mem16x16_v6( unsigned char *src, int src_stride, unsigned char *dst, int dst_stride)
19 ;-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
20 |vp8_copy_mem16x16_v6| PROC
21 stmdb sp!, {r4 - r7}
22 ;push {r4-r7}
24 ;preload
25 pld [r0]
26 pld [r0, r1]
27 pld [r0, r1, lsl #1]
29 ands r4, r0, #15
30 beq copy_mem16x16_fast
32 ands r4, r0, #7
33 beq copy_mem16x16_8
35 ands r4, r0, #3
36 beq copy_mem16x16_4
38 ;copy one byte each time
39 ldrb r4, [r0]
40 ldrb r5, [r0, #1]
41 ldrb r6, [r0, #2]
42 ldrb r7, [r0, #3]
44 mov r12, #16
46 copy_mem16x16_1_loop
47 strb r4, [r2]
48 strb r5, [r2, #1]
49 strb r6, [r2, #2]
50 strb r7, [r2, #3]
52 ldrb r4, [r0, #4]
53 ldrb r5, [r0, #5]
54 ldrb r6, [r0, #6]
55 ldrb r7, [r0, #7]
57 subs r12, r12, #1
59 strb r4, [r2, #4]
60 strb r5, [r2, #5]
61 strb r6, [r2, #6]
62 strb r7, [r2, #7]
64 ldrb r4, [r0, #8]
65 ldrb r5, [r0, #9]
66 ldrb r6, [r0, #10]
67 ldrb r7, [r0, #11]
69 strb r4, [r2, #8]
70 strb r5, [r2, #9]
71 strb r6, [r2, #10]
72 strb r7, [r2, #11]
74 ldrb r4, [r0, #12]
75 ldrb r5, [r0, #13]
76 ldrb r6, [r0, #14]
77 ldrb r7, [r0, #15]
79 add r0, r0, r1
81 strb r4, [r2, #12]
82 strb r5, [r2, #13]
83 strb r6, [r2, #14]
84 strb r7, [r2, #15]
86 add r2, r2, r3
88 ldrneb r4, [r0]
89 ldrneb r5, [r0, #1]
90 ldrneb r6, [r0, #2]
91 ldrneb r7, [r0, #3]
93 bne copy_mem16x16_1_loop
95 ldmia sp!, {r4 - r7}
96 ;pop {r4-r7}
97 mov pc, lr
99 ;copy 4 bytes each time
100 copy_mem16x16_4
101 ldr r4, [r0]
102 ldr r5, [r0, #4]
103 ldr r6, [r0, #8]
104 ldr r7, [r0, #12]
106 mov r12, #16
108 copy_mem16x16_4_loop
109 subs r12, r12, #1
110 add r0, r0, r1
112 str r4, [r2]
113 str r5, [r2, #4]
114 str r6, [r2, #8]
115 str r7, [r2, #12]
117 add r2, r2, r3
119 ldrne r4, [r0]
120 ldrne r5, [r0, #4]
121 ldrne r6, [r0, #8]
122 ldrne r7, [r0, #12]
124 bne copy_mem16x16_4_loop
126 ldmia sp!, {r4 - r7}
127 ;pop {r4-r7}
128 mov pc, lr
130 ;copy 8 bytes each time
131 copy_mem16x16_8
132 sub r1, r1, #16
133 sub r3, r3, #16
135 mov r12, #16
137 copy_mem16x16_8_loop
138 ldmia r0!, {r4-r5}
139 ;ldm r0, {r4-r5}
140 ldmia r0!, {r6-r7}
142 add r0, r0, r1
144 stmia r2!, {r4-r5}
145 subs r12, r12, #1
146 ;stm r2, {r4-r5}
147 stmia r2!, {r6-r7}
149 add r2, r2, r3
151 bne copy_mem16x16_8_loop
153 ldmia sp!, {r4 - r7}
154 ;pop {r4-r7}
155 mov pc, lr
157 ;copy 16 bytes each time
158 copy_mem16x16_fast
159 ;sub r1, r1, #16
160 ;sub r3, r3, #16
162 mov r12, #16
164 copy_mem16x16_fast_loop
165 ldmia r0, {r4-r7}
166 ;ldm r0, {r4-r7}
167 add r0, r0, r1
169 subs r12, r12, #1
170 stmia r2, {r4-r7}
171 ;stm r2, {r4-r7}
172 add r2, r2, r3
174 bne copy_mem16x16_fast_loop
176 ldmia sp!, {r4 - r7}
177 ;pop {r4-r7}
178 mov pc, lr
180 ENDP ; |vp8_copy_mem16x16_v6|