]>
git.proxmox.com Git - mirror_edk2.git/blob - EdkCompatibilityPkg/Foundation/Library/EfiCommonLib/Ia32/EfiSetMemSSE2.c
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.
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
108 movdqa OWORD PTR ds
:[edi
], xmm1
109 movdqa OWORD PTR ds
:[edi
+16], xmm1
110 movdqa OWORD PTR ds
:[edi
+32], xmm1
111 movdqa OWORD PTR ds
:[edi
+48], xmm1
112 movdqa OWORD PTR ds
:[edi
+64], xmm1
113 movdqa OWORD PTR ds
:[edi
+80], xmm1
114 movdqa OWORD PTR ds
:[edi
+96], xmm1
115 movdqa OWORD PTR ds
:[edi
+112], xmm1
122 emms
; Exit MMX Instruction