]>
Commit | Line | Data |
---|---|---|
1 | #\r | |
2 | # ConvertAsm.py: Automatically generated from SetMem.asm\r | |
3 | #\r | |
4 | #------------------------------------------------------------------------------\r | |
5 | #\r | |
6 | # Copyright (c) 2006 - 2008, Intel Corporation\r | |
7 | # All rights reserved. This program and the accompanying materials\r | |
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 | |
37 | .intel_syntax noprefix\r | |
38 | ASM_GLOBAL ASM_PFX(InternalMemSetMem)\r | |
39 | ASM_PFX(InternalMemSetMem):\r | |
40 | push rdi\r | |
41 | mov rax, r8 # rax = Value\r | |
42 | mov rdi, rcx # rdi = Buffer\r | |
43 | xchg rcx, rdx # rcx = Count, rdx = Buffer\r | |
44 | rep stosb\r | |
45 | mov rax, rdx # rax = Buffer\r | |
46 | pop rdi\r | |
47 | ret\r | |
48 | \r |