1 ;------------------------------------------------------------------------------
3 ; Copyright (c) 2006, Intel Corporation
4 ; All rights reserved. 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 InternalMemSetMem PROC USES edi
38 mov ecx, [esp + 12] ; ecx <- Count
39 mov edi, [esp + 8] ; edi <- Buffer
41 shr ecx, 3 ; # of Qwords to set
42 mov al, [esp + 16] ; al <- Value
44 mov ah, al ; ax <- Value | (Value << 8)
47 movq [esp], mm0 ; save mm0
49 pshufw mm0, mm0, 0 ; fill mm0 with 8 Value's
55 movq mm0, [esp] ; restore mm0
56 pop ecx ; stack cleanup
62 mov eax, [esp + 8] ; eax <- Buffer as return value
64 InternalMemSetMem ENDP