forked from KolibriOS/kolibrios
libc.obj:
- Formatted by clang-format (WebKit-style). - Removed unnecessary errno linux. - Added KOS error codes. - String functions have been replaced with more optimal ones for x86. - Changed wrappers for 70 sysfunction. git-svn-id: svn://kolibrios.org@9765 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
34
programs/develop/ktcc/trunk/libc.obj/source/string/memmove.s
Executable file
34
programs/develop/ktcc/trunk/libc.obj/source/string/memmove.s
Executable file
@@ -0,0 +1,34 @@
|
||||
/* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
|
||||
|
||||
.global memmove
|
||||
|
||||
memmove:
|
||||
pushl %ebp
|
||||
movl %esp,%ebp
|
||||
pushl %esi
|
||||
pushl %edi
|
||||
movl 8(%ebp),%edi
|
||||
movl 12(%ebp),%esi
|
||||
movl 16(%ebp),%ecx
|
||||
jecxz memmove.L2
|
||||
cld
|
||||
cmpl %esi,%edi
|
||||
jb memmove.L3
|
||||
|
||||
std
|
||||
addl %ecx,%esi
|
||||
addl %ecx,%edi
|
||||
decl %esi
|
||||
decl %edi
|
||||
memmove.L3:
|
||||
rep
|
||||
movsb
|
||||
|
||||
memmove.L2:
|
||||
cld
|
||||
popl %edi
|
||||
popl %esi
|
||||
movl 8(%ebp),%eax
|
||||
leave
|
||||
ret
|
||||
|
||||
Reference in New Issue
Block a user