diff options
author | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-12 09:23:28 +0000 |
---|---|---|
committer | bxing <bxing@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-12 09:23:28 +0000 |
commit | db8f40e294c3ab4a8079619da71b6e41dea8044a (patch) | |
tree | 4a79d8f4d7267c2b3de1a86fec7b5547049203ff /MdePkg/Library/BaseMemoryLibSse2 | |
parent | 7867eb23e85d12ee494bb0a70cfb34fe55a2671c (diff) | |
download | edk2-platforms-db8f40e294c3ab4a8079619da71b6e41dea8044a.tar.xz |
1. Added '#pragma pack' directive in BaseLib.h for the structure IA32_DESCRIPTOR
2. Updated SetMem64.asm's to remove any SSE3 instructions.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@901 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdePkg/Library/BaseMemoryLibSse2')
-rw-r--r-- | MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm | 28 | ||||
-rw-r--r-- | MdePkg/Library/BaseMemoryLibSse2/x64/SetMem64.asm | 28 |
2 files changed, 27 insertions, 29 deletions
diff --git a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm index 1ddc7ea191..c5d75c6f2b 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm +++ b/MdePkg/Library/BaseMemoryLibSse2/Ia32/SetMem64.asm @@ -28,34 +28,34 @@ ;------------------------------------------------------------------------------
; VOID *
-; _mem_SetMem64 (
+; InternalMemSetMem64 (
; IN VOID *Buffer,
; IN UINTN Count,
; IN UINT64 Value
; )
;------------------------------------------------------------------------------
-InternalMemSetMem64 PROC USES edi
- mov ecx, [esp + 12]
- mov edi, [esp + 8]
- test edi, 8
- DB 0f2h, 0fh, 12h, 44h, 24h, 16 ; movddup xmm0, [esp + 16]
+InternalMemSetMem64 PROC
+ mov eax, [esp + 4]
+ mov ecx, [esp + 8]
+ test al, 8
+ mov edx, eax
+ movq xmm0, [esp + 12]
jz @F
- movq [edi], xmm0
- add edi, 8
+ movq [edx], xmm0
+ add edx, 8
dec ecx
@@:
- mov edx, ecx
shr ecx, 1
jz @SetQwords
+ movlhps xmm0, xmm0
@@:
- movntdq [edi], xmm0
- add edi, 16
+ movntdq [edx], xmm0
+ lea edx, [edx + 16]
loop @B
mfence
@SetQwords:
- test dl, 1
- jz @F
- movq [edi], xmm0
+ jnc @F
+ movq [edx], xmm0
@@:
ret
InternalMemSetMem64 ENDP
diff --git a/MdePkg/Library/BaseMemoryLibSse2/x64/SetMem64.asm b/MdePkg/Library/BaseMemoryLibSse2/x64/SetMem64.asm index 8b33386ad0..ef94c562b5 100644 --- a/MdePkg/Library/BaseMemoryLibSse2/x64/SetMem64.asm +++ b/MdePkg/Library/BaseMemoryLibSse2/x64/SetMem64.asm @@ -25,35 +25,33 @@ ;------------------------------------------------------------------------------
; VOID *
-; _mem_SetMem64 (
+; InternalMemSetMem64 (
; IN VOID *Buffer,
; IN UINTN Count,
-; IN UINT8 Value
+; IN UINT64 Value
; )
;------------------------------------------------------------------------------
-InternalMemSetMem64 PROC USES rdi
- mov rdi, rcx
- mov r9, rcx
- test cl, 8
+InternalMemSetMem64 PROC
+ mov rax, rcx
+ test dl, 8
+ xchg rcx, rdx
jz @F
- mov [rdi], r8
- add rdi, 8
- dec rdx
+ mov [rdx], r8
+ add rdx, 8
+ dec rcx
@@:
- mov rcx, rdx
shr rcx, 1
jz @SetQwords
movd xmm0, r8
movlhps xmm0, xmm0
@@:
- movntdq [rdi], xmm0
- add rdi, 16
+ movntdq [rdx], xmm0
+ lea rdx, [rdx + 16]
loop @B
mfence
@SetQwords:
- test dl, 1
- jz @F
- mov [rdi], r8
+ jnc @F
+ mov [rdx], r8
@@:
ret
InternalMemSetMem64 ENDP
|