1/* 2 * Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR> 3 * 4 * This program and the accompanying materials 5 * are licensed and made available under the terms and conditions of the BSD License 6 * which accompanies this distribution. The full text of the license may be found at 7 * http://opensource.org/licenses/bsd-license.php 8 * 9 * THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, 10 * WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. 11 */ 12 13#include <arm/asm_help.h> 14 15EnterARM(memcpy4) 16EnterARM(_aeabi_memcpy4) 17 stmdb sp!, {r4, lr} 18 subs r2, r2, #32 /* 0x20 */ 19 bcc memcpy4_label2 20memcpy4_label1: 21 ldmiacs r1!, {r3, r4, ip, lr} 22 stmiacs r0!, {r3, r4, ip, lr} 23 ldmiacs r1!, {r3, r4, ip, lr} 24 stmiacs r0!, {r3, r4, ip, lr} 25 subscs r2, r2, #32 /* 0x20 */ 26 bcs memcpy4_label1 27memcpy4_label2: 28 movs ip, r2, lsl #28 29 ldmiacs r1!, {r3, r4, ip, lr} 30 stmiacs r0!, {r3, r4, ip, lr} 31 ldmiami r1!, {r3, r4} 32 stmiami r0!, {r3, r4} 33 ldmia sp!, {r4, lr} 34 movs ip, r2, lsl #30 35 ldrcs r3, [r1], #4 36 strcs r3, [r0], #4 37 bxeq lr 38_memcpy4_lastbytes_aligned: 39 movs r2, r2, lsl #31 40 ldrhcs r3, [r1], #2 41 ldrbmi r2, [r1], #1 42 strhcs r3, [r0], #2 43 strbmi r2, [r0], #1 44 bx lr 45