diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-08 23:34:43 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-08 23:34:43 +0000 |
commit | d1ed7c37b130500cc3c5b5ed4390192f623abd5d (patch) | |
tree | f1e7a9190be5c9764ad1c28b1c4318fb8201fc86 /firmware/target | |
parent | 75c7ac80e8540be0f581c3ad4d92b748f9649618 (diff) | |
download | rockbox-d1ed7c37b130500cc3c5b5ed4390192f623abd5d.tar.gz rockbox-d1ed7c37b130500cc3c5b5ed4390192f623abd5d.zip |
No need to have \n here. panicf() won't output it anyway.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16570 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/arm/iriver/h10/lcd-h10_5gb.c | 114 | ||||
-rw-r--r-- | firmware/target/arm/system-pp502x.c | 2 | ||||
-rw-r--r-- | firmware/target/coldfire/memcpy-coldfire.S | 440 |
3 files changed, 475 insertions, 81 deletions
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c index 8972fd1e9c..680d2c47a5 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c | |||
@@ -108,6 +108,7 @@ void lcd_init_device(void) | |||
108 | { | 108 | { |
109 | CLCD_CLOCK_SRC |= 0xc0000000; /* Set LCD interface clock to PLL */ | 109 | CLCD_CLOCK_SRC |= 0xc0000000; /* Set LCD interface clock to PLL */ |
110 | /* H10 LCD is initialised by the bootloader */ | 110 | /* H10 LCD is initialised by the bootloader */ |
111 | lcd_write_reg(R_ENTRY_MODE, 0x1030); /* BGR =1, ID1 = 1, ID0 = 1 */ | ||
111 | } | 112 | } |
112 | 113 | ||
113 | /*** update functions ***/ | 114 | /*** update functions ***/ |
@@ -289,88 +290,51 @@ void lcd_yuv_blit(unsigned char * const src[3], | |||
289 | 290 | ||
290 | 291 | ||
291 | /* Update a fraction of the display. */ | 292 | /* Update a fraction of the display. */ |
292 | void lcd_update_rect(int x0, int y0, int width, int height) | 293 | void lcd_update_rect(int x, int y, int width, int height) |
293 | { | 294 | { |
294 | int x1, y1; | 295 | const fb_data *addr; |
295 | int newx,newwidth; | 296 | int bytes_to_write; |
296 | unsigned long *addr; | 297 | |
298 | if (x + width >= LCD_WIDTH) | ||
299 | width = LCD_WIDTH - x; | ||
300 | if (y + height >= LCD_HEIGHT) | ||
301 | height = LCD_HEIGHT - y; | ||
302 | |||
303 | if ((width <= 0) || (height <= 0)) | ||
304 | return; /* Nothing left to do. 0 would hang the transfer. */ | ||
305 | |||
306 | /* Ensure x and width are both even, so we can read | ||
307 | * 32-bit aligned data from the framebuffer */ | ||
308 | width = (width + (x & 1) + 1) & ~1; | ||
309 | x &= ~1; | ||
310 | |||
311 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8); | ||
312 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, ((x + width - 1) << 8) | x); | ||
313 | lcd_write_reg(R_RAM_ADDR_SET, (y << 8) | x); | ||
297 | 314 | ||
298 | /* Ensure x and width are both even - so we can read 32-bit aligned | ||
299 | data from lcd_framebuffer */ | ||
300 | newx=x0&~1; | ||
301 | newwidth=width&~1; | ||
302 | if (newx+newwidth < x0+width) { newwidth+=2; } | ||
303 | x0=newx; width=newwidth; | ||
304 | |||
305 | /* calculate the drawing region */ | ||
306 | y1 = (y0 + height) - 1; /* max vert */ | ||
307 | x1 = (x0 + width) - 1; /* max horiz */ | ||
308 | |||
309 | |||
310 | /* swap max horiz < start horiz */ | ||
311 | if (y1 < y0) { | ||
312 | int t; | ||
313 | t = y0; | ||
314 | y0 = y1; | ||
315 | y1 = t; | ||
316 | } | ||
317 | |||
318 | /* swap max vert < start vert */ | ||
319 | if (x1 < x0) { | ||
320 | int t; | ||
321 | t = x0; | ||
322 | x0 = x1; | ||
323 | x1 = t; | ||
324 | } | ||
325 | |||
326 | /* max horiz << 8 | start horiz */ | ||
327 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (x1 << 8) | x0); | ||
328 | |||
329 | /* max vert << 8 | start vert */ | ||
330 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (y1 << 8) | y0); | ||
331 | |||
332 | /* start vert << 8 | start horiz */ | ||
333 | lcd_write_reg(R_RAM_ADDR_SET, (y0 << 8) | x0); | ||
334 | |||
335 | /* start drawing */ | ||
336 | lcd_send_cmd(R_WRITE_DATA_2_GRAM); | 315 | lcd_send_cmd(R_WRITE_DATA_2_GRAM); |
337 | 316 | ||
338 | addr = (unsigned long*)&lcd_framebuffer[y0][x0]; | 317 | addr = &lcd_framebuffer[y][x]; |
339 | 318 | bytes_to_write = width * height * sizeof(fb_data); | |
340 | while (height > 0) { | 319 | /* must be <= 0x10000, but that's guaranteed on H10. */ |
341 | int c, r; | ||
342 | int h, pixels_to_write; | ||
343 | |||
344 | pixels_to_write = (width * height) * 2; | ||
345 | h = height; | ||
346 | |||
347 | /* calculate how much we can do in one go */ | ||
348 | if (pixels_to_write > 0x10000) { | ||
349 | h = (0x10000/2) / width; | ||
350 | pixels_to_write = (width * h) * 2; | ||
351 | } | ||
352 | |||
353 | LCD2_BLOCK_CTRL = 0x10000080; | ||
354 | LCD2_BLOCK_CONFIG = 0xc0010000 | (pixels_to_write - 1); | ||
355 | LCD2_BLOCK_CTRL = 0x34000000; | ||
356 | 320 | ||
357 | /* for each row */ | 321 | LCD2_BLOCK_CTRL = 0x10000080; |
358 | for (r = 0; r < h; r++) { | 322 | LCD2_BLOCK_CONFIG = 0xc0010000 | (bytes_to_write - 1); |
359 | /* for each column */ | 323 | LCD2_BLOCK_CTRL = 0x34000000; |
360 | for (c = 0; c < width; c += 2) { | 324 | |
361 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK)); | 325 | do |
362 | 326 | { | |
363 | /* output 2 pixels */ | 327 | int w = width >> 1; |
364 | LCD2_BLOCK_DATA = *addr++; | 328 | do |
365 | } | 329 | { |
366 | addr += (LCD_WIDTH - width)/2; | 330 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK)); |
331 | LCD2_BLOCK_DATA = *(unsigned long*)addr; /* output 2 pixels */ | ||
332 | addr += 2; | ||
367 | } | 333 | } |
368 | 334 | while (--w > 0); | |
369 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_READY)); | 335 | addr += LCD_WIDTH - width; |
370 | LCD2_BLOCK_CONFIG = 0; | ||
371 | |||
372 | height -= h; | ||
373 | } | 336 | } |
337 | while (--height > 0); | ||
374 | } | 338 | } |
375 | 339 | ||
376 | /* Update the display. | 340 | /* Update the display. |
diff --git a/firmware/target/arm/system-pp502x.c b/firmware/target/arm/system-pp502x.c index 27d11aa815..a5ed7b2999 100644 --- a/firmware/target/arm/system-pp502x.c +++ b/firmware/target/arm/system-pp502x.c | |||
@@ -365,7 +365,7 @@ void system_init(void) | |||
365 | #elif defined (IPOD_MINI) | 365 | #elif defined (IPOD_MINI) |
366 | /* to be done */ | 366 | /* to be done */ |
367 | #elif defined (IPOD_MINI2G) | 367 | #elif defined (IPOD_MINI2G) |
368 | /* to be done */ | 368 | /* to be done */ |
369 | #elif defined (MROBE_100) | 369 | #elif defined (MROBE_100) |
370 | /* to be done */ | 370 | /* to be done */ |
371 | #elif defined (ELIO_TPJ1022) | 371 | #elif defined (ELIO_TPJ1022) |
diff --git a/firmware/target/coldfire/memcpy-coldfire.S b/firmware/target/coldfire/memcpy-coldfire.S index 523e1f5ed9..dd1a8a66da 100644 --- a/firmware/target/coldfire/memcpy-coldfire.S +++ b/firmware/target/coldfire/memcpy-coldfire.S | |||
@@ -38,8 +38,8 @@ | |||
38 | * %d0 - destination address (like ANSI version) | 38 | * %d0 - destination address (like ANSI version) |
39 | * | 39 | * |
40 | * register usage: | 40 | * register usage: |
41 | * %a0 - current source address | 41 | * %a1 - current source address |
42 | * %a1 - current dest address | 42 | * %a0 - current dest address |
43 | * %a2 - source end address (in line-copy loops) | 43 | * %a2 - source end address (in line-copy loops) |
44 | * %d0 - data / scratch | 44 | * %d0 - data / scratch |
45 | * %d1 - source end address (byte and longword copy) / data / scratch | 45 | * %d1 - source end address (byte and longword copy) / data / scratch |
@@ -52,11 +52,439 @@ | |||
52 | * if FULLSPEED is undefined. | 52 | * if FULLSPEED is undefined. |
53 | */ | 53 | */ |
54 | memcpy: | 54 | memcpy: |
55 | move.l (4,%sp),%a1 /* Destination */ | 55 | move.l (4, %sp), %a1 /* Destination */ |
56 | move.l (8,%sp),%a0 /* Source */ | 56 | move.l (8, %sp), %a0 /* Source */ |
57 | move.l (12,%sp),%d1 /* Length */ | 57 | move.l (12, %sp), %d1 /* Length */ |
58 | 58 | ||
59 | __memcpy_fwd_entry: | 59 | __memcpy_fwd_entry: |
60 | |||
61 | #if 1 /* CODE TEST */ | ||
62 | |||
63 | cmp.l #5, %d1 | ||
64 | bhs.b .min5 | ||
65 | |||
66 | move.l %a1, %d0 | ||
67 | jmp.l (2, %pc, %d1.l*4) | ||
68 | .bytes_grid: | ||
69 | rts /* 0 */ | ||
70 | nop | ||
71 | .bytes_1: | ||
72 | move.b (%a0)+, (%a1)+ /* 1 */ | ||
73 | rts | ||
74 | move.w (%a0)+, (%a1)+ /* 2 */ | ||
75 | rts | ||
76 | move.w (%a0)+, (%a1)+ /* 3 */ | ||
77 | bra.s .bytes_1 | ||
78 | move.l (%a0)+, (%a1)+ /* 4 */ | ||
79 | rts | ||
80 | |||
81 | .min5: | ||
82 | move.l %a0, %d0 | ||
83 | and.l #3, %d0 | ||
84 | jmp.l (2, %pc, %d0.l*2) | ||
85 | bra.s .byte1_off0 | ||
86 | bra.s .byte1_off1 | ||
87 | bra.s .byte1_off2 | ||
88 | /* last table entry coincides with target */ | ||
89 | |||
90 | .byte1_off3: | ||
91 | move.b (%a0)+, (%a1)+ | ||
92 | subq.l #1, %d1 | ||
93 | bra.s .byte1_off0 | ||
94 | |||
95 | .byte1_off1: | ||
96 | move.b (%a0)+, (%a1)+ | ||
97 | subq.l #1, %d1 | ||
98 | .byte1_off2: | ||
99 | move.w (%a0)+, (%a1)+ | ||
100 | subq.l #2, %d1 | ||
101 | .byte1_off0: | ||
102 | |||
103 | move.l %d1, %d0 | ||
104 | cmp.l #16, %d0 | ||
105 | bhs.b .min16 | ||
106 | |||
107 | .longs: | ||
108 | lsr.l #2, %d0 /* in longwords */ | ||
109 | neg.l %d0 | ||
110 | jmp.l (8, %pc, %d0.l*2) | ||
111 | |||
112 | move.l (%a0)+, (%a1)+ | ||
113 | move.l (%a0)+, (%a1)+ | ||
114 | move.l (%a0)+, (%a1)+ | ||
115 | move.l (4, %sp), %d0 | ||
116 | and.l #3, %d1 | ||
117 | jmp.l (.bytes_grid - 2 - ., %pc, %d1.l*4) | ||
118 | |||
119 | .min16: | ||
120 | #if 0 | ||
121 | lea.l (-44, %sp), %sp | ||
122 | movem.l %d2-%d7/%a2-%a6, (%sp) | ||
123 | |||
124 | |||
125 | .main_do12_start: | ||
126 | lea.l (main_do12_loop - ., %pc), %a5 | ||
127 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
128 | bra.b .main_do12_headstore | ||
129 | |||
130 | .main_do8_start: | ||
131 | lea.l (main_do8_loop - ., %pc), %a5 | ||
132 | movem.l (%a0), %d5-%d7/%a2 | ||
133 | bra.b .main_do8_headstore | ||
134 | |||
135 | .main_do4_start: | ||
136 | lea.l (main_do4_loop - ., %pc), %a5 | ||
137 | movem.l (%a0), %d4-%d7 | ||
138 | /* .main_do4_headstore: */ | ||
139 | move.l %d4, (%a1)+ | ||
140 | .main_do8_headstore: | ||
141 | move.l %d5, (%a1)+ | ||
142 | .main_do12_headstore: | ||
143 | move.l %d6, (%a1)+ | ||
144 | bra.b .main_bo0_check | ||
145 | |||
146 | .main_do12_loop: | ||
147 | move.l %d7, %d3 | ||
148 | move.l %a2, %d4 | ||
149 | move.l %a3, %d5 | ||
150 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
151 | bra.b .main_bo0_store | ||
152 | .main_do8_loop: | ||
153 | move.l %d7, %d3 | ||
154 | move.l %a2, %d4 | ||
155 | movem.l (%a0), %d5-%d7/%a2 | ||
156 | bra.b .main_bo0_store | ||
157 | .main_do4_loop: | ||
158 | move.l %d7, %d3 | ||
159 | movem.l (%a0), %d4-%d7 | ||
160 | bra.b .main_bo0_store | ||
161 | .main_do0_loop: | ||
162 | movem.l (%a0), %d3-%d6 | ||
163 | .main_bo0_store: | ||
164 | lea.l (16, %a0), %a1 | ||
165 | movem.l %d3-%d6, (%a1) | ||
166 | lea.l (16, %a1), %a1 | ||
167 | .main_do0_start: | ||
168 | .main_bo0_check: | ||
169 | sub.l #16, %d1 | ||
170 | blo.b .main_bo0_tail | ||
171 | jmp (%a5) | ||
172 | |||
173 | .main_bo0_tail: | ||
174 | |||
175 | |||
176 | |||
177 | .main_do13_start: | ||
178 | lea.l (main_do13_loop - ., %pc), %a5 | ||
179 | movem.l (%a0), %d7/%a2-%a4 | ||
180 | move.l %d7, %d0 | ||
181 | lsr.l #8, %d0 | ||
182 | swap %d0 | ||
183 | move.b %d0, (%a1)+ | ||
184 | swap %d0 | ||
185 | move.w %d0, (%a1)+ | ||
186 | bra.b .main_bo1_check | ||
187 | |||
188 | .main_do9_start: | ||
189 | lea.l (main_do9_loop - ., %pc), %a5 | ||
190 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
191 | move.l %d6, %d0 | ||
192 | lsr.l #8, %d0 | ||
193 | swap %d0 | ||
194 | move.b %d0, (%a1)+ | ||
195 | swap %d0 | ||
196 | move.w %d0, (%a1)+ | ||
197 | bra.b .main_do9_headstore | ||
198 | |||
199 | .main_do5_start: | ||
200 | lea.l (main_do5_loop - ., %pc), %a5 | ||
201 | movem.l (%a0), %d5-%d7/%a2 | ||
202 | move.l %d5, %d0 | ||
203 | lsr.l #8, %d0 | ||
204 | swap %d0 | ||
205 | move.b %d0, (%a1)+ | ||
206 | swap %d0 | ||
207 | move.w %d0, (%a1)+ | ||
208 | bra.b .main_do5_headstore | ||
209 | |||
210 | .main_do1_start: | ||
211 | lea.l (main_do1_loop - ., %pc), %a5 | ||
212 | movem.l (%a0), %d4-%d7 | ||
213 | move.l %d4, %d0 | ||
214 | lsr.l #8, %d0 | ||
215 | swap %d0 | ||
216 | move.b %d0, (%a1)+ | ||
217 | swap %d0 | ||
218 | move.w %d0, (%a1)+ | ||
219 | /* .main_do1_headstore: */ | ||
220 | lsl.l %d2, %d4 | ||
221 | move.l %d5, %d0 | ||
222 | lsr.l #8, %d0 | ||
223 | or.l %d0, %d4 | ||
224 | move.l %d4, (%a1)+ | ||
225 | .main_do5_headstore: | ||
226 | lsl.l %d2, %d5 | ||
227 | move.l %d6, %d0 | ||
228 | lsr.l #8, %d0 | ||
229 | or.l %d0, %d5 | ||
230 | move.l %d5, (%a1)+ | ||
231 | .main_do9_headstore: | ||
232 | lsl.l %d2, %d6 | ||
233 | move.l %d7, %d0 | ||
234 | lsr.l #8, %d0 | ||
235 | or.l %d0, %d6 | ||
236 | move.l %d6, (%a1)+ | ||
237 | bra.b .main_bo1_check | ||
238 | |||
239 | .main_do13_loop: | ||
240 | move.l %d7, %d3 | ||
241 | move.l %a2, %d4 | ||
242 | move.l %a3, %d5 | ||
243 | move.l %a4, %d6 | ||
244 | movem.l (%a0), %d7/%a2-%a4 | ||
245 | bra.b .main_bo1_store | ||
246 | .main_do9_loop: | ||
247 | move.l %d7, %d3 | ||
248 | move.l %a2, %d4 | ||
249 | move.l %a3, %d5 | ||
250 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
251 | bra.b .main_bo1_store | ||
252 | .main_do5_loop: | ||
253 | move.l %d7, %d3 | ||
254 | move.l %a2, %d4 | ||
255 | movem.l (%a0), %d5-%d7/%a2 | ||
256 | bra.b .main_bo1_store | ||
257 | .main_do1_loop: | ||
258 | move.l %d7, %d3 | ||
259 | movem.l (%a0), %d4-%d7 | ||
260 | .main_bo1_store: | ||
261 | lea.l (16, %a0), %a1 | ||
262 | lsl.l %d2, %d3 | ||
263 | move.l %d4, %d0 | ||
264 | lsr.l #8, %d0 | ||
265 | or.l %d0, %d3 | ||
266 | lsl.l %d2, %d4 | ||
267 | move.l %d5, %d0 | ||
268 | lsr.l #8, %d0 | ||
269 | or.l %d0, %d4 | ||
270 | lsl.l %d2, %d5 | ||
271 | move.l %d6, %d0 | ||
272 | lsr.l #8, %d0 | ||
273 | or.l %d0, %d5 | ||
274 | lsl.l %d2, %d6 | ||
275 | move.l %d7, %d0 | ||
276 | lsr.l #8, %d0 | ||
277 | or.l %d0, %d6 | ||
278 | movem.l %d3-%d6,(%a1) | ||
279 | lea.l (16, %a1), %a1 | ||
280 | .main_bo1_check: | ||
281 | sub.l #16, %d1 | ||
282 | blo.b .main_bo1_tail | ||
283 | jmp (%a5) | ||
284 | |||
285 | |||
286 | .main_do14_start: | ||
287 | lea.l (main_do14_loop - ., %pc), %a5 | ||
288 | movem.l (%a0), %d7/%a2-%a4 | ||
289 | swap %d7 | ||
290 | move.w %d7, (%a1)+ | ||
291 | bra.b .main_bo2_check | ||
292 | |||
293 | .main_do10_start: | ||
294 | lea.l (main_do10_loop - ., %pc), %a5 | ||
295 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
296 | swap %d6 | ||
297 | move.w %d6, (%a1)+ | ||
298 | bra.b .main_do10_headstore | ||
299 | |||
300 | .main_do6_start: | ||
301 | lea.l (main_do6_loop - ., %pc), %a5 | ||
302 | movem.l (%a0), %d5-%d7/%a2 | ||
303 | swap %d5 | ||
304 | move.w %d5, (%a1)+ | ||
305 | bra.b .main_do6_headstore | ||
306 | |||
307 | .main_do2_start: | ||
308 | lea.l (main_do2_loop - ., %pc), %a5 | ||
309 | movem.l (%a0), %d4-%d7 | ||
310 | swap %d4 | ||
311 | move.w %d4, (%a1)+ | ||
312 | /* .main_do2_headstore: */ | ||
313 | swap %d5 | ||
314 | move.w %d5, %d4 | ||
315 | move.l %d4, (%a1)+ | ||
316 | .main_do6_headstore: | ||
317 | swap %d6 | ||
318 | move.w %d6, %d5 | ||
319 | move.l %d5, (%a1)+ | ||
320 | .main_do10_headstore: | ||
321 | swap %d7 | ||
322 | move.w %d7, %d6 | ||
323 | move.l %d6, (%a1)+ | ||
324 | bra.b .main_bo2_check | ||
325 | |||
326 | .main_do14_loop: | ||
327 | move.l %d7, %d3 | ||
328 | move.l %a2, %d4 | ||
329 | move.l %a3, %d5 | ||
330 | move.l %a4, %d6 | ||
331 | movem.l (%a0), %d7/%a2-%a4 | ||
332 | bra.b .main_bo1_store | ||
333 | .main_do10_loop: | ||
334 | move.l %d7, %d3 | ||
335 | move.l %a2, %d4 | ||
336 | move.l %a3, %d5 | ||
337 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
338 | bra.b .main_bo1_store | ||
339 | .main_do6_loop: | ||
340 | move.l %d7, %d3 | ||
341 | move.l %a2, %d4 | ||
342 | movem.l (%a0), %d5-%d7/%a2 | ||
343 | bra.b .main_bo1_store | ||
344 | .main_do2_loop: | ||
345 | move.l %d7, %d3 | ||
346 | movem.l (%a0), %d4-%d7 | ||
347 | .main_bo2_store: | ||
348 | lea.l (16, %a0), %a1 | ||
349 | swap %d4 | ||
350 | move.w %d4,%d3 | ||
351 | swap %d5 | ||
352 | move.w %d5,%d4 | ||
353 | swap %d6 | ||
354 | move.w %d6,%d5 | ||
355 | swap %d7 | ||
356 | move.w %d7,%d6 | ||
357 | movem.l %d3-%d6,(%a1) | ||
358 | lea.l (16, %a1), %a1 | ||
359 | .main_bo2_check | ||
360 | sub.l #16, %d1 | ||
361 | blo.b .main_bo2_tail | ||
362 | jmp (%a5) | ||
363 | |||
364 | |||
365 | .main_do15_start: | ||
366 | lea.l (main_do15_loop - ., %pc), %a5 | ||
367 | movem.l (%a0), %d7/%a2-%a4 | ||
368 | move.l %d7, %d0 | ||
369 | lsr.l %d2, %d0 | ||
370 | move.b %d0, (%a1)+ | ||
371 | bra.b .main_bo3_check | ||
372 | |||
373 | .main_do11_start: | ||
374 | lea.l (main_do11_loop - ., %pc), %a5 | ||
375 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
376 | move.l %d6, %d0 | ||
377 | lsr.l %d2, %d0 | ||
378 | move.b %d0, (%a1)+ | ||
379 | bra.b .main_do11_headstore | ||
380 | |||
381 | .main_do7_start: | ||
382 | lea.l (main_do7_loop - ., %pc), %a5 | ||
383 | movem.l (%a0), %d5-%d7/%a2 | ||
384 | move.l %d5, %d0 | ||
385 | lsr.l %d2, %d0 | ||
386 | move.b %d0, (%a1)+ | ||
387 | bra.b .main_do7_headstore | ||
388 | |||
389 | .main_do3_start: | ||
390 | lea.l (main_do3_loop - ., %pc), %a5 | ||
391 | movem.l (%a0), %d4-%d7 | ||
392 | move.l %d4, %d0 | ||
393 | lsr.l %d2, %d0 | ||
394 | move.b %d0, (%a1)+ | ||
395 | /* .main_do3_headstore: */ | ||
396 | lsl.l #8, %d4 | ||
397 | move.l %d5, %d0 | ||
398 | lsr.l %d2, %d0 | ||
399 | or.l %d0, %d4 | ||
400 | move.l %d4, (%a1)+ | ||
401 | .main_do7_headstore: | ||
402 | lsl.l #8, %d5 | ||
403 | move.l %d6, %d0 | ||
404 | lsr.l %d2, %d0 | ||
405 | or.l %d0, %d5 | ||
406 | move.l %d5, (%a1)+ | ||
407 | .main_do11_headstore: | ||
408 | lsl.l #8, %d6 | ||
409 | move.l %d7, %d0 | ||
410 | lsr.l %d2, %d0 | ||
411 | or.l %d0, %d6 | ||
412 | move.l %d6, (%a1)+ | ||
413 | bra.b .main_bo3_check | ||
414 | |||
415 | .main_do15_loop: | ||
416 | move.l %d7, %d3 | ||
417 | move.l %a2, %d4 | ||
418 | move.l %a3, %d5 | ||
419 | move.l %a4, %d6 | ||
420 | movem.l (%a0), %d7/%a2-%a4 | ||
421 | bra.b .main_bo1_store | ||
422 | .main_do11_loop: | ||
423 | move.l %d7, %d3 | ||
424 | move.l %a2, %d4 | ||
425 | move.l %a3, %d5 | ||
426 | movem.l (%a0), %d6-%d7/%a2-%a3 | ||
427 | bra.b .main_bo1_store | ||
428 | .main_do7_loop: | ||
429 | move.l %d7, %d3 | ||
430 | move.l %a2, %d4 | ||
431 | movem.l (%a0), %d5-%d7/%a2 | ||
432 | bra.b .main_bo1_store | ||
433 | .main_do3_loop: | ||
434 | move.l %d7, %d3 | ||
435 | movem.l (%a0), %d4-%d7 | ||
436 | .main_bo3_store: | ||
437 | lea.l (16, %a0), %a1 | ||
438 | lsl.l #8, %d3 | ||
439 | move.l %d4, %d0 | ||
440 | lsr.l %d2, %d0 | ||
441 | or.l %d0, %d3 | ||
442 | lsl.l #8, %d4 | ||
443 | move.l %d5, %d0 | ||
444 | lsr.l %d2, %d0 | ||
445 | or.l %d0, %d4 | ||
446 | lsl.l #8, %d5 | ||
447 | move.l %d6, %d0 | ||
448 | lsr.l %d2, %d0 | ||
449 | or.l %d0, %d5 | ||
450 | lsl.l #8, %d6 | ||
451 | move.l %d7, %d0 | ||
452 | lsr.l %d2, %d0 | ||
453 | or.l %d0, %d6 | ||
454 | movem.l %d3-%d6,(%a1) | ||
455 | lea.l (16, %a1), %a1 | ||
456 | .main_bo3_check: | ||
457 | sub.l #16, %d1 | ||
458 | blo.b .main_bo3_tail | ||
459 | jmp (%a5) | ||
460 | |||
461 | |||
462 | |||
463 | movem.l (%sp), %d2-%d7/%a2-%a6 | ||
464 | lea.l (44, %sp), %sp | ||
465 | #else | ||
466 | lea.l (-16, %sp), %sp | ||
467 | movem.l %d2-%d5, (%sp) | ||
468 | sub.l #16, %d1 | ||
469 | |||
470 | .main_loop: | ||
471 | movem.l (%a0), %d2-%d5 | ||
472 | lea.l (16, %a0), %a0 | ||
473 | movem.l %d2-%d5, (%a1) | ||
474 | lea.l (16, %a1), %a1 | ||
475 | sub.l #16, %d1 | ||
476 | bhs.b .main_loop | ||
477 | |||
478 | add.l #16, %d1 | ||
479 | movem.l (%sp), %d2-%d5 | ||
480 | lea.l (16, %sp), %sp | ||
481 | #endif | ||
482 | |||
483 | move.l %d1, %d0 | ||
484 | bra.s .longs | ||
485 | |||
486 | #else /* CODE TEST */ | ||
487 | |||
60 | add.l %a0,%d1 /* %d1 = source end */ | 488 | add.l %a0,%d1 /* %d1 = source end */ |
61 | 489 | ||
62 | move.l %a0,%d0 | 490 | move.l %a0,%d0 |
@@ -675,6 +1103,8 @@ __memcpy_fwd_entry: | |||
675 | .bytes2_end: | 1103 | .bytes2_end: |
676 | move.l (4,%sp),%d0 /* return destination */ | 1104 | move.l (4,%sp),%d0 /* return destination */ |
677 | rts | 1105 | rts |
1106 | |||
1107 | #endif /* CODE TEST */ | ||
678 | 1108 | ||
679 | .end: | 1109 | .end: |
680 | .size memcpy,.end-memcpy | 1110 | .size memcpy,.end-memcpy |