1 ;------------------------------------------------------------------------------
3 ; SetMem() worker for ARM
5 ; This file started out as C code that did 64 bit moves if the buffer was
6 ; 32-bit aligned, else it does a byte copy. It also does a byte copy for
7 ; any trailing bytes. It was updated to do 32-byte at a time.
9 ; Copyright (c) 2008 - 2010, Apple Inc. All rights reserved.<BR>
10 ; This program and the accompanying materials
11 ; are licensed and made available under the terms and conditions of the BSD License
12 ; which accompanies this distribution. The full text of the license may be found at
13 ; http://opensource.org/licenses/bsd-license.php
15 ; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
16 ; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
20 Set Buffer to Value for Size bytes.
22 @param Buffer Memory to set.
23 @param Length Number of bytes to set
24 @param Value Value of the set operation.
37 \s\sEXPORT InternalMemSetMem
39 \s\sAREA AsmMemStuff, CODE, READONLY
42 \s\sstmfd\s\ssp!, {r4-r11, lr}
48 \s\sandhi\s\slr, r3, #1
57 orr r4, r4, r4, LSL #8
58 orr r4, r4, r4, LSL #16
70 \s\sstreqb\s\sr2, [r12], #1
71 \s\ssubeq\s\s r1, r1, #1
73 \s\ssub\s\s r1, r1, #32
76 \s\sstmia\s\s r12!, {r4-r11}
80 \s\sldmfd\s\s sp!, {r4-r11, pc}