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:
David Greenman 1994-06-06 15:08:51 +00:00
parent 3c256f5395
commit 667f0edb2b
3 changed files with 27 additions and 18 deletions

View File

@ -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

View File

@ -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

View File

@ -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