]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.S
add a error macro to prevent this file from included for now #error "UEFI 2.1 HII...
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibSse2 / Ia32 / SetMem64.S
CommitLineData
e1f414b6 1//\r
2// Include common header file for this module.\r
3//\r
4#include "CommonHeader.h"\r
5\r
6#------------------------------------------------------------------------------\r
7#\r
8# Copyright (c) 2006, Intel Corporation\r
9# All rights reserved. This program and the accompanying materials\r
10# are licensed and made available under the terms and conditions of the BSD License\r
11# which accompanies this distribution. The full text of the license may be found at\r
12# http://opensource.org/licenses/bsd-license.php\r
13#\r
14# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
15# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
16#\r
17# Module Name:\r
18#\r
19# SetMem64.S\r
20#\r
21# Abstract:\r
22#\r
23# SetMem64 function\r
24#\r
25# Notes:\r
26#\r
27#------------------------------------------------------------------------------\r
28\r
29.globl _InternalMemSetMem64\r
30\r
31#------------------------------------------------------------------------------\r
32# VOID *\r
33# EFIAPI\r
34# InternalMemSetMem64 (\r
35# IN VOID *Buffer,\r
36# IN UINTN Count,\r
37# IN UINT64 Value\r
38# );\r
39#------------------------------------------------------------------------------\r
40_InternalMemSetMem64:\r
41 movl 4(%esp), %eax\r
42 movl 8(%esp), %ecx\r
43 testb $8, %al\r
44 movl %eax, %edx\r
45 movq 0xc(%esp), %xmm0\r
46 jz L1\r
47 movq %xmm0, (%edx)\r
48 addl $8, %edx\r
49 decl %ecx\r
50L1:\r
51 shrl %ecx\r
52 jz L_SetQwords\r
53 movlhps %xmm0, %xmm0\r
54L2:\r
55 movntdq %xmm0, (%edx)\r
56 leal 16(%edx), %edx\r
57 loop L2\r
58 mfence\r
59L_SetQwords:\r
60 jnc L3\r
61 movq %xmm0, (%edx)\r
62L3:\r
63 ret\r