]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMem.c
3 Copyright (c) 2006, 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.
18 This is the code that supports IA32-optimized SetMem service
32 Input: VOID *Buffer - Pointer to buffer to write
33 UINTN Count - Number of bytes to write
34 UINT8 Value - Value to write
42 Description: This function is an optimized set-memory function.
44 Notes: This function tries to set memory 8 bytes at a time. As a result,
45 it first picks up any misaligned bytes, then words, before getting
46 in the main loop that does the 8-byte clears.
95 mov WORD PTR QWordValue
[0], bx
96 mov WORD PTR QWordValue
[2], bx
97 mov WORD PTR QWordValue
[4], bx
98 mov WORD PTR QWordValue
[6], bx
105 movq QWORD PTR ds
:[edi
], mm0
106 movq QWORD PTR ds
:[edi
+8], mm0
107 movq QWORD PTR ds
:[edi
+16], mm0
108 movq QWORD PTR ds
:[edi
+24], mm0
109 movq QWORD PTR ds
:[edi
+32], mm0
110 movq QWORD PTR ds
:[edi
+40], mm0
111 movq QWORD PTR ds
:[edi
+48], mm0
112 movq QWORD PTR ds
:[edi
+56], mm0
119 emms
; Exit MMX Instruction