summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authordg <dg@FreeBSD.org>1994-06-06 14:12:50 +0000
committerdg <dg@FreeBSD.org>1994-06-06 14:12:50 +0000
commit4807f9dfd94b3e1b6a810527158f968ee0fbb047 (patch)
treebb68887a56846e2cd981e7a4bb7c40db999ddf0d /sys
parent0d458db402acc7d2c34e8c125b4091c120cd32b2 (diff)
downloadFreeBSD-src-4807f9dfd94b3e1b6a810527158f968ee0fbb047.zip
FreeBSD-src-4807f9dfd94b3e1b6a810527158f968ee0fbb047.tar.gz
Added some missing cld's (OOPS!) and changed the position of some of
the others to make them easier to spot.
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/locore.S3
-rw-r--r--sys/amd64/amd64/locore.s3
-rw-r--r--sys/amd64/amd64/support.S30
-rw-r--r--sys/amd64/amd64/support.s30
-rw-r--r--sys/i386/i386/locore.s3
-rw-r--r--sys/i386/i386/support.s30
6 files changed, 36 insertions, 63 deletions
diff --git a/sys/amd64/amd64/locore.S b/sys/amd64/amd64/locore.S
index 7aa6e6b..538c690 100644
--- a/sys/amd64/amd64/locore.S
+++ b/sys/amd64/amd64/locore.S
@@ -163,6 +163,7 @@ NON_GPROF_ENTRY(btext)
movl _nfs_diskless_size-KERNBASE,%ecx
movl 20(%esp),%esi
movl $(_nfs_diskless-KERNBASE),%edi
+ cld
rep
movsb
#endif
@@ -367,6 +368,7 @@ NON_GPROF_ENTRY(btext)
movl $_gdt-KERNBASE,%edi
movl %edi,2(%esp)
movl $8*18/4,%ecx
+ cld
rep /* copy gdt */
movsl
movl $_gdt-KERNBASE,-8+2(%edi) /* adjust gdt self-ptr */
@@ -388,6 +390,7 @@ NON_GPROF_ENTRY(btext)
movl $_idt-KERNBASE,%edi
movl %edi,6+2(%esp)
movl $8*4/4,%ecx
+ cld
rep /* copy idt */
movsl
diff --git a/sys/amd64/amd64/locore.s b/sys/amd64/amd64/locore.s
index 7aa6e6b..538c690 100644
--- a/sys/amd64/amd64/locore.s
+++ b/sys/amd64/amd64/locore.s
@@ -163,6 +163,7 @@ NON_GPROF_ENTRY(btext)
movl _nfs_diskless_size-KERNBASE,%ecx
movl 20(%esp),%esi
movl $(_nfs_diskless-KERNBASE),%edi
+ cld
rep
movsb
#endif
@@ -367,6 +368,7 @@ NON_GPROF_ENTRY(btext)
movl $_gdt-KERNBASE,%edi
movl %edi,2(%esp)
movl $8*18/4,%ecx
+ cld
rep /* copy gdt */
movsl
movl $_gdt-KERNBASE,-8+2(%edi) /* adjust gdt self-ptr */
@@ -388,6 +390,7 @@ NON_GPROF_ENTRY(btext)
movl $_idt-KERNBASE,%edi
movl %edi,6+2(%esp)
movl $8*4/4,%ecx
+ cld
rep /* copy idt */
movsl
diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S
index 9634069..cc0885d 100644
--- a/sys/amd64/amd64/support.S
+++ b/sys/amd64/amd64/support.S
@@ -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
@@ -835,6 +835,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)
@@ -864,6 +865,7 @@ ENTRY(copyoutstr)
pushl %edx
pushl %edi
call _trapwrite
+ cld
popl %edi
popl %edx
orl %eax,%eax
@@ -949,7 +951,7 @@ ENTRY(copyinstr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -998,7 +1000,7 @@ ENTRY(copystr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -1097,15 +1099,6 @@ ENTRY(ssdtosd)
popl %ebx
ret
-#if 0
-/* tlbflush() */
-ENTRY(tlbflush)
- movl %cr3,%eax
- orl $I386_CR3PAT,%eax
- movl %eax,%cr3
- ret
-#endif
-
/* load_cr0(cr0) */
ENTRY(load_cr0)
movl 4(%esp),%eax
@@ -1117,11 +1110,6 @@ ENTRY(rcr0)
movl %cr0,%eax
ret
-/* rcr2() */
-ENTRY(rcr2)
- movl %cr2,%eax
- ret
-
/* rcr3() */
ENTRY(rcr3)
movl %cr3,%eax
diff --git a/sys/amd64/amd64/support.s b/sys/amd64/amd64/support.s
index 9634069..cc0885d 100644
--- a/sys/amd64/amd64/support.s
+++ b/sys/amd64/amd64/support.s
@@ -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
@@ -835,6 +835,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)
@@ -864,6 +865,7 @@ ENTRY(copyoutstr)
pushl %edx
pushl %edi
call _trapwrite
+ cld
popl %edi
popl %edx
orl %eax,%eax
@@ -949,7 +951,7 @@ ENTRY(copyinstr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -998,7 +1000,7 @@ ENTRY(copystr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -1097,15 +1099,6 @@ ENTRY(ssdtosd)
popl %ebx
ret
-#if 0
-/* tlbflush() */
-ENTRY(tlbflush)
- movl %cr3,%eax
- orl $I386_CR3PAT,%eax
- movl %eax,%cr3
- ret
-#endif
-
/* load_cr0(cr0) */
ENTRY(load_cr0)
movl 4(%esp),%eax
@@ -1117,11 +1110,6 @@ ENTRY(rcr0)
movl %cr0,%eax
ret
-/* rcr2() */
-ENTRY(rcr2)
- movl %cr2,%eax
- ret
-
/* rcr3() */
ENTRY(rcr3)
movl %cr3,%eax
diff --git a/sys/i386/i386/locore.s b/sys/i386/i386/locore.s
index 7aa6e6b..538c690 100644
--- a/sys/i386/i386/locore.s
+++ b/sys/i386/i386/locore.s
@@ -163,6 +163,7 @@ NON_GPROF_ENTRY(btext)
movl _nfs_diskless_size-KERNBASE,%ecx
movl 20(%esp),%esi
movl $(_nfs_diskless-KERNBASE),%edi
+ cld
rep
movsb
#endif
@@ -367,6 +368,7 @@ NON_GPROF_ENTRY(btext)
movl $_gdt-KERNBASE,%edi
movl %edi,2(%esp)
movl $8*18/4,%ecx
+ cld
rep /* copy gdt */
movsl
movl $_gdt-KERNBASE,-8+2(%edi) /* adjust gdt self-ptr */
@@ -388,6 +390,7 @@ NON_GPROF_ENTRY(btext)
movl $_idt-KERNBASE,%edi
movl %edi,6+2(%esp)
movl $8*4/4,%ecx
+ cld
rep /* copy idt */
movsl
diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s
index 9634069..cc0885d 100644
--- a/sys/i386/i386/support.s
+++ b/sys/i386/i386/support.s
@@ -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
@@ -835,6 +835,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)
@@ -864,6 +865,7 @@ ENTRY(copyoutstr)
pushl %edx
pushl %edi
call _trapwrite
+ cld
popl %edi
popl %edx
orl %eax,%eax
@@ -949,7 +951,7 @@ ENTRY(copyinstr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -998,7 +1000,7 @@ ENTRY(copystr)
movl 16(%esp),%edi /* %edi = to */
movl 20(%esp),%edx /* %edx = maxlen */
incl %edx
-
+ cld
1:
decl %edx
jz 4f
@@ -1097,15 +1099,6 @@ ENTRY(ssdtosd)
popl %ebx
ret
-#if 0
-/* tlbflush() */
-ENTRY(tlbflush)
- movl %cr3,%eax
- orl $I386_CR3PAT,%eax
- movl %eax,%cr3
- ret
-#endif
-
/* load_cr0(cr0) */
ENTRY(load_cr0)
movl 4(%esp),%eax
@@ -1117,11 +1110,6 @@ ENTRY(rcr0)
movl %cr0,%eax
ret
-/* rcr2() */
-ENTRY(rcr2)
- movl %cr2,%eax
- ret
-
/* rcr3() */
ENTRY(rcr3)
movl %cr3,%eax
OpenPOWER on IntegriCloud