]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseMemoryLibMmx/X64/SetMem.S
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseMemoryLibMmx / X64 / SetMem.S
CommitLineData
b1ff428c 1#\r
2# ConvertAsm.py: Automatically generated from SetMem.asm\r
3#\r
4#------------------------------------------------------------------------------\r
5#\r
085c3968
HT
6# Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.<BR>\r
7# This program and the accompanying materials\r
b1ff428c 8# are licensed and made available under the terms and conditions of the BSD License\r
9# which accompanies this distribution. The full text of the license may be found at\r
10# http://opensource.org/licenses/bsd-license.php\r
11#\r
12# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
13# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
14#\r
15# Module Name:\r
16#\r
17# SetMem.S\r
18#\r
19# Abstract:\r
20#\r
21# SetMem function\r
22#\r
23# Notes:\r
24#\r
25#------------------------------------------------------------------------------\r
26\r
27\r
28#------------------------------------------------------------------------------\r
29# VOID *\r
30# EFIAPI\r
31# InternalMemSetMem (\r
32# IN VOID *Buffer,\r
33# IN UINTN Count,\r
34# IN UINT8 Value\r
35# )\r
36#------------------------------------------------------------------------------\r
132f41f0 37ASM_GLOBAL ASM_PFX(InternalMemSetMem)\r
b1ff428c 38ASM_PFX(InternalMemSetMem):\r
1fef058f 39 push %rdi\r
40 movq %r8, %rax\r
41 movb %al, %ah\r
945f5f40 42 movd %rax, %mm0\r
1fef058f 43 movq %rcx, %r8\r
44 movq %r8, %rdi # rdi <- Buffer\r
45 movq %rdx, %rcx\r
46 andq $7, %rdx \r
47 shrq $3, %rcx\r
b1ff428c 48 jz L_SetBytes\r
1fef058f 49 .byte 0x0f, 0x70, 0x0C0, 0x00\r
b1ff428c 50L0:\r
1fef058f 51 movntq %mm0, (%rdi) \r
52 addq $8, %rdi\r
b1ff428c 53 loop L0\r
54 mfence\r
55L_SetBytes:\r
1fef058f 56 movl %edx, %ecx\r
57 rep stosb\r
58 movq %r8, %rax\r
59 pop %rdi\r
b1ff428c 60 ret\r
61\r