Gcc cleanup for baselib & basememorylib in mdepkg/library/
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5587 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemCompareMem
|
||||
.globl ASM_PFX(InternalMemCompareMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# INTN
|
||||
@@ -38,7 +38,7 @@
|
||||
# IN UINTN Length
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemCompareMem:
|
||||
ASM_PFX(InternalMemCompareMem):
|
||||
push %esi
|
||||
push %edi
|
||||
movl 12(%esp), %esi
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemCopyMem
|
||||
.globl ASM_PFX(InternalMemCopyMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -32,30 +32,30 @@
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemCopyMem:
|
||||
ASM_PFX(InternalMemCopyMem):
|
||||
push %esi
|
||||
push %edi
|
||||
movl 16(%esp), %esi # esi <- Source
|
||||
movl 12(%esp), %edi # edi <- Destination
|
||||
movl 20(%esp), %edx # edx <- Count
|
||||
cmpl %esi, %edi
|
||||
je L_CopyDone
|
||||
cmpl %esi, %edi
|
||||
je L_CopyDone
|
||||
cmpl $0, %edx
|
||||
je L_CopyDone
|
||||
je L_CopyDone
|
||||
leal -1(%esi, %edx), %eax # eax <- End of Source
|
||||
cmpl %esi, %edi
|
||||
jae L_CopyBytes
|
||||
cmpl %eax, %edi
|
||||
jb L_CopyBytes # Copy backward if overlapped
|
||||
movl %esi, %eax # esi <- End of Source
|
||||
cmpl %edi, %esi
|
||||
jae L_CopyBytes
|
||||
cmpl %edi, %eax
|
||||
jb L_CopyBytes # Copy backward if overlapped
|
||||
movl %eax, %esi # esi <- End of Source
|
||||
leal -1(%edi, %edx), %edi # edi <- End of Destination
|
||||
std
|
||||
L_CopyBytes:
|
||||
movl %ecx, %edx
|
||||
std
|
||||
L_CopyBytes:
|
||||
movl %edx, %ecx
|
||||
rep
|
||||
movsb # Copy bytes backward
|
||||
cld
|
||||
L_CopyDone:
|
||||
L_CopyDone:
|
||||
movl 12(%esp), %eax # eax <- Destination as return value
|
||||
pop %edi
|
||||
pop %esi
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemScanMem16
|
||||
.globl ASM_PFX(InternalMemScanMem16)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
@@ -38,7 +38,7 @@
|
||||
# IN UINT16 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemScanMem16:
|
||||
ASM_PFX(InternalMemScanMem16):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemScanMem32
|
||||
.globl ASM_PFX(InternalMemScanMem32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
@@ -38,7 +38,7 @@
|
||||
# IN UINT32 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemScanMem32:
|
||||
ASM_PFX(InternalMemScanMem32):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemScanMem64
|
||||
.globl ASM_PFX(InternalMemScanMem64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
@@ -38,7 +38,7 @@
|
||||
# IN UINT64 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemScanMem64:
|
||||
ASM_PFX(InternalMemScanMem64):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 16(%esp), %eax
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemScanMem8
|
||||
.globl ASM_PFX(InternalMemScanMem8)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# CONST VOID *
|
||||
@@ -38,7 +38,7 @@
|
||||
# IN UINT8 Value
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemScanMem8:
|
||||
ASM_PFX(InternalMemScanMem8):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 8(%esp), %edi
|
||||
|
@@ -21,10 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.386:
|
||||
.code:
|
||||
|
||||
.globl _InternalMemSetMem
|
||||
.globl ASM_PFX(InternalMemSetMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -34,22 +31,20 @@
|
||||
# IN UINT8 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemSetMem:
|
||||
ASM_PFX(InternalMemSetMem):
|
||||
push %edi
|
||||
movl 12(%esp),%ecx
|
||||
movb 16(%esp),%al
|
||||
movb %ah, %al
|
||||
movb %al, %ah
|
||||
shrd $16, %eax, %edx
|
||||
shld $16, %edx, %eax
|
||||
movl %edx, %ecx
|
||||
movl %ecx, %edx
|
||||
movl 8(%esp),%edi
|
||||
shrd $2, %ecx, %ecx
|
||||
rep
|
||||
|
||||
stosl
|
||||
movl %ecx, %edx
|
||||
andl $3, %ecx
|
||||
rep
|
||||
shr $2, %ecx
|
||||
rep stosl
|
||||
movl %edx, %ecx
|
||||
andl $3, %ecx
|
||||
rep stosb
|
||||
movl 8(%esp),%eax
|
||||
pop %edi
|
||||
ret
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemSetMem16
|
||||
.globl ASM_PFX(InternalMemSetMem16)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -31,7 +31,7 @@
|
||||
# IN UINT16 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemSetMem16:
|
||||
ASM_PFX(InternalMemSetMem16):
|
||||
push %edi
|
||||
movl 16(%esp), %eax
|
||||
movl 8(%esp), %edi
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemSetMem32
|
||||
.globl ASM_PFX(InternalMemSetMem32)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -31,7 +31,7 @@
|
||||
# IN UINT32 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemSetMem32:
|
||||
ASM_PFX(InternalMemSetMem32):
|
||||
push %edi
|
||||
movl 16(%esp),%eax
|
||||
movl 8(%esp),%edi
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemSetMem64
|
||||
.globl ASM_PFX(InternalMemSetMem64)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -31,7 +31,7 @@
|
||||
# IN UINT64 Value
|
||||
# )
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemSetMem64:
|
||||
ASM_PFX(InternalMemSetMem64):
|
||||
push %edi
|
||||
movl 12(%esp), %ecx
|
||||
movl 16(%esp), %eax
|
||||
|
@@ -21,7 +21,7 @@
|
||||
#
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
.globl _InternalMemZeroMem
|
||||
.globl ASM_PFX(InternalMemZeroMem)
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
# VOID *
|
||||
@@ -30,7 +30,7 @@
|
||||
# IN UINTN Count
|
||||
# );
|
||||
#------------------------------------------------------------------------------
|
||||
_InternalMemZeroMem:
|
||||
ASM_PFX(InternalMemZeroMem):
|
||||
push %edi
|
||||
xorl %eax,%eax
|
||||
movl 8(%esp),%edi
|
||||
|
Reference in New Issue
Block a user