]>
Commit | Line | Data |
---|---|---|
b1ff428c | 1 | #\r |
2 | # ConvertAsm.py: Automatically generated from SetMem32.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 | # SetMem32.S\r | |
18 | #\r | |
19 | # Abstract:\r | |
20 | #\r | |
21 | # SetMem32 function\r | |
22 | #\r | |
23 | # Notes:\r | |
24 | #\r | |
25 | #------------------------------------------------------------------------------\r | |
26 | \r | |
27 | \r | |
28 | #------------------------------------------------------------------------------\r | |
29 | # VOID *\r | |
30 | # EFIAPI\r | |
31 | # InternalMemSetMem32 (\r | |
32 | # IN VOID *Buffer,\r | |
33 | # IN UINTN Count,\r | |
34 | # IN UINT32 Value\r | |
35 | # );\r | |
36 | #------------------------------------------------------------------------------\r | |
132f41f0 | 37 | ASM_GLOBAL ASM_PFX(InternalMemSetMem32)\r |
b1ff428c | 38 | ASM_PFX(InternalMemSetMem32):\r |
945f5f40 | 39 | movd %r8, %mm0 # mm0 <- Value\r |
1fef058f | 40 | movq %rcx, %rax # rax <- Buffer\r |
41 | xchgq %rdx, %rcx # rcx <- Count rdx <- Buffer\r | |
42 | shrq $1, % rcx # rcx <- # of qwords to set\r | |
b1ff428c | 43 | jz L_SetDwords\r |
1fef058f | 44 | .byte 0x0f, 0x70, 0x0C0, 0x44\r |
b1ff428c | 45 | L0:\r |
1fef058f | 46 | movntq %mm0, (%rdx) \r |
47 | leaq 8(%rdx), %rdx # use "lea" to avoid flag changes\r | |
b1ff428c | 48 | loop L0\r |
49 | mfence\r | |
50 | L_SetDwords:\r | |
51 | jnc L1\r | |
1fef058f | 52 | movd %mm0, (%rdx) \r |
b1ff428c | 53 | L1:\r |
54 | ret\r | |
55 | \r |