]>
Commit | Line | Data |
---|---|---|
6e3b8c47 | 1 | #------------------------------------------------------------------------------ |
2 | # | |
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 | |
8 | # | |
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. | |
11 | # | |
12 | # Module Name: | |
13 | # | |
14 | # SetMem16.asm | |
15 | # | |
16 | # Abstract: | |
17 | # | |
18 | # SetMem16 function | |
19 | # | |
20 | # Notes: | |
21 | # | |
22 | #------------------------------------------------------------------------------ | |
23 | ||
b7089db1 | 24 | .globl _InternalMemSetMem16 |
6e3b8c47 | 25 | |
26 | #------------------------------------------------------------------------------ | |
27 | # VOID * | |
eb227e96 | 28 | # InternalMemSetMem16 ( |
6e3b8c47 | 29 | # IN VOID *Buffer, |
30 | # IN UINTN Count, | |
31 | # IN UINT16 Value | |
32 | # ) | |
33 | #------------------------------------------------------------------------------ | |
6e3b8c47 | 34 | _InternalMemSetMem16: |
35 | push %edi | |
eb227e96 | 36 | movl 16(%esp), %eax |
37 | shrdl $16, %eax, %edx | |
38 | shldl $16, %edx, %eax | |
6e3b8c47 | 39 | movl 12(%esp), %edx |
40 | movl 8(%esp), %edi | |
41 | movl %edx, %ecx | |
42 | andl $3, %edx | |
43 | shrl $2, %ecx | |
eb227e96 | 44 | jz L1 |
6e3b8c47 | 45 | movd %eax, %mm0 |
eb227e96 | 46 | movd %eax, %mm1 |
47 | psllq $32, %mm0 | |
48 | por %mm1, %mm0 | |
49 | L0: | |
50 | movq %mm0, (%edi) | |
6e3b8c47 | 51 | addl $8, %edi |
eb227e96 | 52 | loopl L0 |
53 | L1: | |
6e3b8c47 | 54 | movl %edx, %ecx |
55 | rep | |
56 | stosw | |
57 | movl 8(%esp), %eax | |
58 | pop %edi | |
59 | ret |