1 #------------------------------------------------------------------------------
3 # Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.<BR>
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.
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.
22 #------------------------------------------------------------------------------
29 #------------------------------------------------------------------------------
36 #------------------------------------------------------------------------------
37 ASM_GLOBAL ASM_PFX(InternalMemSetMem)
38 ASM_PFX(InternalMemSetMem):
40 movl 12(%esp), %edx # edx <- Count
41 movl 8(%esp), %edi # edi <- Buffer
42 movb 16(%esp), %al # al <- Value
45 andl $15, %ecx # ecx + edi aligns on 16-byte boundary
55 shrl $4, %ecx # ecx <- # of DQwords to set
57 movb %al, %ah # ax <- Value | (Value << 8)
61 pshuflw $0, %xmm0, %xmm0
69 addl $16, %esp # stack cleanup
74 movl 8(%esp), %eax # eax <- Buffer as return value