mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Added some missing cld's (OOPS!) and changed the position of some of
the others to make them easier to spot.
This commit is contained in:
parent
3c256f5395
commit
667f0edb2b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=1691
@ -354,8 +354,8 @@ bcopyw:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $1,%ecx /* copy by 16-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsw
|
||||
adc %ecx,%ecx /* any bytes left? */
|
||||
@ -369,10 +369,10 @@ bcopyw:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $1,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 16-bit words */
|
||||
@ -408,8 +408,8 @@ bcopy:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $2,%ecx /* copy by 32-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsl
|
||||
movl 20(%esp),%ecx
|
||||
@ -424,10 +424,10 @@ bcopy:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $3,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 32-bit words */
|
||||
@ -577,9 +577,9 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */
|
||||
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
3:
|
||||
cld
|
||||
movl %ebx,%ecx
|
||||
shrl $2,%ecx
|
||||
cld
|
||||
rep
|
||||
movsl
|
||||
movb %bl,%cl
|
||||
@ -857,6 +857,7 @@ ENTRY(copyoutstr)
|
||||
movl 12(%esp),%esi /* %esi = from */
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
cld
|
||||
|
||||
#if defined(I386_CPU)
|
||||
|
||||
@ -886,6 +887,7 @@ ENTRY(copyoutstr)
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
call _trapwrite
|
||||
cld
|
||||
popl %edi
|
||||
popl %edx
|
||||
orl %eax,%eax
|
||||
@ -990,6 +992,7 @@ ENTRY(copyinstr)
|
||||
movl __udatasel,%eax
|
||||
movl %ax,%gs
|
||||
incl %edx
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 2f
|
||||
@ -1038,7 +1041,7 @@ ENTRY(copystr)
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
incl %edx
|
||||
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 4f
|
||||
|
@ -354,8 +354,8 @@ bcopyw:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $1,%ecx /* copy by 16-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsw
|
||||
adc %ecx,%ecx /* any bytes left? */
|
||||
@ -369,10 +369,10 @@ bcopyw:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $1,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 16-bit words */
|
||||
@ -408,8 +408,8 @@ bcopy:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $2,%ecx /* copy by 32-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsl
|
||||
movl 20(%esp),%ecx
|
||||
@ -424,10 +424,10 @@ bcopy:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $3,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 32-bit words */
|
||||
@ -577,9 +577,9 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */
|
||||
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
3:
|
||||
cld
|
||||
movl %ebx,%ecx
|
||||
shrl $2,%ecx
|
||||
cld
|
||||
rep
|
||||
movsl
|
||||
movb %bl,%cl
|
||||
@ -857,6 +857,7 @@ ENTRY(copyoutstr)
|
||||
movl 12(%esp),%esi /* %esi = from */
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
cld
|
||||
|
||||
#if defined(I386_CPU)
|
||||
|
||||
@ -886,6 +887,7 @@ ENTRY(copyoutstr)
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
call _trapwrite
|
||||
cld
|
||||
popl %edi
|
||||
popl %edx
|
||||
orl %eax,%eax
|
||||
@ -990,6 +992,7 @@ ENTRY(copyinstr)
|
||||
movl __udatasel,%eax
|
||||
movl %ax,%gs
|
||||
incl %edx
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 2f
|
||||
@ -1038,7 +1041,7 @@ ENTRY(copystr)
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
incl %edx
|
||||
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 4f
|
||||
|
@ -354,8 +354,8 @@ bcopyw:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $1,%ecx /* copy by 16-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsw
|
||||
adc %ecx,%ecx /* any bytes left? */
|
||||
@ -369,10 +369,10 @@ bcopyw:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $1,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 16-bit words */
|
||||
@ -408,8 +408,8 @@ bcopy:
|
||||
movl 20(%esp),%ecx
|
||||
cmpl %esi,%edi /* potentially overlapping? */
|
||||
jnb 1f
|
||||
cld /* nope, copy forwards */
|
||||
shrl $2,%ecx /* copy by 32-bit words */
|
||||
cld /* nope, copy forwards */
|
||||
rep
|
||||
movsl
|
||||
movl 20(%esp),%ecx
|
||||
@ -424,10 +424,10 @@ bcopy:
|
||||
1:
|
||||
addl %ecx,%edi /* copy backwards */
|
||||
addl %ecx,%esi
|
||||
std
|
||||
andl $3,%ecx /* any fractional bytes? */
|
||||
decl %edi
|
||||
decl %esi
|
||||
std
|
||||
rep
|
||||
movsb
|
||||
movl 20(%esp),%ecx /* copy remainder by 32-bit words */
|
||||
@ -577,9 +577,9 @@ ENTRY(copyout) /* copyout(from_kernel, to_user, len) */
|
||||
|
||||
/* bcopy(%esi, %edi, %ebx) */
|
||||
3:
|
||||
cld
|
||||
movl %ebx,%ecx
|
||||
shrl $2,%ecx
|
||||
cld
|
||||
rep
|
||||
movsl
|
||||
movb %bl,%cl
|
||||
@ -857,6 +857,7 @@ ENTRY(copyoutstr)
|
||||
movl 12(%esp),%esi /* %esi = from */
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
cld
|
||||
|
||||
#if defined(I386_CPU)
|
||||
|
||||
@ -886,6 +887,7 @@ ENTRY(copyoutstr)
|
||||
pushl %edx
|
||||
pushl %edi
|
||||
call _trapwrite
|
||||
cld
|
||||
popl %edi
|
||||
popl %edx
|
||||
orl %eax,%eax
|
||||
@ -990,6 +992,7 @@ ENTRY(copyinstr)
|
||||
movl __udatasel,%eax
|
||||
movl %ax,%gs
|
||||
incl %edx
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 2f
|
||||
@ -1038,7 +1041,7 @@ ENTRY(copystr)
|
||||
movl 16(%esp),%edi /* %edi = to */
|
||||
movl 20(%esp),%edx /* %edx = maxlen */
|
||||
incl %edx
|
||||
|
||||
cld
|
||||
1:
|
||||
decl %edx
|
||||
jz 4f
|
||||
|
Loading…
Reference in New Issue
Block a user