memcpy_xscale.S (129202) | memcpy_xscale.S (135683) |
---|---|
1/* $NetBSD: memcpy_xscale.S,v 1.1 2003/10/14 07:51:45 scw Exp $ */ 2 3/* 4 * Copyright 2003 Wasabi Systems, Inc. 5 * All rights reserved. 6 * 7 * Written by Steve C. Woodford for Wasabi Systems, Inc. 8 * --- 22 unchanged lines hidden (view full) --- 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include <machine/asm.h> | 1/* $NetBSD: memcpy_xscale.S,v 1.1 2003/10/14 07:51:45 scw Exp $ */ 2 3/* 4 * Copyright 2003 Wasabi Systems, Inc. 5 * All rights reserved. 6 * 7 * Written by Steve C. Woodford for Wasabi Systems, Inc. 8 * --- 22 unchanged lines hidden (view full) --- 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 38#include <machine/asm.h> |
39__FBSDID("$FreeBSD: head/lib/libc/arm/string/memcpy_xscale.S 129202 2004-05-14 12:04:31Z cognet $"); | 39__FBSDID("$FreeBSD: head/lib/libc/arm/string/memcpy_xscale.S 135683 2004-09-23 23:11:32Z cognet $"); |
40 41/* LINTSTUB: Func: void *memcpy(void *dst, const void *src, size_t len) */ 42ENTRY(memcpy) 43 pld [r1] 44 cmp r2, #0x0c 45 ble .Lmemcpy_short /* <= 12 bytes */ 46 mov r3, r0 /* We must not clobber r0 */ 47 --- 82 unchanged lines hidden (view full) --- 130 strd r8, [r3], #0x08 /* ST:70-77 */ 131 subs r2, r2, #0x80 132 strd r4, [r3], #0x08 /* ST:78-7f */ 133 bge .Lmemcpy_w_loop128 134 135.Lmemcpy_w_lessthan128: 136 adds r2, r2, #0x80 /* Adjust for extra sub */ 137 ldmeqfd sp!, {r4-r9} | 40 41/* LINTSTUB: Func: void *memcpy(void *dst, const void *src, size_t len) */ 42ENTRY(memcpy) 43 pld [r1] 44 cmp r2, #0x0c 45 ble .Lmemcpy_short /* <= 12 bytes */ 46 mov r3, r0 /* We must not clobber r0 */ 47 --- 82 unchanged lines hidden (view full) --- 130 strd r8, [r3], #0x08 /* ST:70-77 */ 131 subs r2, r2, #0x80 132 strd r4, [r3], #0x08 /* ST:78-7f */ 133 bge .Lmemcpy_w_loop128 134 135.Lmemcpy_w_lessthan128: 136 adds r2, r2, #0x80 /* Adjust for extra sub */ 137 ldmeqfd sp!, {r4-r9} |
138 moveq pc, lr /* Return now if done */ | 138 bxeq lr /* Return now if done */ |
139 subs r2, r2, #0x20 140 blt .Lmemcpy_w_lessthan32 141 142 /* Copy 32 bytes at a time */ 143.Lmemcpy_w_loop32: 144 ldr r4, [r1], #0x04 145 ldr r5, [r1], #0x04 146 pld [r1, #0x18] --- 8 unchanged lines hidden (view full) --- 155 strd r8, [r3], #0x08 156 subs r2, r2, #0x20 157 strd r4, [r3], #0x08 158 bge .Lmemcpy_w_loop32 159 160.Lmemcpy_w_lessthan32: 161 adds r2, r2, #0x20 /* Adjust for extra sub */ 162 ldmeqfd sp!, {r4-r9} | 139 subs r2, r2, #0x20 140 blt .Lmemcpy_w_lessthan32 141 142 /* Copy 32 bytes at a time */ 143.Lmemcpy_w_loop32: 144 ldr r4, [r1], #0x04 145 ldr r5, [r1], #0x04 146 pld [r1, #0x18] --- 8 unchanged lines hidden (view full) --- 155 strd r8, [r3], #0x08 156 subs r2, r2, #0x20 157 strd r4, [r3], #0x08 158 bge .Lmemcpy_w_loop32 159 160.Lmemcpy_w_lessthan32: 161 adds r2, r2, #0x20 /* Adjust for extra sub */ 162 ldmeqfd sp!, {r4-r9} |
163 moveq pc, lr /* Return now if done */ | 163 bxeq lr /* Return now if done */ |
164 165 and r4, r2, #0x18 166 rsbs r4, r4, #0x18 167 addne pc, pc, r4, lsl #1 168 nop 169 170 /* At least 24 bytes remaining */ 171 ldr r4, [r1], #0x04 --- 10 unchanged lines hidden (view full) --- 182 /* At least 8 bytes remaining */ 183 ldr r4, [r1], #0x04 184 ldr r5, [r1], #0x04 185 subs r2, r2, #0x08 186 strd r4, [r3], #0x08 187 188 /* Less than 8 bytes remaining */ 189 ldmfd sp!, {r4-r9} | 164 165 and r4, r2, #0x18 166 rsbs r4, r4, #0x18 167 addne pc, pc, r4, lsl #1 168 nop 169 170 /* At least 24 bytes remaining */ 171 ldr r4, [r1], #0x04 --- 10 unchanged lines hidden (view full) --- 182 /* At least 8 bytes remaining */ 183 ldr r4, [r1], #0x04 184 ldr r5, [r1], #0x04 185 subs r2, r2, #0x08 186 strd r4, [r3], #0x08 187 188 /* Less than 8 bytes remaining */ 189 ldmfd sp!, {r4-r9} |
190 moveq pc, lr /* Return now if done */ | 190 bxeq lr /* Return now if done */ |
191 subs r2, r2, #0x04 192 ldrge ip, [r1], #0x04 193 strge ip, [r3], #0x04 | 191 subs r2, r2, #0x04 192 ldrge ip, [r1], #0x04 193 strge ip, [r3], #0x04 |
194 moveq pc, lr /* Return now if done */ | 194 bxeq lr /* Return now if done */ |
195 addlt r2, r2, #0x04 196 ldrb ip, [r1], #0x01 197 cmp r2, #0x02 198 ldrgeb r2, [r1], #0x01 199 strb ip, [r3], #0x01 200 ldrgtb ip, [r1] 201 strgeb r2, [r3], #0x01 202 strgtb ip, [r3] | 195 addlt r2, r2, #0x04 196 ldrb ip, [r1], #0x01 197 cmp r2, #0x02 198 ldrgeb r2, [r1], #0x01 199 strb ip, [r3], #0x01 200 ldrgtb ip, [r1] 201 strgeb r2, [r3], #0x01 202 strgtb ip, [r3] |
203 mov pc, lr | 203 bx lr |
204 205 206/* 207 * At this point, it has not been possible to word align both buffers. 208 * The destination buffer is word aligned, but the source buffer is not. 209 */ 210.Lmemcpy_bad_align: 211 stmfd sp!, {r4-r7} --- 37 unchanged lines hidden (view full) --- 249 str r6, [r3], #0x04 250 str r7, [r3], #0x04 251.Lmemcpy_bad1: 252 subs r2, r2, #0x10 253 bge .Lmemcpy_bad1_loop16 254 255 adds r2, r2, #0x10 256 ldmeqfd sp!, {r4-r7} | 204 205 206/* 207 * At this point, it has not been possible to word align both buffers. 208 * The destination buffer is word aligned, but the source buffer is not. 209 */ 210.Lmemcpy_bad_align: 211 stmfd sp!, {r4-r7} --- 37 unchanged lines hidden (view full) --- 249 str r6, [r3], #0x04 250 str r7, [r3], #0x04 251.Lmemcpy_bad1: 252 subs r2, r2, #0x10 253 bge .Lmemcpy_bad1_loop16 254 255 adds r2, r2, #0x10 256 ldmeqfd sp!, {r4-r7} |
257 moveq pc, lr /* Return now if done */ | 257 bxeq lr /* Return now if done */ |
258 subs r2, r2, #0x04 259 sublt r1, r1, #0x03 260 blt .Lmemcpy_bad_done 261 262.Lmemcpy_bad1_loop4: 263#ifdef __ARMEB__ 264 mov r4, ip, lsl #8 265#else --- 44 unchanged lines hidden (view full) --- 310 str r6, [r3], #0x04 311 str r7, [r3], #0x04 312.Lmemcpy_bad2: 313 subs r2, r2, #0x10 314 bge .Lmemcpy_bad2_loop16 315 316 adds r2, r2, #0x10 317 ldmeqfd sp!, {r4-r7} | 258 subs r2, r2, #0x04 259 sublt r1, r1, #0x03 260 blt .Lmemcpy_bad_done 261 262.Lmemcpy_bad1_loop4: 263#ifdef __ARMEB__ 264 mov r4, ip, lsl #8 265#else --- 44 unchanged lines hidden (view full) --- 310 str r6, [r3], #0x04 311 str r7, [r3], #0x04 312.Lmemcpy_bad2: 313 subs r2, r2, #0x10 314 bge .Lmemcpy_bad2_loop16 315 316 adds r2, r2, #0x10 317 ldmeqfd sp!, {r4-r7} |
318 moveq pc, lr /* Return now if done */ | 318 bxeq lr /* Return now if done */ |
319 subs r2, r2, #0x04 320 sublt r1, r1, #0x02 321 blt .Lmemcpy_bad_done 322 323.Lmemcpy_bad2_loop4: 324#ifdef __ARMEB__ 325 mov r4, ip, lsl #16 326#else --- 44 unchanged lines hidden (view full) --- 371 str r6, [r3], #0x04 372 str r7, [r3], #0x04 373.Lmemcpy_bad3: 374 subs r2, r2, #0x10 375 bge .Lmemcpy_bad3_loop16 376 377 adds r2, r2, #0x10 378 ldmeqfd sp!, {r4-r7} | 319 subs r2, r2, #0x04 320 sublt r1, r1, #0x02 321 blt .Lmemcpy_bad_done 322 323.Lmemcpy_bad2_loop4: 324#ifdef __ARMEB__ 325 mov r4, ip, lsl #16 326#else --- 44 unchanged lines hidden (view full) --- 371 str r6, [r3], #0x04 372 str r7, [r3], #0x04 373.Lmemcpy_bad3: 374 subs r2, r2, #0x10 375 bge .Lmemcpy_bad3_loop16 376 377 adds r2, r2, #0x10 378 ldmeqfd sp!, {r4-r7} |
379 moveq pc, lr /* Return now if done */ | 379 bxeq lr /* Return now if done */ |
380 subs r2, r2, #0x04 381 sublt r1, r1, #0x01 382 blt .Lmemcpy_bad_done 383 384.Lmemcpy_bad3_loop4: 385#ifdef __ARMEB__ 386 mov r4, ip, lsl #24 387#else --- 8 unchanged lines hidden (view full) --- 396#endif 397 str r4, [r3], #0x04 398 bge .Lmemcpy_bad3_loop4 399 sub r1, r1, #0x01 400 401.Lmemcpy_bad_done: 402 ldmfd sp!, {r4-r7} 403 adds r2, r2, #0x04 | 380 subs r2, r2, #0x04 381 sublt r1, r1, #0x01 382 blt .Lmemcpy_bad_done 383 384.Lmemcpy_bad3_loop4: 385#ifdef __ARMEB__ 386 mov r4, ip, lsl #24 387#else --- 8 unchanged lines hidden (view full) --- 396#endif 397 str r4, [r3], #0x04 398 bge .Lmemcpy_bad3_loop4 399 sub r1, r1, #0x01 400 401.Lmemcpy_bad_done: 402 ldmfd sp!, {r4-r7} 403 adds r2, r2, #0x04 |
404 moveq pc, lr | 404 bxeq lr |
405 ldrb ip, [r1], #0x01 406 cmp r2, #0x02 407 ldrgeb r2, [r1], #0x01 408 strb ip, [r3], #0x01 409 ldrgtb ip, [r1] 410 strgeb r2, [r3], #0x01 411 strgtb ip, [r3] | 405 ldrb ip, [r1], #0x01 406 cmp r2, #0x02 407 ldrgeb r2, [r1], #0x01 408 strb ip, [r3], #0x01 409 ldrgtb ip, [r1] 410 strgeb r2, [r3], #0x01 411 strgtb ip, [r3] |
412 mov pc, lr | 412 bx lr |
413 414 415/* 416 * Handle short copies (less than 16 bytes), possibly misaligned. 417 * Some of these are *very* common, thanks to the network stack, 418 * and so are handled specially. 419 */ 420.Lmemcpy_short: 421#ifndef _STANDALONE 422 add pc, pc, r2, lsl #2 423 nop | 413 414 415/* 416 * Handle short copies (less than 16 bytes), possibly misaligned. 417 * Some of these are *very* common, thanks to the network stack, 418 * and so are handled specially. 419 */ 420.Lmemcpy_short: 421#ifndef _STANDALONE 422 add pc, pc, r2, lsl #2 423 nop |
424 mov pc, lr /* 0x00 */ | 424 bx lr /* 0x00 */ |
425 b .Lmemcpy_bytewise /* 0x01 */ 426 b .Lmemcpy_bytewise /* 0x02 */ 427 b .Lmemcpy_bytewise /* 0x03 */ 428 b .Lmemcpy_4 /* 0x04 */ 429 b .Lmemcpy_bytewise /* 0x05 */ 430 b .Lmemcpy_6 /* 0x06 */ 431 b .Lmemcpy_bytewise /* 0x07 */ 432 b .Lmemcpy_8 /* 0x08 */ --- 4 unchanged lines hidden (view full) --- 437#endif 438.Lmemcpy_bytewise: 439 mov r3, r0 /* We must not clobber r0 */ 440 ldrb ip, [r1], #0x01 4411: subs r2, r2, #0x01 442 strb ip, [r3], #0x01 443 ldrneb ip, [r1], #0x01 444 bne 1b | 425 b .Lmemcpy_bytewise /* 0x01 */ 426 b .Lmemcpy_bytewise /* 0x02 */ 427 b .Lmemcpy_bytewise /* 0x03 */ 428 b .Lmemcpy_4 /* 0x04 */ 429 b .Lmemcpy_bytewise /* 0x05 */ 430 b .Lmemcpy_6 /* 0x06 */ 431 b .Lmemcpy_bytewise /* 0x07 */ 432 b .Lmemcpy_8 /* 0x08 */ --- 4 unchanged lines hidden (view full) --- 437#endif 438.Lmemcpy_bytewise: 439 mov r3, r0 /* We must not clobber r0 */ 440 ldrb ip, [r1], #0x01 4411: subs r2, r2, #0x01 442 strb ip, [r3], #0x01 443 ldrneb ip, [r1], #0x01 444 bne 1b |
445 mov pc, lr | 445 bx lr |
446 447#ifndef _STANDALONE 448/****************************************************************************** 449 * Special case for 4 byte copies 450 */ 451#define LMEMCPY_4_LOG2 6 /* 64 bytes */ 452#define LMEMCPY_4_PAD .align LMEMCPY_4_LOG2 453 LMEMCPY_4_PAD --- 4 unchanged lines hidden (view full) --- 458 sub r3, pc, #0x14 459 addne pc, r3, r2, lsl #LMEMCPY_4_LOG2 460 461/* 462 * 0000: dst is 32-bit aligned, src is 32-bit aligned 463 */ 464 ldr r2, [r1] 465 str r2, [r0] | 446 447#ifndef _STANDALONE 448/****************************************************************************** 449 * Special case for 4 byte copies 450 */ 451#define LMEMCPY_4_LOG2 6 /* 64 bytes */ 452#define LMEMCPY_4_PAD .align LMEMCPY_4_LOG2 453 LMEMCPY_4_PAD --- 4 unchanged lines hidden (view full) --- 458 sub r3, pc, #0x14 459 addne pc, r3, r2, lsl #LMEMCPY_4_LOG2 460 461/* 462 * 0000: dst is 32-bit aligned, src is 32-bit aligned 463 */ 464 ldr r2, [r1] 465 str r2, [r0] |
466 mov pc, lr | 466 bx lr |
467 LMEMCPY_4_PAD 468 469/* 470 * 0001: dst is 32-bit aligned, src is 8-bit aligned 471 */ 472 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 473 ldr r2, [r1, #3] /* BE:r2 = 3xxx LE:r2 = xxx3 */ 474#ifdef __ARMEB__ 475 mov r3, r3, lsl #8 /* r3 = 012. */ 476 orr r3, r3, r2, lsr #24 /* r3 = 0123 */ 477#else 478 mov r3, r3, lsr #8 /* r3 = .210 */ 479 orr r3, r3, r2, lsl #24 /* r3 = 3210 */ 480#endif 481 str r3, [r0] | 467 LMEMCPY_4_PAD 468 469/* 470 * 0001: dst is 32-bit aligned, src is 8-bit aligned 471 */ 472 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 473 ldr r2, [r1, #3] /* BE:r2 = 3xxx LE:r2 = xxx3 */ 474#ifdef __ARMEB__ 475 mov r3, r3, lsl #8 /* r3 = 012. */ 476 orr r3, r3, r2, lsr #24 /* r3 = 0123 */ 477#else 478 mov r3, r3, lsr #8 /* r3 = .210 */ 479 orr r3, r3, r2, lsl #24 /* r3 = 3210 */ 480#endif 481 str r3, [r0] |
482 mov pc, lr | 482 bx lr |
483 LMEMCPY_4_PAD 484 485/* 486 * 0010: dst is 32-bit aligned, src is 16-bit aligned 487 */ 488#ifdef __ARMEB__ 489 ldrh r3, [r1] 490 ldrh r2, [r1, #0x02] 491#else 492 ldrh r3, [r1, #0x02] 493 ldrh r2, [r1] 494#endif 495 orr r3, r2, r3, lsl #16 496 str r3, [r0] | 483 LMEMCPY_4_PAD 484 485/* 486 * 0010: dst is 32-bit aligned, src is 16-bit aligned 487 */ 488#ifdef __ARMEB__ 489 ldrh r3, [r1] 490 ldrh r2, [r1, #0x02] 491#else 492 ldrh r3, [r1, #0x02] 493 ldrh r2, [r1] 494#endif 495 orr r3, r2, r3, lsl #16 496 str r3, [r0] |
497 mov pc, lr | 497 bx lr |
498 LMEMCPY_4_PAD 499 500/* 501 * 0011: dst is 32-bit aligned, src is 8-bit aligned 502 */ 503 ldr r3, [r1, #-3] /* BE:r3 = xxx0 LE:r3 = 0xxx */ 504 ldr r2, [r1, #1] /* BE:r2 = 123x LE:r2 = x321 */ 505#ifdef __ARMEB__ 506 mov r3, r3, lsl #24 /* r3 = 0... */ 507 orr r3, r3, r2, lsr #8 /* r3 = 0123 */ 508#else 509 mov r3, r3, lsr #24 /* r3 = ...0 */ 510 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 511#endif 512 str r3, [r0] | 498 LMEMCPY_4_PAD 499 500/* 501 * 0011: dst is 32-bit aligned, src is 8-bit aligned 502 */ 503 ldr r3, [r1, #-3] /* BE:r3 = xxx0 LE:r3 = 0xxx */ 504 ldr r2, [r1, #1] /* BE:r2 = 123x LE:r2 = x321 */ 505#ifdef __ARMEB__ 506 mov r3, r3, lsl #24 /* r3 = 0... */ 507 orr r3, r3, r2, lsr #8 /* r3 = 0123 */ 508#else 509 mov r3, r3, lsr #24 /* r3 = ...0 */ 510 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 511#endif 512 str r3, [r0] |
513 mov pc, lr | 513 bx lr |
514 LMEMCPY_4_PAD 515 516/* 517 * 0100: dst is 8-bit aligned, src is 32-bit aligned 518 */ 519 ldr r2, [r1] 520#ifdef __ARMEB__ 521 strb r2, [r0, #0x03] 522 mov r3, r2, lsr #8 523 mov r1, r2, lsr #24 524 strb r1, [r0] 525#else 526 strb r2, [r0] 527 mov r3, r2, lsr #8 528 mov r1, r2, lsr #24 529 strb r1, [r0, #0x03] 530#endif 531 strh r3, [r0, #0x01] | 514 LMEMCPY_4_PAD 515 516/* 517 * 0100: dst is 8-bit aligned, src is 32-bit aligned 518 */ 519 ldr r2, [r1] 520#ifdef __ARMEB__ 521 strb r2, [r0, #0x03] 522 mov r3, r2, lsr #8 523 mov r1, r2, lsr #24 524 strb r1, [r0] 525#else 526 strb r2, [r0] 527 mov r3, r2, lsr #8 528 mov r1, r2, lsr #24 529 strb r1, [r0, #0x03] 530#endif 531 strh r3, [r0, #0x01] |
532 mov pc, lr | 532 bx lr |
533 LMEMCPY_4_PAD 534 535/* 536 * 0101: dst is 8-bit aligned, src is 8-bit aligned 537 */ 538 ldrb r2, [r1] 539 ldrh r3, [r1, #0x01] 540 ldrb r1, [r1, #0x03] 541 strb r2, [r0] 542 strh r3, [r0, #0x01] 543 strb r1, [r0, #0x03] | 533 LMEMCPY_4_PAD 534 535/* 536 * 0101: dst is 8-bit aligned, src is 8-bit aligned 537 */ 538 ldrb r2, [r1] 539 ldrh r3, [r1, #0x01] 540 ldrb r1, [r1, #0x03] 541 strb r2, [r0] 542 strh r3, [r0, #0x01] 543 strb r1, [r0, #0x03] |
544 mov pc, lr | 544 bx lr |
545 LMEMCPY_4_PAD 546 547/* 548 * 0110: dst is 8-bit aligned, src is 16-bit aligned 549 */ 550 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 551 ldrh r3, [r1, #0x02] /* LE:r3 = ..23 LE:r3 = ..32 */ 552#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 557#else 558 strb r2, [r0] 559 mov r2, r2, lsr #8 /* r2 = ...1 */ 560 orr r2, r2, r3, lsl #8 /* r2 = .321 */ 561 mov r3, r3, lsr #8 /* r3 = ...3 */ 562#endif 563 strh r2, [r0, #0x01] 564 strb r3, [r0, #0x03] | 545 LMEMCPY_4_PAD 546 547/* 548 * 0110: dst is 8-bit aligned, src is 16-bit aligned 549 */ 550 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 551 ldrh r3, [r1, #0x02] /* LE:r3 = ..23 LE:r3 = ..32 */ 552#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 557#else 558 strb r2, [r0] 559 mov r2, r2, lsr #8 /* r2 = ...1 */ 560 orr r2, r2, r3, lsl #8 /* r2 = .321 */ 561 mov r3, r3, lsr #8 /* r3 = ...3 */ 562#endif 563 strh r2, [r0, #0x01] 564 strb r3, [r0, #0x03] |
565 mov pc, lr | 565 bx lr |
566 LMEMCPY_4_PAD 567 568/* 569 * 0111: dst is 8-bit aligned, src is 8-bit aligned 570 */ 571 ldrb r2, [r1] 572 ldrh r3, [r1, #0x01] 573 ldrb r1, [r1, #0x03] 574 strb r2, [r0] 575 strh r3, [r0, #0x01] 576 strb r1, [r0, #0x03] | 566 LMEMCPY_4_PAD 567 568/* 569 * 0111: dst is 8-bit aligned, src is 8-bit aligned 570 */ 571 ldrb r2, [r1] 572 ldrh r3, [r1, #0x01] 573 ldrb r1, [r1, #0x03] 574 strb r2, [r0] 575 strh r3, [r0, #0x01] 576 strb r1, [r0, #0x03] |
577 mov pc, lr | 577 bx lr |
578 LMEMCPY_4_PAD 579 580/* 581 * 1000: dst is 16-bit aligned, src is 32-bit aligned 582 */ 583 ldr r2, [r1] 584#ifdef __ARMEB__ 585 strh r2, [r0, #0x02] 586 mov r3, r2, lsr #16 587 strh r3, [r0] 588#else 589 strh r2, [r0] 590 mov r3, r2, lsr #16 591 strh r3, [r0, #0x02] 592#endif | 578 LMEMCPY_4_PAD 579 580/* 581 * 1000: dst is 16-bit aligned, src is 32-bit aligned 582 */ 583 ldr r2, [r1] 584#ifdef __ARMEB__ 585 strh r2, [r0, #0x02] 586 mov r3, r2, lsr #16 587 strh r3, [r0] 588#else 589 strh r2, [r0] 590 mov r3, r2, lsr #16 591 strh r3, [r0, #0x02] 592#endif |
593 mov pc, lr | 593 bx lr |
594 LMEMCPY_4_PAD 595 596/* 597 * 1001: dst is 16-bit aligned, src is 8-bit aligned 598 */ 599 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 600 ldr r3, [r1, #3] /* BE:r3 = 3xxx LE:r3 = xxx3 */ 601 mov r1, r2, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ 602 strh r1, [r0] 603#ifdef __ARMEB__ 604 mov r2, r2, lsl #8 /* r2 = 012. */ 605 orr r2, r2, r3, lsr #24 /* r2 = 0123 */ 606#else 607 mov r2, r2, lsr #24 /* r2 = ...2 */ 608 orr r2, r2, r3, lsl #8 /* r2 = xx32 */ 609#endif 610 strh r2, [r0, #0x02] | 594 LMEMCPY_4_PAD 595 596/* 597 * 1001: dst is 16-bit aligned, src is 8-bit aligned 598 */ 599 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 600 ldr r3, [r1, #3] /* BE:r3 = 3xxx LE:r3 = xxx3 */ 601 mov r1, r2, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ 602 strh r1, [r0] 603#ifdef __ARMEB__ 604 mov r2, r2, lsl #8 /* r2 = 012. */ 605 orr r2, r2, r3, lsr #24 /* r2 = 0123 */ 606#else 607 mov r2, r2, lsr #24 /* r2 = ...2 */ 608 orr r2, r2, r3, lsl #8 /* r2 = xx32 */ 609#endif 610 strh r2, [r0, #0x02] |
611 mov pc, lr | 611 bx lr |
612 LMEMCPY_4_PAD 613 614/* 615 * 1010: dst is 16-bit aligned, src is 16-bit aligned 616 */ 617 ldrh r2, [r1] 618 ldrh r3, [r1, #0x02] 619 strh r2, [r0] 620 strh r3, [r0, #0x02] | 612 LMEMCPY_4_PAD 613 614/* 615 * 1010: dst is 16-bit aligned, src is 16-bit aligned 616 */ 617 ldrh r2, [r1] 618 ldrh r3, [r1, #0x02] 619 strh r2, [r0] 620 strh r3, [r0, #0x02] |
621 mov pc, lr | 621 bx lr |
622 LMEMCPY_4_PAD 623 624/* 625 * 1011: dst is 16-bit aligned, src is 8-bit aligned 626 */ 627 ldr r3, [r1, #1] /* BE:r3 = 123x LE:r3 = x321 */ 628 ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ 629 mov r1, r3, lsr #8 /* BE:r1 = .123 LE:r1 = .x32 */ 630 strh r1, [r0, #0x02] 631#ifdef __ARMEB__ 632 mov r3, r3, lsr #24 /* r3 = ...1 */ 633 orr r3, r3, r2, lsl #8 /* r3 = xx01 */ 634#else 635 mov r3, r3, lsl #8 /* r3 = 321. */ 636 orr r3, r3, r2, lsr #24 /* r3 = 3210 */ 637#endif 638 strh r3, [r0] | 622 LMEMCPY_4_PAD 623 624/* 625 * 1011: dst is 16-bit aligned, src is 8-bit aligned 626 */ 627 ldr r3, [r1, #1] /* BE:r3 = 123x LE:r3 = x321 */ 628 ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ 629 mov r1, r3, lsr #8 /* BE:r1 = .123 LE:r1 = .x32 */ 630 strh r1, [r0, #0x02] 631#ifdef __ARMEB__ 632 mov r3, r3, lsr #24 /* r3 = ...1 */ 633 orr r3, r3, r2, lsl #8 /* r3 = xx01 */ 634#else 635 mov r3, r3, lsl #8 /* r3 = 321. */ 636 orr r3, r3, r2, lsr #24 /* r3 = 3210 */ 637#endif 638 strh r3, [r0] |
639 mov pc, lr | 639 bx lr |
640 LMEMCPY_4_PAD 641 642/* 643 * 1100: dst is 8-bit aligned, src is 32-bit aligned 644 */ 645 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 646#ifdef __ARMEB__ 647 strb r2, [r0, #0x03] 648 mov r3, r2, lsr #8 649 mov r1, r2, lsr #24 650 strh r3, [r0, #0x01] 651 strb r1, [r0] 652#else 653 strb r2, [r0] 654 mov r3, r2, lsr #8 655 mov r1, r2, lsr #24 656 strh r3, [r0, #0x01] 657 strb r1, [r0, #0x03] 658#endif | 640 LMEMCPY_4_PAD 641 642/* 643 * 1100: dst is 8-bit aligned, src is 32-bit aligned 644 */ 645 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 646#ifdef __ARMEB__ 647 strb r2, [r0, #0x03] 648 mov r3, r2, lsr #8 649 mov r1, r2, lsr #24 650 strh r3, [r0, #0x01] 651 strb r1, [r0] 652#else 653 strb r2, [r0] 654 mov r3, r2, lsr #8 655 mov r1, r2, lsr #24 656 strh r3, [r0, #0x01] 657 strb r1, [r0, #0x03] 658#endif |
659 mov pc, lr | 659 bx lr |
660 LMEMCPY_4_PAD 661 662/* 663 * 1101: dst is 8-bit aligned, src is 8-bit aligned 664 */ 665 ldrb r2, [r1] 666 ldrh r3, [r1, #0x01] 667 ldrb r1, [r1, #0x03] 668 strb r2, [r0] 669 strh r3, [r0, #0x01] 670 strb r1, [r0, #0x03] | 660 LMEMCPY_4_PAD 661 662/* 663 * 1101: dst is 8-bit aligned, src is 8-bit aligned 664 */ 665 ldrb r2, [r1] 666 ldrh r3, [r1, #0x01] 667 ldrb r1, [r1, #0x03] 668 strb r2, [r0] 669 strh r3, [r0, #0x01] 670 strb r1, [r0, #0x03] |
671 mov pc, lr | 671 bx lr |
672 LMEMCPY_4_PAD 673 674/* 675 * 1110: dst is 8-bit aligned, src is 16-bit aligned 676 */ 677#ifdef __ARMEB__ 678 ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ 679 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ --- 8 unchanged lines hidden (view full) --- 688 ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ 689 strb r2, [r0] 690 mov r2, r2, lsr #8 /* r2 = ...1 */ 691 orr r2, r2, r3, lsl #8 /* r2 = .321 */ 692 strh r2, [r0, #0x01] 693 mov r3, r3, lsr #8 /* r3 = ...3 */ 694 strb r3, [r0, #0x03] 695#endif | 672 LMEMCPY_4_PAD 673 674/* 675 * 1110: dst is 8-bit aligned, src is 16-bit aligned 676 */ 677#ifdef __ARMEB__ 678 ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ 679 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ --- 8 unchanged lines hidden (view full) --- 688 ldrh r3, [r1, #0x02] /* BE:r3 = ..23 LE:r3 = ..32 */ 689 strb r2, [r0] 690 mov r2, r2, lsr #8 /* r2 = ...1 */ 691 orr r2, r2, r3, lsl #8 /* r2 = .321 */ 692 strh r2, [r0, #0x01] 693 mov r3, r3, lsr #8 /* r3 = ...3 */ 694 strb r3, [r0, #0x03] 695#endif |
696 mov pc, lr | 696 bx lr |
697 LMEMCPY_4_PAD 698 699/* 700 * 1111: dst is 8-bit aligned, src is 8-bit aligned 701 */ 702 ldrb r2, [r1] 703 ldrh r3, [r1, #0x01] 704 ldrb r1, [r1, #0x03] 705 strb r2, [r0] 706 strh r3, [r0, #0x01] 707 strb r1, [r0, #0x03] | 697 LMEMCPY_4_PAD 698 699/* 700 * 1111: dst is 8-bit aligned, src is 8-bit aligned 701 */ 702 ldrb r2, [r1] 703 ldrh r3, [r1, #0x01] 704 ldrb r1, [r1, #0x03] 705 strb r2, [r0] 706 strh r3, [r0, #0x01] 707 strb r1, [r0, #0x03] |
708 mov pc, lr | 708 bx lr |
709 LMEMCPY_4_PAD 710 711 712/****************************************************************************** 713 * Special case for 6 byte copies 714 */ 715#define LMEMCPY_6_LOG2 6 /* 64 bytes */ 716#define LMEMCPY_6_PAD .align LMEMCPY_6_LOG2 --- 7 unchanged lines hidden (view full) --- 724 725/* 726 * 0000: dst is 32-bit aligned, src is 32-bit aligned 727 */ 728 ldr r2, [r1] 729 ldrh r3, [r1, #0x04] 730 str r2, [r0] 731 strh r3, [r0, #0x04] | 709 LMEMCPY_4_PAD 710 711 712/****************************************************************************** 713 * Special case for 6 byte copies 714 */ 715#define LMEMCPY_6_LOG2 6 /* 64 bytes */ 716#define LMEMCPY_6_PAD .align LMEMCPY_6_LOG2 --- 7 unchanged lines hidden (view full) --- 724 725/* 726 * 0000: dst is 32-bit aligned, src is 32-bit aligned 727 */ 728 ldr r2, [r1] 729 ldrh r3, [r1, #0x04] 730 str r2, [r0] 731 strh r3, [r0, #0x04] |
732 mov pc, lr | 732 bx lr |
733 LMEMCPY_6_PAD 734 735/* 736 * 0001: dst is 32-bit aligned, src is 8-bit aligned 737 */ 738 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 739 ldr r3, [r1, #0x03] /* BE:r3 = 345x LE:r3 = x543 */ 740#ifdef __ARMEB__ 741 mov r2, r2, lsl #8 /* r2 = 012. */ 742 orr r2, r2, r3, lsr #24 /* r2 = 0123 */ 743#else 744 mov r2, r2, lsr #8 /* r2 = .210 */ 745 orr r2, r2, r3, lsl #24 /* r2 = 3210 */ 746#endif 747 mov r3, r3, lsr #8 /* BE:r3 = .345 LE:r3 = .x54 */ 748 str r2, [r0] 749 strh r3, [r0, #0x04] | 733 LMEMCPY_6_PAD 734 735/* 736 * 0001: dst is 32-bit aligned, src is 8-bit aligned 737 */ 738 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 739 ldr r3, [r1, #0x03] /* BE:r3 = 345x LE:r3 = x543 */ 740#ifdef __ARMEB__ 741 mov r2, r2, lsl #8 /* r2 = 012. */ 742 orr r2, r2, r3, lsr #24 /* r2 = 0123 */ 743#else 744 mov r2, r2, lsr #8 /* r2 = .210 */ 745 orr r2, r2, r3, lsl #24 /* r2 = 3210 */ 746#endif 747 mov r3, r3, lsr #8 /* BE:r3 = .345 LE:r3 = .x54 */ 748 str r2, [r0] 749 strh r3, [r0, #0x04] |
750 mov pc, lr | 750 bx lr |
751 LMEMCPY_6_PAD 752 753/* 754 * 0010: dst is 32-bit aligned, src is 16-bit aligned 755 */ 756 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 757 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 758#ifdef __ARMEB__ 759 mov r1, r3, lsr #16 /* r1 = ..23 */ 760 orr r1, r1, r2, lsl #16 /* r1 = 0123 */ 761 str r1, [r0] 762 strh r3, [r0, #0x04] 763#else 764 mov r1, r3, lsr #16 /* r1 = ..54 */ 765 orr r2, r2, r3, lsl #16 /* r2 = 3210 */ 766 str r2, [r0] 767 strh r1, [r0, #0x04] 768#endif | 751 LMEMCPY_6_PAD 752 753/* 754 * 0010: dst is 32-bit aligned, src is 16-bit aligned 755 */ 756 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 757 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 758#ifdef __ARMEB__ 759 mov r1, r3, lsr #16 /* r1 = ..23 */ 760 orr r1, r1, r2, lsl #16 /* r1 = 0123 */ 761 str r1, [r0] 762 strh r3, [r0, #0x04] 763#else 764 mov r1, r3, lsr #16 /* r1 = ..54 */ 765 orr r2, r2, r3, lsl #16 /* r2 = 3210 */ 766 str r2, [r0] 767 strh r1, [r0, #0x04] 768#endif |
769 mov pc, lr | 769 bx lr |
770 LMEMCPY_6_PAD 771 772/* 773 * 0011: dst is 32-bit aligned, src is 8-bit aligned 774 */ 775 ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ 776 ldr r3, [r1, #1] /* BE:r3 = 1234 LE:r3 = 4321 */ 777 ldr r1, [r1, #5] /* BE:r1 = 5xxx LE:r3 = xxx5 */ --- 5 unchanged lines hidden (view full) --- 783#else 784 mov r2, r2, lsr #24 /* r2 = ...0 */ 785 orr r2, r2, r3, lsl #8 /* r2 = 3210 */ 786 mov r1, r1, lsl #8 /* r1 = xx5. */ 787 orr r1, r1, r3, lsr #24 /* r1 = xx54 */ 788#endif 789 str r2, [r0] 790 strh r1, [r0, #0x04] | 770 LMEMCPY_6_PAD 771 772/* 773 * 0011: dst is 32-bit aligned, src is 8-bit aligned 774 */ 775 ldr r2, [r1, #-3] /* BE:r2 = xxx0 LE:r2 = 0xxx */ 776 ldr r3, [r1, #1] /* BE:r3 = 1234 LE:r3 = 4321 */ 777 ldr r1, [r1, #5] /* BE:r1 = 5xxx LE:r3 = xxx5 */ --- 5 unchanged lines hidden (view full) --- 783#else 784 mov r2, r2, lsr #24 /* r2 = ...0 */ 785 orr r2, r2, r3, lsl #8 /* r2 = 3210 */ 786 mov r1, r1, lsl #8 /* r1 = xx5. */ 787 orr r1, r1, r3, lsr #24 /* r1 = xx54 */ 788#endif 789 str r2, [r0] 790 strh r1, [r0, #0x04] |
791 mov pc, lr | 791 bx lr |
792 LMEMCPY_6_PAD 793 794/* 795 * 0100: dst is 8-bit aligned, src is 32-bit aligned 796 */ 797 ldr r3, [r1] /* BE:r3 = 0123 LE:r3 = 3210 */ 798 ldrh r2, [r1, #0x04] /* BE:r2 = ..45 LE:r2 = ..54 */ 799 mov r1, r3, lsr #8 /* BE:r1 = .012 LE:r1 = .321 */ --- 6 unchanged lines hidden (view full) --- 806#else 807 strb r3, [r0] 808 mov r3, r3, lsr #24 /* r3 = ...3 */ 809 orr r3, r3, r2, lsl #8 /* r3 = .543 */ 810 mov r2, r2, lsr #8 /* r2 = ...5 */ 811#endif 812 strh r3, [r0, #0x03] 813 strb r2, [r0, #0x05] | 792 LMEMCPY_6_PAD 793 794/* 795 * 0100: dst is 8-bit aligned, src is 32-bit aligned 796 */ 797 ldr r3, [r1] /* BE:r3 = 0123 LE:r3 = 3210 */ 798 ldrh r2, [r1, #0x04] /* BE:r2 = ..45 LE:r2 = ..54 */ 799 mov r1, r3, lsr #8 /* BE:r1 = .012 LE:r1 = .321 */ --- 6 unchanged lines hidden (view full) --- 806#else 807 strb r3, [r0] 808 mov r3, r3, lsr #24 /* r3 = ...3 */ 809 orr r3, r3, r2, lsl #8 /* r3 = .543 */ 810 mov r2, r2, lsr #8 /* r2 = ...5 */ 811#endif 812 strh r3, [r0, #0x03] 813 strb r2, [r0, #0x05] |
814 mov pc, lr | 814 bx lr |
815 LMEMCPY_6_PAD 816 817/* 818 * 0101: dst is 8-bit aligned, src is 8-bit aligned 819 */ 820 ldrb r2, [r1] 821 ldrh r3, [r1, #0x01] 822 ldrh ip, [r1, #0x03] 823 ldrb r1, [r1, #0x05] 824 strb r2, [r0] 825 strh r3, [r0, #0x01] 826 strh ip, [r0, #0x03] 827 strb r1, [r0, #0x05] | 815 LMEMCPY_6_PAD 816 817/* 818 * 0101: dst is 8-bit aligned, src is 8-bit aligned 819 */ 820 ldrb r2, [r1] 821 ldrh r3, [r1, #0x01] 822 ldrh ip, [r1, #0x03] 823 ldrb r1, [r1, #0x05] 824 strb r2, [r0] 825 strh r3, [r0, #0x01] 826 strh ip, [r0, #0x03] 827 strb r1, [r0, #0x05] |
828 mov pc, lr | 828 bx lr |
829 LMEMCPY_6_PAD 830 831/* 832 * 0110: dst is 8-bit aligned, src is 16-bit aligned 833 */ 834 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 835 ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ 836#ifdef __ARMEB__ --- 10 unchanged lines hidden (view full) --- 847 mov r3, r1, lsr #24 848 strb r3, [r0, #0x05] 849 mov r3, r1, lsr #8 /* r3 = .543 */ 850 strh r3, [r0, #0x03] 851 mov r3, r2, lsr #8 /* r3 = ...1 */ 852 orr r3, r3, r1, lsl #8 /* r3 = 4321 */ 853 strh r3, [r0, #0x01] 854#endif | 829 LMEMCPY_6_PAD 830 831/* 832 * 0110: dst is 8-bit aligned, src is 16-bit aligned 833 */ 834 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 835 ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ 836#ifdef __ARMEB__ --- 10 unchanged lines hidden (view full) --- 847 mov r3, r1, lsr #24 848 strb r3, [r0, #0x05] 849 mov r3, r1, lsr #8 /* r3 = .543 */ 850 strh r3, [r0, #0x03] 851 mov r3, r2, lsr #8 /* r3 = ...1 */ 852 orr r3, r3, r1, lsl #8 /* r3 = 4321 */ 853 strh r3, [r0, #0x01] 854#endif |
855 mov pc, lr | 855 bx lr |
856 LMEMCPY_6_PAD 857 858/* 859 * 0111: dst is 8-bit aligned, src is 8-bit aligned 860 */ 861 ldrb r2, [r1] 862 ldrh r3, [r1, #0x01] 863 ldrh ip, [r1, #0x03] 864 ldrb r1, [r1, #0x05] 865 strb r2, [r0] 866 strh r3, [r0, #0x01] 867 strh ip, [r0, #0x03] 868 strb r1, [r0, #0x05] | 856 LMEMCPY_6_PAD 857 858/* 859 * 0111: dst is 8-bit aligned, src is 8-bit aligned 860 */ 861 ldrb r2, [r1] 862 ldrh r3, [r1, #0x01] 863 ldrh ip, [r1, #0x03] 864 ldrb r1, [r1, #0x05] 865 strb r2, [r0] 866 strh r3, [r0, #0x01] 867 strh ip, [r0, #0x03] 868 strb r1, [r0, #0x05] |
869 mov pc, lr | 869 bx lr |
870 LMEMCPY_6_PAD 871 872/* 873 * 1000: dst is 16-bit aligned, src is 32-bit aligned 874 */ 875#ifdef __ARMEB__ 876 ldr r2, [r1] /* r2 = 0123 */ 877 ldrh r3, [r1, #0x04] /* r3 = ..45 */ --- 4 unchanged lines hidden (view full) --- 882#else 883 ldrh r2, [r1, #0x04] /* r2 = ..54 */ 884 ldr r3, [r1] /* r3 = 3210 */ 885 mov r2, r2, lsl #16 /* r2 = 54.. */ 886 orr r2, r2, r3, lsr #16 /* r2 = 5432 */ 887 strh r3, [r0] 888 str r2, [r0, #0x02] 889#endif | 870 LMEMCPY_6_PAD 871 872/* 873 * 1000: dst is 16-bit aligned, src is 32-bit aligned 874 */ 875#ifdef __ARMEB__ 876 ldr r2, [r1] /* r2 = 0123 */ 877 ldrh r3, [r1, #0x04] /* r3 = ..45 */ --- 4 unchanged lines hidden (view full) --- 882#else 883 ldrh r2, [r1, #0x04] /* r2 = ..54 */ 884 ldr r3, [r1] /* r3 = 3210 */ 885 mov r2, r2, lsl #16 /* r2 = 54.. */ 886 orr r2, r2, r3, lsr #16 /* r2 = 5432 */ 887 strh r3, [r0] 888 str r2, [r0, #0x02] 889#endif |
890 mov pc, lr | 890 bx lr |
891 LMEMCPY_6_PAD 892 893/* 894 * 1001: dst is 16-bit aligned, src is 8-bit aligned 895 */ 896 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 897 ldr r2, [r1, #3] /* BE:r2 = 345x LE:r2 = x543 */ 898 mov r1, r3, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ 899#ifdef __ARMEB__ 900 mov r2, r2, lsr #8 /* r2 = .345 */ 901 orr r2, r2, r3, lsl #24 /* r2 = 2345 */ 902#else 903 mov r2, r2, lsl #8 /* r2 = 543. */ 904 orr r2, r2, r3, lsr #24 /* r2 = 5432 */ 905#endif 906 strh r1, [r0] 907 str r2, [r0, #0x02] | 891 LMEMCPY_6_PAD 892 893/* 894 * 1001: dst is 16-bit aligned, src is 8-bit aligned 895 */ 896 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 897 ldr r2, [r1, #3] /* BE:r2 = 345x LE:r2 = x543 */ 898 mov r1, r3, lsr #8 /* BE:r1 = .x01 LE:r1 = .210 */ 899#ifdef __ARMEB__ 900 mov r2, r2, lsr #8 /* r2 = .345 */ 901 orr r2, r2, r3, lsl #24 /* r2 = 2345 */ 902#else 903 mov r2, r2, lsl #8 /* r2 = 543. */ 904 orr r2, r2, r3, lsr #24 /* r2 = 5432 */ 905#endif 906 strh r1, [r0] 907 str r2, [r0, #0x02] |
908 mov pc, lr | 908 bx lr |
909 LMEMCPY_6_PAD 910 911/* 912 * 1010: dst is 16-bit aligned, src is 16-bit aligned 913 */ 914 ldrh r2, [r1] 915 ldr r3, [r1, #0x02] 916 strh r2, [r0] 917 str r3, [r0, #0x02] | 909 LMEMCPY_6_PAD 910 911/* 912 * 1010: dst is 16-bit aligned, src is 16-bit aligned 913 */ 914 ldrh r2, [r1] 915 ldr r3, [r1, #0x02] 916 strh r2, [r0] 917 str r3, [r0, #0x02] |
918 mov pc, lr | 918 bx lr |
919 LMEMCPY_6_PAD 920 921/* 922 * 1011: dst is 16-bit aligned, src is 8-bit aligned 923 */ 924 ldrb r3, [r1] /* r3 = ...0 */ 925 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 926 ldrb r1, [r1, #0x05] /* r1 = ...5 */ 927#ifdef __ARMEB__ 928 mov r3, r3, lsl #8 /* r3 = ..0. */ 929 orr r3, r3, r2, lsr #24 /* r3 = ..01 */ 930 orr r1, r1, r2, lsl #8 /* r1 = 2345 */ 931#else 932 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 933 mov r1, r1, lsl #24 /* r1 = 5... */ 934 orr r1, r1, r2, lsr #8 /* r1 = 5432 */ 935#endif 936 strh r3, [r0] 937 str r1, [r0, #0x02] | 919 LMEMCPY_6_PAD 920 921/* 922 * 1011: dst is 16-bit aligned, src is 8-bit aligned 923 */ 924 ldrb r3, [r1] /* r3 = ...0 */ 925 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 926 ldrb r1, [r1, #0x05] /* r1 = ...5 */ 927#ifdef __ARMEB__ 928 mov r3, r3, lsl #8 /* r3 = ..0. */ 929 orr r3, r3, r2, lsr #24 /* r3 = ..01 */ 930 orr r1, r1, r2, lsl #8 /* r1 = 2345 */ 931#else 932 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 933 mov r1, r1, lsl #24 /* r1 = 5... */ 934 orr r1, r1, r2, lsr #8 /* r1 = 5432 */ 935#endif 936 strh r3, [r0] 937 str r1, [r0, #0x02] |
938 mov pc, lr | 938 bx lr |
939 LMEMCPY_6_PAD 940 941/* 942 * 1100: dst is 8-bit aligned, src is 32-bit aligned 943 */ 944 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 945 ldrh r1, [r1, #0x04] /* BE:r1 = ..45 LE:r1 = ..54 */ 946#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 951#else 952 strb r2, [r0] 953 mov r2, r2, lsr #8 /* r2 = .321 */ 954 orr r2, r2, r1, lsl #24 /* r2 = 4321 */ 955 mov r1, r1, lsr #8 /* r1 = ...5 */ 956#endif 957 str r2, [r0, #0x01] 958 strb r1, [r0, #0x05] | 939 LMEMCPY_6_PAD 940 941/* 942 * 1100: dst is 8-bit aligned, src is 32-bit aligned 943 */ 944 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 945 ldrh r1, [r1, #0x04] /* BE:r1 = ..45 LE:r1 = ..54 */ 946#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 951#else 952 strb r2, [r0] 953 mov r2, r2, lsr #8 /* r2 = .321 */ 954 orr r2, r2, r1, lsl #24 /* r2 = 4321 */ 955 mov r1, r1, lsr #8 /* r1 = ...5 */ 956#endif 957 str r2, [r0, #0x01] 958 strb r1, [r0, #0x05] |
959 mov pc, lr | 959 bx lr |
960 LMEMCPY_6_PAD 961 962/* 963 * 1101: dst is 8-bit aligned, src is 8-bit aligned 964 */ 965 ldrb r2, [r1] 966 ldrh r3, [r1, #0x01] 967 ldrh ip, [r1, #0x03] 968 ldrb r1, [r1, #0x05] 969 strb r2, [r0] 970 strh r3, [r0, #0x01] 971 strh ip, [r0, #0x03] 972 strb r1, [r0, #0x05] | 960 LMEMCPY_6_PAD 961 962/* 963 * 1101: dst is 8-bit aligned, src is 8-bit aligned 964 */ 965 ldrb r2, [r1] 966 ldrh r3, [r1, #0x01] 967 ldrh ip, [r1, #0x03] 968 ldrb r1, [r1, #0x05] 969 strb r2, [r0] 970 strh r3, [r0, #0x01] 971 strh ip, [r0, #0x03] 972 strb r1, [r0, #0x05] |
973 mov pc, lr | 973 bx lr |
974 LMEMCPY_6_PAD 975 976/* 977 * 1110: dst is 8-bit aligned, src is 16-bit aligned 978 */ 979 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 980 ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ 981#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 986#else 987 strb r2, [r0] 988 mov r2, r2, lsr #8 /* r2 = ...1 */ 989 orr r2, r2, r1, lsl #8 /* r2 = 4321 */ 990 mov r1, r1, lsr #24 /* r1 = ...5 */ 991#endif 992 str r2, [r0, #0x01] 993 strb r1, [r0, #0x05] | 974 LMEMCPY_6_PAD 975 976/* 977 * 1110: dst is 8-bit aligned, src is 16-bit aligned 978 */ 979 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 980 ldr r1, [r1, #0x02] /* BE:r1 = 2345 LE:r1 = 5432 */ 981#ifdef __ARMEB__ --- 4 unchanged lines hidden (view full) --- 986#else 987 strb r2, [r0] 988 mov r2, r2, lsr #8 /* r2 = ...1 */ 989 orr r2, r2, r1, lsl #8 /* r2 = 4321 */ 990 mov r1, r1, lsr #24 /* r1 = ...5 */ 991#endif 992 str r2, [r0, #0x01] 993 strb r1, [r0, #0x05] |
994 mov pc, lr | 994 bx lr |
995 LMEMCPY_6_PAD 996 997/* 998 * 1111: dst is 8-bit aligned, src is 8-bit aligned 999 */ 1000 ldrb r2, [r1] 1001 ldr r3, [r1, #0x01] 1002 ldrb r1, [r1, #0x05] 1003 strb r2, [r0] 1004 str r3, [r0, #0x01] 1005 strb r1, [r0, #0x05] | 995 LMEMCPY_6_PAD 996 997/* 998 * 1111: dst is 8-bit aligned, src is 8-bit aligned 999 */ 1000 ldrb r2, [r1] 1001 ldr r3, [r1, #0x01] 1002 ldrb r1, [r1, #0x05] 1003 strb r2, [r0] 1004 str r3, [r0, #0x01] 1005 strb r1, [r0, #0x05] |
1006 mov pc, lr | 1006 bx lr |
1007 LMEMCPY_6_PAD 1008 1009 1010/****************************************************************************** 1011 * Special case for 8 byte copies 1012 */ 1013#define LMEMCPY_8_LOG2 6 /* 64 bytes */ 1014#define LMEMCPY_8_PAD .align LMEMCPY_8_LOG2 --- 7 unchanged lines hidden (view full) --- 1022 1023/* 1024 * 0000: dst is 32-bit aligned, src is 32-bit aligned 1025 */ 1026 ldr r2, [r1] 1027 ldr r3, [r1, #0x04] 1028 str r2, [r0] 1029 str r3, [r0, #0x04] | 1007 LMEMCPY_6_PAD 1008 1009 1010/****************************************************************************** 1011 * Special case for 8 byte copies 1012 */ 1013#define LMEMCPY_8_LOG2 6 /* 64 bytes */ 1014#define LMEMCPY_8_PAD .align LMEMCPY_8_LOG2 --- 7 unchanged lines hidden (view full) --- 1022 1023/* 1024 * 0000: dst is 32-bit aligned, src is 32-bit aligned 1025 */ 1026 ldr r2, [r1] 1027 ldr r3, [r1, #0x04] 1028 str r2, [r0] 1029 str r3, [r0, #0x04] |
1030 mov pc, lr | 1030 bx lr |
1031 LMEMCPY_8_PAD 1032 1033/* 1034 * 0001: dst is 32-bit aligned, src is 8-bit aligned 1035 */ 1036 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 1037 ldr r2, [r1, #0x03] /* BE:r2 = 3456 LE:r2 = 6543 */ 1038 ldrb r1, [r1, #0x07] /* r1 = ...7 */ --- 4 unchanged lines hidden (view full) --- 1043#else 1044 mov r3, r3, lsr #8 /* r3 = .210 */ 1045 orr r3, r3, r2, lsl #24 /* r3 = 3210 */ 1046 mov r1, r1, lsl #24 /* r1 = 7... */ 1047 orr r2, r1, r2, lsr #8 /* r2 = 7654 */ 1048#endif 1049 str r3, [r0] 1050 str r2, [r0, #0x04] | 1031 LMEMCPY_8_PAD 1032 1033/* 1034 * 0001: dst is 32-bit aligned, src is 8-bit aligned 1035 */ 1036 ldr r3, [r1, #-1] /* BE:r3 = x012 LE:r3 = 210x */ 1037 ldr r2, [r1, #0x03] /* BE:r2 = 3456 LE:r2 = 6543 */ 1038 ldrb r1, [r1, #0x07] /* r1 = ...7 */ --- 4 unchanged lines hidden (view full) --- 1043#else 1044 mov r3, r3, lsr #8 /* r3 = .210 */ 1045 orr r3, r3, r2, lsl #24 /* r3 = 3210 */ 1046 mov r1, r1, lsl #24 /* r1 = 7... */ 1047 orr r2, r1, r2, lsr #8 /* r2 = 7654 */ 1048#endif 1049 str r3, [r0] 1050 str r2, [r0, #0x04] |
1051 mov pc, lr | 1051 bx lr |
1052 LMEMCPY_8_PAD 1053 1054/* 1055 * 0010: dst is 32-bit aligned, src is 16-bit aligned 1056 */ 1057 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1058 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1059 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ 1060#ifdef __ARMEB__ 1061 mov r2, r2, lsl #16 /* r2 = 01.. */ 1062 orr r2, r2, r3, lsr #16 /* r2 = 0123 */ 1063 orr r3, r1, r3, lsl #16 /* r3 = 4567 */ 1064#else 1065 orr r2, r2, r3, lsl #16 /* r2 = 3210 */ 1066 mov r3, r3, lsr #16 /* r3 = ..54 */ 1067 orr r3, r3, r1, lsl #16 /* r3 = 7654 */ 1068#endif 1069 str r2, [r0] 1070 str r3, [r0, #0x04] | 1052 LMEMCPY_8_PAD 1053 1054/* 1055 * 0010: dst is 32-bit aligned, src is 16-bit aligned 1056 */ 1057 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1058 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1059 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ 1060#ifdef __ARMEB__ 1061 mov r2, r2, lsl #16 /* r2 = 01.. */ 1062 orr r2, r2, r3, lsr #16 /* r2 = 0123 */ 1063 orr r3, r1, r3, lsl #16 /* r3 = 4567 */ 1064#else 1065 orr r2, r2, r3, lsl #16 /* r2 = 3210 */ 1066 mov r3, r3, lsr #16 /* r3 = ..54 */ 1067 orr r3, r3, r1, lsl #16 /* r3 = 7654 */ 1068#endif 1069 str r2, [r0] 1070 str r3, [r0, #0x04] |
1071 mov pc, lr | 1071 bx lr |
1072 LMEMCPY_8_PAD 1073 1074/* 1075 * 0011: dst is 32-bit aligned, src is 8-bit aligned 1076 */ 1077 ldrb r3, [r1] /* r3 = ...0 */ 1078 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 1079 ldr r1, [r1, #0x05] /* BE:r1 = 567x LE:r1 = x765 */ --- 4 unchanged lines hidden (view full) --- 1084 orr r2, r2, r1, lsr #8 /* r2 = 4567 */ 1085#else 1086 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 1087 mov r2, r2, lsr #24 /* r2 = ...4 */ 1088 orr r2, r2, r1, lsl #8 /* r2 = 7654 */ 1089#endif 1090 str r3, [r0] 1091 str r2, [r0, #0x04] | 1072 LMEMCPY_8_PAD 1073 1074/* 1075 * 0011: dst is 32-bit aligned, src is 8-bit aligned 1076 */ 1077 ldrb r3, [r1] /* r3 = ...0 */ 1078 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 1079 ldr r1, [r1, #0x05] /* BE:r1 = 567x LE:r1 = x765 */ --- 4 unchanged lines hidden (view full) --- 1084 orr r2, r2, r1, lsr #8 /* r2 = 4567 */ 1085#else 1086 orr r3, r3, r2, lsl #8 /* r3 = 3210 */ 1087 mov r2, r2, lsr #24 /* r2 = ...4 */ 1088 orr r2, r2, r1, lsl #8 /* r2 = 7654 */ 1089#endif 1090 str r3, [r0] 1091 str r2, [r0, #0x04] |
1092 mov pc, lr | 1092 bx lr |
1093 LMEMCPY_8_PAD 1094 1095/* 1096 * 0100: dst is 8-bit aligned, src is 32-bit aligned 1097 */ 1098 ldr r3, [r1] /* BE:r3 = 0123 LE:r3 = 3210 */ 1099 ldr r2, [r1, #0x04] /* BE:r2 = 4567 LE:r2 = 7654 */ 1100#ifdef __ARMEB__ --- 8 unchanged lines hidden (view full) --- 1109 mov r1, r2, lsr #24 /* r1 = ...7 */ 1110 strb r1, [r0, #0x07] 1111 mov r1, r3, lsr #8 /* r1 = .321 */ 1112 mov r3, r3, lsr #24 /* r3 = ...3 */ 1113 orr r3, r3, r2, lsl #8 /* r3 = 6543 */ 1114#endif 1115 strh r1, [r0, #0x01] 1116 str r3, [r0, #0x03] | 1093 LMEMCPY_8_PAD 1094 1095/* 1096 * 0100: dst is 8-bit aligned, src is 32-bit aligned 1097 */ 1098 ldr r3, [r1] /* BE:r3 = 0123 LE:r3 = 3210 */ 1099 ldr r2, [r1, #0x04] /* BE:r2 = 4567 LE:r2 = 7654 */ 1100#ifdef __ARMEB__ --- 8 unchanged lines hidden (view full) --- 1109 mov r1, r2, lsr #24 /* r1 = ...7 */ 1110 strb r1, [r0, #0x07] 1111 mov r1, r3, lsr #8 /* r1 = .321 */ 1112 mov r3, r3, lsr #24 /* r3 = ...3 */ 1113 orr r3, r3, r2, lsl #8 /* r3 = 6543 */ 1114#endif 1115 strh r1, [r0, #0x01] 1116 str r3, [r0, #0x03] |
1117 mov pc, lr | 1117 bx lr |
1118 LMEMCPY_8_PAD 1119 1120/* 1121 * 0101: dst is 8-bit aligned, src is 8-bit aligned 1122 */ 1123 ldrb r2, [r1] 1124 ldrh r3, [r1, #0x01] 1125 ldr ip, [r1, #0x03] 1126 ldrb r1, [r1, #0x07] 1127 strb r2, [r0] 1128 strh r3, [r0, #0x01] 1129 str ip, [r0, #0x03] 1130 strb r1, [r0, #0x07] | 1118 LMEMCPY_8_PAD 1119 1120/* 1121 * 0101: dst is 8-bit aligned, src is 8-bit aligned 1122 */ 1123 ldrb r2, [r1] 1124 ldrh r3, [r1, #0x01] 1125 ldr ip, [r1, #0x03] 1126 ldrb r1, [r1, #0x07] 1127 strb r2, [r0] 1128 strh r3, [r0, #0x01] 1129 str ip, [r0, #0x03] 1130 strb r1, [r0, #0x07] |
1131 mov pc, lr | 1131 bx lr |
1132 LMEMCPY_8_PAD 1133 1134/* 1135 * 0110: dst is 8-bit aligned, src is 16-bit aligned 1136 */ 1137 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1138 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1139 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ --- 11 unchanged lines hidden (view full) --- 1151 strb ip, [r0, #0x07] /* 7 */ 1152 mov ip, r2, lsr #8 /* ip = ...1 */ 1153 orr ip, ip, r3, lsl #8 /* ip = 4321 */ 1154 mov r3, r3, lsr #8 /* r3 = .543 */ 1155 orr r3, r3, r1, lsl #24 /* r3 = 6543 */ 1156#endif 1157 strh ip, [r0, #0x01] 1158 str r3, [r0, #0x03] | 1132 LMEMCPY_8_PAD 1133 1134/* 1135 * 0110: dst is 8-bit aligned, src is 16-bit aligned 1136 */ 1137 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1138 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1139 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ --- 11 unchanged lines hidden (view full) --- 1151 strb ip, [r0, #0x07] /* 7 */ 1152 mov ip, r2, lsr #8 /* ip = ...1 */ 1153 orr ip, ip, r3, lsl #8 /* ip = 4321 */ 1154 mov r3, r3, lsr #8 /* r3 = .543 */ 1155 orr r3, r3, r1, lsl #24 /* r3 = 6543 */ 1156#endif 1157 strh ip, [r0, #0x01] 1158 str r3, [r0, #0x03] |
1159 mov pc, lr | 1159 bx lr |
1160 LMEMCPY_8_PAD 1161 1162/* 1163 * 0111: dst is 8-bit aligned, src is 8-bit aligned 1164 */ 1165 ldrb r3, [r1] /* r3 = ...0 */ 1166 ldr ip, [r1, #0x01] /* BE:ip = 1234 LE:ip = 4321 */ 1167 ldrh r2, [r1, #0x05] /* BE:r2 = ..56 LE:r2 = ..65 */ --- 4 unchanged lines hidden (view full) --- 1172 strh r3, [r0, #0x01] 1173 orr r2, r2, ip, lsl #16 /* r2 = 3456 */ 1174#else 1175 strh ip, [r0, #0x01] 1176 orr r2, r3, r2, lsl #16 /* r2 = 6543 */ 1177#endif 1178 str r2, [r0, #0x03] 1179 strb r1, [r0, #0x07] | 1160 LMEMCPY_8_PAD 1161 1162/* 1163 * 0111: dst is 8-bit aligned, src is 8-bit aligned 1164 */ 1165 ldrb r3, [r1] /* r3 = ...0 */ 1166 ldr ip, [r1, #0x01] /* BE:ip = 1234 LE:ip = 4321 */ 1167 ldrh r2, [r1, #0x05] /* BE:r2 = ..56 LE:r2 = ..65 */ --- 4 unchanged lines hidden (view full) --- 1172 strh r3, [r0, #0x01] 1173 orr r2, r2, ip, lsl #16 /* r2 = 3456 */ 1174#else 1175 strh ip, [r0, #0x01] 1176 orr r2, r3, r2, lsl #16 /* r2 = 6543 */ 1177#endif 1178 str r2, [r0, #0x03] 1179 strb r1, [r0, #0x07] |
1180 mov pc, lr | 1180 bx lr |
1181 LMEMCPY_8_PAD 1182 1183/* 1184 * 1000: dst is 16-bit aligned, src is 32-bit aligned 1185 */ 1186 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1187 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1188 mov r1, r2, lsr #16 /* BE:r1 = ..01 LE:r1 = ..32 */ 1189#ifdef __ARMEB__ 1190 strh r1, [r0] 1191 mov r1, r3, lsr #16 /* r1 = ..45 */ 1192 orr r2, r1 ,r2, lsl #16 /* r2 = 2345 */ 1193#else 1194 strh r2, [r0] 1195 orr r2, r1, r3, lsl #16 /* r2 = 5432 */ 1196 mov r3, r3, lsr #16 /* r3 = ..76 */ 1197#endif 1198 str r2, [r0, #0x02] 1199 strh r3, [r0, #0x06] | 1181 LMEMCPY_8_PAD 1182 1183/* 1184 * 1000: dst is 16-bit aligned, src is 32-bit aligned 1185 */ 1186 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1187 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1188 mov r1, r2, lsr #16 /* BE:r1 = ..01 LE:r1 = ..32 */ 1189#ifdef __ARMEB__ 1190 strh r1, [r0] 1191 mov r1, r3, lsr #16 /* r1 = ..45 */ 1192 orr r2, r1 ,r2, lsl #16 /* r2 = 2345 */ 1193#else 1194 strh r2, [r0] 1195 orr r2, r1, r3, lsl #16 /* r2 = 5432 */ 1196 mov r3, r3, lsr #16 /* r3 = ..76 */ 1197#endif 1198 str r2, [r0, #0x02] 1199 strh r3, [r0, #0x06] |
1200 mov pc, lr | 1200 bx lr |
1201 LMEMCPY_8_PAD 1202 1203/* 1204 * 1001: dst is 16-bit aligned, src is 8-bit aligned 1205 */ 1206 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 1207 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ 1208 ldrb ip, [r1, #0x07] /* ip = ...7 */ --- 6 unchanged lines hidden (view full) --- 1215#else 1216 mov r1, r2, lsr #24 /* r1 = ...2 */ 1217 orr r1, r1, r3, lsl #8 /* r1 = 5432 */ 1218 mov r3, r3, lsr #24 /* r3 = ...6 */ 1219 orr r3, r3, ip, lsl #8 /* r3 = ..76 */ 1220#endif 1221 str r1, [r0, #0x02] 1222 strh r3, [r0, #0x06] | 1201 LMEMCPY_8_PAD 1202 1203/* 1204 * 1001: dst is 16-bit aligned, src is 8-bit aligned 1205 */ 1206 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 1207 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ 1208 ldrb ip, [r1, #0x07] /* ip = ...7 */ --- 6 unchanged lines hidden (view full) --- 1215#else 1216 mov r1, r2, lsr #24 /* r1 = ...2 */ 1217 orr r1, r1, r3, lsl #8 /* r1 = 5432 */ 1218 mov r3, r3, lsr #24 /* r3 = ...6 */ 1219 orr r3, r3, ip, lsl #8 /* r3 = ..76 */ 1220#endif 1221 str r1, [r0, #0x02] 1222 strh r3, [r0, #0x06] |
1223 mov pc, lr | 1223 bx lr |
1224 LMEMCPY_8_PAD 1225 1226/* 1227 * 1010: dst is 16-bit aligned, src is 16-bit aligned 1228 */ 1229 ldrh r2, [r1] 1230 ldr ip, [r1, #0x02] 1231 ldrh r3, [r1, #0x06] 1232 strh r2, [r0] 1233 str ip, [r0, #0x02] 1234 strh r3, [r0, #0x06] | 1224 LMEMCPY_8_PAD 1225 1226/* 1227 * 1010: dst is 16-bit aligned, src is 16-bit aligned 1228 */ 1229 ldrh r2, [r1] 1230 ldr ip, [r1, #0x02] 1231 ldrh r3, [r1, #0x06] 1232 strh r2, [r0] 1233 str ip, [r0, #0x02] 1234 strh r3, [r0, #0x06] |
1235 mov pc, lr | 1235 bx lr |
1236 LMEMCPY_8_PAD 1237 1238/* 1239 * 1011: dst is 16-bit aligned, src is 8-bit aligned 1240 */ 1241 ldr r3, [r1, #0x05] /* BE:r3 = 567x LE:r3 = x765 */ 1242 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 1243 ldrb ip, [r1] /* ip = ...0 */ --- 6 unchanged lines hidden (view full) --- 1250 orr r2, r2, ip, lsl #8 /* r2 = ..01 */ 1251#else 1252 mov r3, r3, lsl #24 /* r3 = 5... */ 1253 orr r3, r3, r2, lsr #8 /* r3 = 5432 */ 1254 orr r2, ip, r2, lsl #8 /* r2 = 3210 */ 1255#endif 1256 str r3, [r0, #0x02] 1257 strh r2, [r0] | 1236 LMEMCPY_8_PAD 1237 1238/* 1239 * 1011: dst is 16-bit aligned, src is 8-bit aligned 1240 */ 1241 ldr r3, [r1, #0x05] /* BE:r3 = 567x LE:r3 = x765 */ 1242 ldr r2, [r1, #0x01] /* BE:r2 = 1234 LE:r2 = 4321 */ 1243 ldrb ip, [r1] /* ip = ...0 */ --- 6 unchanged lines hidden (view full) --- 1250 orr r2, r2, ip, lsl #8 /* r2 = ..01 */ 1251#else 1252 mov r3, r3, lsl #24 /* r3 = 5... */ 1253 orr r3, r3, r2, lsr #8 /* r3 = 5432 */ 1254 orr r2, ip, r2, lsl #8 /* r2 = 3210 */ 1255#endif 1256 str r3, [r0, #0x02] 1257 strh r2, [r0] |
1258 mov pc, lr | 1258 bx lr |
1259 LMEMCPY_8_PAD 1260 1261/* 1262 * 1100: dst is 8-bit aligned, src is 32-bit aligned 1263 */ 1264 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1265 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1266 mov r1, r3, lsr #8 /* BE:r1 = .456 LE:r1 = .765 */ --- 8 unchanged lines hidden (view full) --- 1275#else 1276 strb r2, [r0] 1277 mov r1, r3, lsr #24 /* r1 = ...7 */ 1278 strb r1, [r0, #0x07] 1279 mov r2, r2, lsr #8 /* r2 = .321 */ 1280 orr r2, r2, r3, lsl #24 /* r2 = 4321 */ 1281 str r2, [r0, #0x01] 1282#endif | 1259 LMEMCPY_8_PAD 1260 1261/* 1262 * 1100: dst is 8-bit aligned, src is 32-bit aligned 1263 */ 1264 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1265 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1266 mov r1, r3, lsr #8 /* BE:r1 = .456 LE:r1 = .765 */ --- 8 unchanged lines hidden (view full) --- 1275#else 1276 strb r2, [r0] 1277 mov r1, r3, lsr #24 /* r1 = ...7 */ 1278 strb r1, [r0, #0x07] 1279 mov r2, r2, lsr #8 /* r2 = .321 */ 1280 orr r2, r2, r3, lsl #24 /* r2 = 4321 */ 1281 str r2, [r0, #0x01] 1282#endif |
1283 mov pc, lr | 1283 bx lr |
1284 LMEMCPY_8_PAD 1285 1286/* 1287 * 1101: dst is 8-bit aligned, src is 8-bit aligned 1288 */ 1289 ldrb r3, [r1] /* r3 = ...0 */ 1290 ldrh r2, [r1, #0x01] /* BE:r2 = ..12 LE:r2 = ..21 */ 1291 ldr ip, [r1, #0x03] /* BE:ip = 3456 LE:ip = 6543 */ --- 4 unchanged lines hidden (view full) --- 1296 strh ip, [r0, #0x05] 1297 orr r2, r3, r2, lsl #16 /* r2 = 1234 */ 1298#else 1299 strh r3, [r0, #0x05] 1300 orr r2, r2, ip, lsl #16 /* r2 = 4321 */ 1301#endif 1302 str r2, [r0, #0x01] 1303 strb r1, [r0, #0x07] | 1284 LMEMCPY_8_PAD 1285 1286/* 1287 * 1101: dst is 8-bit aligned, src is 8-bit aligned 1288 */ 1289 ldrb r3, [r1] /* r3 = ...0 */ 1290 ldrh r2, [r1, #0x01] /* BE:r2 = ..12 LE:r2 = ..21 */ 1291 ldr ip, [r1, #0x03] /* BE:ip = 3456 LE:ip = 6543 */ --- 4 unchanged lines hidden (view full) --- 1296 strh ip, [r0, #0x05] 1297 orr r2, r3, r2, lsl #16 /* r2 = 1234 */ 1298#else 1299 strh r3, [r0, #0x05] 1300 orr r2, r2, ip, lsl #16 /* r2 = 4321 */ 1301#endif 1302 str r2, [r0, #0x01] 1303 strb r1, [r0, #0x07] |
1304 mov pc, lr | 1304 bx lr |
1305 LMEMCPY_8_PAD 1306 1307/* 1308 * 1110: dst is 8-bit aligned, src is 16-bit aligned 1309 */ 1310 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1311 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1312 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ --- 11 unchanged lines hidden (view full) --- 1324 orr ip, ip, r3, lsl #8 /* ip = 4321 */ 1325 mov r2, r1, lsr #8 /* r2 = ...7 */ 1326 strb r2, [r0, #0x07] 1327 mov r1, r1, lsl #8 /* r1 = .76. */ 1328 orr r1, r1, r3, lsr #24 /* r1 = .765 */ 1329#endif 1330 str ip, [r0, #0x01] 1331 strh r1, [r0, #0x05] | 1305 LMEMCPY_8_PAD 1306 1307/* 1308 * 1110: dst is 8-bit aligned, src is 16-bit aligned 1309 */ 1310 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1311 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1312 ldrh r1, [r1, #0x06] /* BE:r1 = ..67 LE:r1 = ..76 */ --- 11 unchanged lines hidden (view full) --- 1324 orr ip, ip, r3, lsl #8 /* ip = 4321 */ 1325 mov r2, r1, lsr #8 /* r2 = ...7 */ 1326 strb r2, [r0, #0x07] 1327 mov r1, r1, lsl #8 /* r1 = .76. */ 1328 orr r1, r1, r3, lsr #24 /* r1 = .765 */ 1329#endif 1330 str ip, [r0, #0x01] 1331 strh r1, [r0, #0x05] |
1332 mov pc, lr | 1332 bx lr |
1333 LMEMCPY_8_PAD 1334 1335/* 1336 * 1111: dst is 8-bit aligned, src is 8-bit aligned 1337 */ 1338 ldrb r2, [r1] 1339 ldr ip, [r1, #0x01] 1340 ldrh r3, [r1, #0x05] 1341 ldrb r1, [r1, #0x07] 1342 strb r2, [r0] 1343 str ip, [r0, #0x01] 1344 strh r3, [r0, #0x05] 1345 strb r1, [r0, #0x07] | 1333 LMEMCPY_8_PAD 1334 1335/* 1336 * 1111: dst is 8-bit aligned, src is 8-bit aligned 1337 */ 1338 ldrb r2, [r1] 1339 ldr ip, [r1, #0x01] 1340 ldrh r3, [r1, #0x05] 1341 ldrb r1, [r1, #0x07] 1342 strb r2, [r0] 1343 str ip, [r0, #0x01] 1344 strh r3, [r0, #0x05] 1345 strb r1, [r0, #0x07] |
1346 mov pc, lr | 1346 bx lr |
1347 LMEMCPY_8_PAD 1348 1349/****************************************************************************** 1350 * Special case for 12 byte copies 1351 */ 1352#define LMEMCPY_C_LOG2 7 /* 128 bytes */ 1353#define LMEMCPY_C_PAD .align LMEMCPY_C_LOG2 1354 LMEMCPY_C_PAD --- 8 unchanged lines hidden (view full) --- 1363 * 0000: dst is 32-bit aligned, src is 32-bit aligned 1364 */ 1365 ldr r2, [r1] 1366 ldr r3, [r1, #0x04] 1367 ldr r1, [r1, #0x08] 1368 str r2, [r0] 1369 str r3, [r0, #0x04] 1370 str r1, [r0, #0x08] | 1347 LMEMCPY_8_PAD 1348 1349/****************************************************************************** 1350 * Special case for 12 byte copies 1351 */ 1352#define LMEMCPY_C_LOG2 7 /* 128 bytes */ 1353#define LMEMCPY_C_PAD .align LMEMCPY_C_LOG2 1354 LMEMCPY_C_PAD --- 8 unchanged lines hidden (view full) --- 1363 * 0000: dst is 32-bit aligned, src is 32-bit aligned 1364 */ 1365 ldr r2, [r1] 1366 ldr r3, [r1, #0x04] 1367 ldr r1, [r1, #0x08] 1368 str r2, [r0] 1369 str r3, [r0, #0x04] 1370 str r1, [r0, #0x08] |
1371 mov pc, lr | 1371 bx lr |
1372 LMEMCPY_C_PAD 1373 1374/* 1375 * 0001: dst is 32-bit aligned, src is 8-bit aligned 1376 */ 1377 ldrb r2, [r1, #0xb] /* r2 = ...B */ 1378 ldr ip, [r1, #0x07] /* BE:ip = 789A LE:ip = A987 */ 1379 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ --- 11 unchanged lines hidden (view full) --- 1391 str r2, [r0, #0x08] 1392 mov r2, ip, lsl #24 /* r2 = 7... */ 1393 orr r2, r2, r3, lsr #8 /* r2 = 7654 */ 1394 mov r1, r1, lsr #8 /* r1 = .210 */ 1395 orr r1, r1, r3, lsl #24 /* r1 = 3210 */ 1396#endif 1397 str r2, [r0, #0x04] 1398 str r1, [r0] | 1372 LMEMCPY_C_PAD 1373 1374/* 1375 * 0001: dst is 32-bit aligned, src is 8-bit aligned 1376 */ 1377 ldrb r2, [r1, #0xb] /* r2 = ...B */ 1378 ldr ip, [r1, #0x07] /* BE:ip = 789A LE:ip = A987 */ 1379 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ --- 11 unchanged lines hidden (view full) --- 1391 str r2, [r0, #0x08] 1392 mov r2, ip, lsl #24 /* r2 = 7... */ 1393 orr r2, r2, r3, lsr #8 /* r2 = 7654 */ 1394 mov r1, r1, lsr #8 /* r1 = .210 */ 1395 orr r1, r1, r3, lsl #24 /* r1 = 3210 */ 1396#endif 1397 str r2, [r0, #0x04] 1398 str r1, [r0] |
1399 mov pc, lr | 1399 bx lr |
1400 LMEMCPY_C_PAD 1401 1402/* 1403 * 0010: dst is 32-bit aligned, src is 16-bit aligned 1404 */ 1405 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1406 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1407 ldr ip, [r1, #0x06] /* BE:ip = 6789 LE:ip = 9876 */ --- 10 unchanged lines hidden (view full) --- 1418 str r2, [r0] 1419 mov r3, r3, lsr #16 /* r3 = ..54 */ 1420 orr r3, r3, ip, lsl #16 /* r3 = 7654 */ 1421 mov r1, r1, lsl #16 /* r1 = BA.. */ 1422 orr r1, r1, ip, lsr #16 /* r1 = BA98 */ 1423#endif 1424 str r3, [r0, #0x04] 1425 str r1, [r0, #0x08] | 1400 LMEMCPY_C_PAD 1401 1402/* 1403 * 0010: dst is 32-bit aligned, src is 16-bit aligned 1404 */ 1405 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1406 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1407 ldr ip, [r1, #0x06] /* BE:ip = 6789 LE:ip = 9876 */ --- 10 unchanged lines hidden (view full) --- 1418 str r2, [r0] 1419 mov r3, r3, lsr #16 /* r3 = ..54 */ 1420 orr r3, r3, ip, lsl #16 /* r3 = 7654 */ 1421 mov r1, r1, lsl #16 /* r1 = BA.. */ 1422 orr r1, r1, ip, lsr #16 /* r1 = BA98 */ 1423#endif 1424 str r3, [r0, #0x04] 1425 str r1, [r0, #0x08] |
1426 mov pc, lr | 1426 bx lr |
1427 LMEMCPY_C_PAD 1428 1429/* 1430 * 0011: dst is 32-bit aligned, src is 8-bit aligned 1431 */ 1432 ldrb r2, [r1] /* r2 = ...0 */ 1433 ldr r3, [r1, #0x01] /* BE:r3 = 1234 LE:r3 = 4321 */ 1434 ldr ip, [r1, #0x05] /* BE:ip = 5678 LE:ip = 8765 */ --- 11 unchanged lines hidden (view full) --- 1446 str r2, [r0] 1447 mov r3, r3, lsr #24 /* r3 = ...4 */ 1448 orr r3, r3, ip, lsl #8 /* r3 = 7654 */ 1449 mov r1, r1, lsl #8 /* r1 = BA9. */ 1450 orr r1, r1, ip, lsr #24 /* r1 = BA98 */ 1451#endif 1452 str r3, [r0, #0x04] 1453 str r1, [r0, #0x08] | 1427 LMEMCPY_C_PAD 1428 1429/* 1430 * 0011: dst is 32-bit aligned, src is 8-bit aligned 1431 */ 1432 ldrb r2, [r1] /* r2 = ...0 */ 1433 ldr r3, [r1, #0x01] /* BE:r3 = 1234 LE:r3 = 4321 */ 1434 ldr ip, [r1, #0x05] /* BE:ip = 5678 LE:ip = 8765 */ --- 11 unchanged lines hidden (view full) --- 1446 str r2, [r0] 1447 mov r3, r3, lsr #24 /* r3 = ...4 */ 1448 orr r3, r3, ip, lsl #8 /* r3 = 7654 */ 1449 mov r1, r1, lsl #8 /* r1 = BA9. */ 1450 orr r1, r1, ip, lsr #24 /* r1 = BA98 */ 1451#endif 1452 str r3, [r0, #0x04] 1453 str r1, [r0, #0x08] |
1454 mov pc, lr | 1454 bx lr |
1455 LMEMCPY_C_PAD 1456 1457/* 1458 * 0100: dst is 8-bit aligned (byte 1), src is 32-bit aligned 1459 */ 1460 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1461 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1462 ldr ip, [r1, #0x08] /* BE:ip = 89AB LE:ip = BA98 */ --- 12 unchanged lines hidden (view full) --- 1475 orr r2, r1, r3, lsl #8 /* r1 = 6543 */ 1476 mov r1, r3, lsr #24 /* r1 = ...7 */ 1477 orr r1, r1, ip, lsl #8 /* r1 = A987 */ 1478 mov ip, ip, lsr #24 /* ip = ...B */ 1479#endif 1480 str r2, [r0, #0x03] 1481 str r1, [r0, #0x07] 1482 strb ip, [r0, #0x0b] | 1455 LMEMCPY_C_PAD 1456 1457/* 1458 * 0100: dst is 8-bit aligned (byte 1), src is 32-bit aligned 1459 */ 1460 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1461 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1462 ldr ip, [r1, #0x08] /* BE:ip = 89AB LE:ip = BA98 */ --- 12 unchanged lines hidden (view full) --- 1475 orr r2, r1, r3, lsl #8 /* r1 = 6543 */ 1476 mov r1, r3, lsr #24 /* r1 = ...7 */ 1477 orr r1, r1, ip, lsl #8 /* r1 = A987 */ 1478 mov ip, ip, lsr #24 /* ip = ...B */ 1479#endif 1480 str r2, [r0, #0x03] 1481 str r1, [r0, #0x07] 1482 strb ip, [r0, #0x0b] |
1483 mov pc, lr | 1483 bx lr |
1484 LMEMCPY_C_PAD 1485 1486/* 1487 * 0101: dst is 8-bit aligned (byte 1), src is 8-bit aligned (byte 1) 1488 */ 1489 ldrb r2, [r1] 1490 ldrh r3, [r1, #0x01] 1491 ldr ip, [r1, #0x03] 1492 strb r2, [r0] 1493 ldr r2, [r1, #0x07] 1494 ldrb r1, [r1, #0x0b] 1495 strh r3, [r0, #0x01] 1496 str ip, [r0, #0x03] 1497 str r2, [r0, #0x07] 1498 strb r1, [r0, #0x0b] | 1484 LMEMCPY_C_PAD 1485 1486/* 1487 * 0101: dst is 8-bit aligned (byte 1), src is 8-bit aligned (byte 1) 1488 */ 1489 ldrb r2, [r1] 1490 ldrh r3, [r1, #0x01] 1491 ldr ip, [r1, #0x03] 1492 strb r2, [r0] 1493 ldr r2, [r1, #0x07] 1494 ldrb r1, [r1, #0x0b] 1495 strh r3, [r0, #0x01] 1496 str ip, [r0, #0x03] 1497 str r2, [r0, #0x07] 1498 strb r1, [r0, #0x0b] |
1499 mov pc, lr | 1499 bx lr |
1500 LMEMCPY_C_PAD 1501 1502/* 1503 * 0110: dst is 8-bit aligned (byte 1), src is 16-bit aligned 1504 */ 1505 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1506 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1507 ldr ip, [r1, #0x06] /* BE:ip = 6789 LE:ip = 9876 */ --- 17 unchanged lines hidden (view full) --- 1525 orr r3, r2, ip, lsl #24 /* r3 = 6543 */ 1526 mov r2, ip, lsr #8 /* r2 = .987 */ 1527 orr r2, r2, r1, lsl #24 /* r2 = A987 */ 1528 mov r1, r1, lsr #8 /* r1 = ...B */ 1529#endif 1530 str r3, [r0, #0x03] 1531 str r2, [r0, #0x07] 1532 strb r1, [r0, #0x0b] | 1500 LMEMCPY_C_PAD 1501 1502/* 1503 * 0110: dst is 8-bit aligned (byte 1), src is 16-bit aligned 1504 */ 1505 ldrh r2, [r1] /* BE:r2 = ..01 LE:r2 = ..10 */ 1506 ldr r3, [r1, #0x02] /* BE:r3 = 2345 LE:r3 = 5432 */ 1507 ldr ip, [r1, #0x06] /* BE:ip = 6789 LE:ip = 9876 */ --- 17 unchanged lines hidden (view full) --- 1525 orr r3, r2, ip, lsl #24 /* r3 = 6543 */ 1526 mov r2, ip, lsr #8 /* r2 = .987 */ 1527 orr r2, r2, r1, lsl #24 /* r2 = A987 */ 1528 mov r1, r1, lsr #8 /* r1 = ...B */ 1529#endif 1530 str r3, [r0, #0x03] 1531 str r2, [r0, #0x07] 1532 strb r1, [r0, #0x0b] |
1533 mov pc, lr | 1533 bx lr |
1534 LMEMCPY_C_PAD 1535 1536/* 1537 * 0111: dst is 8-bit aligned (byte 1), src is 8-bit aligned (byte 3) 1538 */ 1539 ldrb r2, [r1] 1540 ldr r3, [r1, #0x01] /* BE:r3 = 1234 LE:r3 = 4321 */ 1541 ldr ip, [r1, #0x05] /* BE:ip = 5678 LE:ip = 8765 */ --- 13 unchanged lines hidden (view full) --- 1555 orr r3, r3, ip, lsl #16 /* r3 = 6543 */ 1556 mov ip, ip, lsr #16 /* ip = ..87 */ 1557 orr ip, ip, r1, lsl #16 /* ip = A987 */ 1558 mov r1, r1, lsr #16 /* r1 = ..xB */ 1559#endif 1560 str r3, [r0, #0x03] 1561 str ip, [r0, #0x07] 1562 strb r1, [r0, #0x0b] | 1534 LMEMCPY_C_PAD 1535 1536/* 1537 * 0111: dst is 8-bit aligned (byte 1), src is 8-bit aligned (byte 3) 1538 */ 1539 ldrb r2, [r1] 1540 ldr r3, [r1, #0x01] /* BE:r3 = 1234 LE:r3 = 4321 */ 1541 ldr ip, [r1, #0x05] /* BE:ip = 5678 LE:ip = 8765 */ --- 13 unchanged lines hidden (view full) --- 1555 orr r3, r3, ip, lsl #16 /* r3 = 6543 */ 1556 mov ip, ip, lsr #16 /* ip = ..87 */ 1557 orr ip, ip, r1, lsl #16 /* ip = A987 */ 1558 mov r1, r1, lsr #16 /* r1 = ..xB */ 1559#endif 1560 str r3, [r0, #0x03] 1561 str ip, [r0, #0x07] 1562 strb r1, [r0, #0x0b] |
1563 mov pc, lr | 1563 bx lr |
1564 LMEMCPY_C_PAD 1565 1566/* 1567 * 1000: dst is 16-bit aligned, src is 32-bit aligned 1568 */ 1569 ldr ip, [r1] /* BE:ip = 0123 LE:ip = 3210 */ 1570 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1571 ldr r2, [r1, #0x08] /* BE:r2 = 89AB LE:r2 = BA98 */ --- 9 unchanged lines hidden (view full) --- 1581 orr r1, r1, r3, lsl #16 /* r1 = 5432 */ 1582 mov r3, r3, lsr #16 /* r3 = ..76 */ 1583 orr r3, r3, r2, lsl #16 /* r3 = 9876 */ 1584 mov r2, r2, lsr #16 /* r2 = ..BA */ 1585#endif 1586 str r1, [r0, #0x02] 1587 str r3, [r0, #0x06] 1588 strh r2, [r0, #0x0a] | 1564 LMEMCPY_C_PAD 1565 1566/* 1567 * 1000: dst is 16-bit aligned, src is 32-bit aligned 1568 */ 1569 ldr ip, [r1] /* BE:ip = 0123 LE:ip = 3210 */ 1570 ldr r3, [r1, #0x04] /* BE:r3 = 4567 LE:r3 = 7654 */ 1571 ldr r2, [r1, #0x08] /* BE:r2 = 89AB LE:r2 = BA98 */ --- 9 unchanged lines hidden (view full) --- 1581 orr r1, r1, r3, lsl #16 /* r1 = 5432 */ 1582 mov r3, r3, lsr #16 /* r3 = ..76 */ 1583 orr r3, r3, r2, lsl #16 /* r3 = 9876 */ 1584 mov r2, r2, lsr #16 /* r2 = ..BA */ 1585#endif 1586 str r1, [r0, #0x02] 1587 str r3, [r0, #0x06] 1588 strh r2, [r0, #0x0a] |
1589 mov pc, lr | 1589 bx lr |
1590 LMEMCPY_C_PAD 1591 1592/* 1593 * 1001: dst is 16-bit aligned, src is 8-bit aligned (byte 1) 1594 */ 1595 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 1596 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ 1597 mov ip, r2, lsr #8 /* BE:ip = .x01 LE:ip = .210 */ --- 12 unchanged lines hidden (view full) --- 1610 mov r3, r3, lsr #24 /* r3 = ...6 */ 1611 orr r3, r3, ip, lsl #8 /* r3 = 9876 */ 1612 mov r1, r1, lsl #8 /* r1 = ..B. */ 1613 orr r1, r1, ip, lsr #24 /* r1 = ..BA */ 1614#endif 1615 str r2, [r0, #0x02] 1616 str r3, [r0, #0x06] 1617 strh r1, [r0, #0x0a] | 1590 LMEMCPY_C_PAD 1591 1592/* 1593 * 1001: dst is 16-bit aligned, src is 8-bit aligned (byte 1) 1594 */ 1595 ldr r2, [r1, #-1] /* BE:r2 = x012 LE:r2 = 210x */ 1596 ldr r3, [r1, #0x03] /* BE:r3 = 3456 LE:r3 = 6543 */ 1597 mov ip, r2, lsr #8 /* BE:ip = .x01 LE:ip = .210 */ --- 12 unchanged lines hidden (view full) --- 1610 mov r3, r3, lsr #24 /* r3 = ...6 */ 1611 orr r3, r3, ip, lsl #8 /* r3 = 9876 */ 1612 mov r1, r1, lsl #8 /* r1 = ..B. */ 1613 orr r1, r1, ip, lsr #24 /* r1 = ..BA */ 1614#endif 1615 str r2, [r0, #0x02] 1616 str r3, [r0, #0x06] 1617 strh r1, [r0, #0x0a] |
1618 mov pc, lr | 1618 bx lr |
1619 LMEMCPY_C_PAD 1620 1621/* 1622 * 1010: dst is 16-bit aligned, src is 16-bit aligned 1623 */ 1624 ldrh r2, [r1] 1625 ldr r3, [r1, #0x02] 1626 ldr ip, [r1, #0x06] 1627 ldrh r1, [r1, #0x0a] 1628 strh r2, [r0] 1629 str r3, [r0, #0x02] 1630 str ip, [r0, #0x06] 1631 strh r1, [r0, #0x0a] | 1619 LMEMCPY_C_PAD 1620 1621/* 1622 * 1010: dst is 16-bit aligned, src is 16-bit aligned 1623 */ 1624 ldrh r2, [r1] 1625 ldr r3, [r1, #0x02] 1626 ldr ip, [r1, #0x06] 1627 ldrh r1, [r1, #0x0a] 1628 strh r2, [r0] 1629 str r3, [r0, #0x02] 1630 str ip, [r0, #0x06] 1631 strh r1, [r0, #0x0a] |
1632 mov pc, lr | 1632 bx lr |
1633 LMEMCPY_C_PAD 1634 1635/* 1636 * 1011: dst is 16-bit aligned, src is 8-bit aligned (byte 3) 1637 */ 1638 ldr r2, [r1, #0x09] /* BE:r2 = 9ABx LE:r2 = xBA9 */ 1639 ldr r3, [r1, #0x05] /* BE:r3 = 5678 LE:r3 = 8765 */ 1640 mov ip, r2, lsr #8 /* BE:ip = .9AB LE:ip = .xBA */ --- 12 unchanged lines hidden (view full) --- 1653 orr r2, r2, r3, lsr #8 /* r2 = 9876 */ 1654 mov r3, r3, lsl #24 /* r3 = 5... */ 1655 orr r3, r3, ip, lsr #8 /* r3 = 5432 */ 1656 orr r1, r1, ip, lsl #8 /* r1 = 3210 */ 1657#endif 1658 str r2, [r0, #0x06] 1659 str r3, [r0, #0x02] 1660 strh r1, [r0] | 1633 LMEMCPY_C_PAD 1634 1635/* 1636 * 1011: dst is 16-bit aligned, src is 8-bit aligned (byte 3) 1637 */ 1638 ldr r2, [r1, #0x09] /* BE:r2 = 9ABx LE:r2 = xBA9 */ 1639 ldr r3, [r1, #0x05] /* BE:r3 = 5678 LE:r3 = 8765 */ 1640 mov ip, r2, lsr #8 /* BE:ip = .9AB LE:ip = .xBA */ --- 12 unchanged lines hidden (view full) --- 1653 orr r2, r2, r3, lsr #8 /* r2 = 9876 */ 1654 mov r3, r3, lsl #24 /* r3 = 5... */ 1655 orr r3, r3, ip, lsr #8 /* r3 = 5432 */ 1656 orr r1, r1, ip, lsl #8 /* r1 = 3210 */ 1657#endif 1658 str r2, [r0, #0x06] 1659 str r3, [r0, #0x02] 1660 strh r1, [r0] |
1661 mov pc, lr | 1661 bx lr |
1662 LMEMCPY_C_PAD 1663 1664/* 1665 * 1100: dst is 8-bit aligned (byte 3), src is 32-bit aligned 1666 */ 1667 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1668 ldr ip, [r1, #0x04] /* BE:ip = 4567 LE:ip = 7654 */ 1669 ldr r1, [r1, #0x08] /* BE:r1 = 89AB LE:r1 = BA98 */ --- 17 unchanged lines hidden (view full) --- 1687 mov r3, ip, lsr #8 /* r3 = .765 */ 1688 orr r3, r3, r1, lsl #24 /* r3 = 8765 */ 1689 str r3, [r0, #0x05] 1690 mov r1, r1, lsr #8 /* r1 = .BA9 */ 1691 strh r1, [r0, #0x09] 1692 mov r1, r1, lsr #16 /* r1 = ...B */ 1693 strb r1, [r0, #0x0b] 1694#endif | 1662 LMEMCPY_C_PAD 1663 1664/* 1665 * 1100: dst is 8-bit aligned (byte 3), src is 32-bit aligned 1666 */ 1667 ldr r2, [r1] /* BE:r2 = 0123 LE:r2 = 3210 */ 1668 ldr ip, [r1, #0x04] /* BE:ip = 4567 LE:ip = 7654 */ 1669 ldr r1, [r1, #0x08] /* BE:r1 = 89AB LE:r1 = BA98 */ --- 17 unchanged lines hidden (view full) --- 1687 mov r3, ip, lsr #8 /* r3 = .765 */ 1688 orr r3, r3, r1, lsl #24 /* r3 = 8765 */ 1689 str r3, [r0, #0x05] 1690 mov r1, r1, lsr #8 /* r1 = .BA9 */ 1691 strh r1, [r0, #0x09] 1692 mov r1, r1, lsr #16 /* r1 = ...B */ 1693 strb r1, [r0, #0x0b] 1694#endif |
1695 mov pc, lr | 1695 bx lr |
1696 LMEMCPY_C_PAD 1697 1698/* 1699 * 1101: dst is 8-bit aligned (byte 3), src is 8-bit aligned (byte 1) 1700 */ 1701 ldrb r2, [r1, #0x0b] /* r2 = ...B */ 1702 ldr r3, [r1, #0x07] /* BE:r3 = 789A LE:r3 = A987 */ 1703 ldr ip, [r1, #0x03] /* BE:ip = 3456 LE:ip = 6543 */ --- 13 unchanged lines hidden (view full) --- 1717 orr r3, r3, ip, lsr #16 /* r3 = 8765 */ 1718 mov ip, ip, lsl #16 /* ip = 43.. */ 1719 orr ip, ip, r1, lsr #16 /* ip = 4321 */ 1720 mov r1, r1, lsr #8 /* r1 = .210 */ 1721#endif 1722 str r3, [r0, #0x05] 1723 str ip, [r0, #0x01] 1724 strb r1, [r0] | 1696 LMEMCPY_C_PAD 1697 1698/* 1699 * 1101: dst is 8-bit aligned (byte 3), src is 8-bit aligned (byte 1) 1700 */ 1701 ldrb r2, [r1, #0x0b] /* r2 = ...B */ 1702 ldr r3, [r1, #0x07] /* BE:r3 = 789A LE:r3 = A987 */ 1703 ldr ip, [r1, #0x03] /* BE:ip = 3456 LE:ip = 6543 */ --- 13 unchanged lines hidden (view full) --- 1717 orr r3, r3, ip, lsr #16 /* r3 = 8765 */ 1718 mov ip, ip, lsl #16 /* ip = 43.. */ 1719 orr ip, ip, r1, lsr #16 /* ip = 4321 */ 1720 mov r1, r1, lsr #8 /* r1 = .210 */ 1721#endif 1722 str r3, [r0, #0x05] 1723 str ip, [r0, #0x01] 1724 strb r1, [r0] |
1725 mov pc, lr | 1725 bx lr |
1726 LMEMCPY_C_PAD 1727 1728/* 1729 * 1110: dst is 8-bit aligned (byte 3), src is 16-bit aligned 1730 */ 1731#ifdef __ARMEB__ 1732 ldrh r2, [r1, #0x0a] /* r2 = ..AB */ 1733 ldr ip, [r1, #0x06] /* ip = 6789 */ --- 24 unchanged lines hidden (view full) --- 1758 mov ip, ip, lsr #24 /* ip = ...9 */ 1759 orr ip, ip, r1, lsl #8 /* ip = .BA9 */ 1760 mov r1, r1, lsr #8 /* r1 = ...B */ 1761 str r2, [r0, #0x01] 1762 str r3, [r0, #0x05] 1763 strh ip, [r0, #0x09] 1764 strb r1, [r0, #0x0b] 1765#endif | 1726 LMEMCPY_C_PAD 1727 1728/* 1729 * 1110: dst is 8-bit aligned (byte 3), src is 16-bit aligned 1730 */ 1731#ifdef __ARMEB__ 1732 ldrh r2, [r1, #0x0a] /* r2 = ..AB */ 1733 ldr ip, [r1, #0x06] /* ip = 6789 */ --- 24 unchanged lines hidden (view full) --- 1758 mov ip, ip, lsr #24 /* ip = ...9 */ 1759 orr ip, ip, r1, lsl #8 /* ip = .BA9 */ 1760 mov r1, r1, lsr #8 /* r1 = ...B */ 1761 str r2, [r0, #0x01] 1762 str r3, [r0, #0x05] 1763 strh ip, [r0, #0x09] 1764 strb r1, [r0, #0x0b] 1765#endif |
1766 mov pc, lr | 1766 bx lr |
1767 LMEMCPY_C_PAD 1768 1769/* 1770 * 1111: dst is 8-bit aligned (byte 3), src is 8-bit aligned (byte 3) 1771 */ 1772 ldrb r2, [r1] 1773 ldr r3, [r1, #0x01] 1774 ldr ip, [r1, #0x05] 1775 strb r2, [r0] 1776 ldrh r2, [r1, #0x09] 1777 ldrb r1, [r1, #0x0b] 1778 str r3, [r0, #0x01] 1779 str ip, [r0, #0x05] 1780 strh r2, [r0, #0x09] 1781 strb r1, [r0, #0x0b] | 1767 LMEMCPY_C_PAD 1768 1769/* 1770 * 1111: dst is 8-bit aligned (byte 3), src is 8-bit aligned (byte 3) 1771 */ 1772 ldrb r2, [r1] 1773 ldr r3, [r1, #0x01] 1774 ldr ip, [r1, #0x05] 1775 strb r2, [r0] 1776 ldrh r2, [r1, #0x09] 1777 ldrb r1, [r1, #0x0b] 1778 str r3, [r0, #0x01] 1779 str ip, [r0, #0x05] 1780 strh r2, [r0, #0x09] 1781 strb r1, [r0, #0x0b] |
1782 mov pc, lr | 1782 bx lr |
1783#endif /* !_STANDALONE */ | 1783#endif /* !_STANDALONE */ |