Remove redundand CLD instructions.
We already clear %RFLAGS.DF on the kernel entry due to the compiler's ABI requirements. Suggested by: jhb Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
This commit is contained in:
parent
4975c202ac
commit
6da5c56ae5
@ -50,7 +50,6 @@ ENTRY(bzero)
|
|||||||
movq %rsi,%rcx
|
movq %rsi,%rcx
|
||||||
xorl %eax,%eax
|
xorl %eax,%eax
|
||||||
shrq $3,%rcx
|
shrq $3,%rcx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
stosq
|
stosq
|
||||||
movq %rsi,%rcx
|
movq %rsi,%rcx
|
||||||
@ -100,7 +99,6 @@ ENTRY(bcmp)
|
|||||||
PUSH_FRAME_POINTER
|
PUSH_FRAME_POINTER
|
||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
shrq $3,%rcx
|
shrq $3,%rcx
|
||||||
cld /* compare forwards */
|
|
||||||
repe
|
repe
|
||||||
cmpsq
|
cmpsq
|
||||||
jne 1f
|
jne 1f
|
||||||
@ -132,7 +130,6 @@ ENTRY(bcopy)
|
|||||||
jb 1f
|
jb 1f
|
||||||
|
|
||||||
shrq $3,%rcx /* copy by 64-bit words */
|
shrq $3,%rcx /* copy by 64-bit words */
|
||||||
cld /* nope, copy forwards */
|
|
||||||
rep
|
rep
|
||||||
movsq
|
movsq
|
||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
@ -171,7 +168,6 @@ ENTRY(memcpy)
|
|||||||
movq %rdi,%rax
|
movq %rdi,%rax
|
||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
shrq $3,%rcx /* copy by 64-bit words */
|
shrq $3,%rcx /* copy by 64-bit words */
|
||||||
cld /* copy forwards */
|
|
||||||
rep
|
rep
|
||||||
movsq
|
movsq
|
||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
@ -218,7 +214,6 @@ ENTRY(fillw)
|
|||||||
movq %rdi,%rax
|
movq %rdi,%rax
|
||||||
movq %rsi,%rdi
|
movq %rsi,%rdi
|
||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
stosw
|
stosw
|
||||||
POP_FRAME_POINTER
|
POP_FRAME_POINTER
|
||||||
@ -274,7 +269,6 @@ ENTRY(copyout)
|
|||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
|
|
||||||
shrq $3,%rcx
|
shrq $3,%rcx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
movsq
|
movsq
|
||||||
movb %dl,%cl
|
movb %dl,%cl
|
||||||
@ -323,7 +317,6 @@ ENTRY(copyin)
|
|||||||
movq %rdx,%rcx
|
movq %rdx,%rcx
|
||||||
movb %cl,%al
|
movb %cl,%al
|
||||||
shrq $3,%rcx /* copy longword-wise */
|
shrq $3,%rcx /* copy longword-wise */
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
movsq
|
movsq
|
||||||
movb %al,%cl
|
movb %al,%cl
|
||||||
@ -620,7 +613,6 @@ ENTRY(copyinstr)
|
|||||||
movq %rax,%r8
|
movq %rax,%r8
|
||||||
1:
|
1:
|
||||||
incq %rdx
|
incq %rdx
|
||||||
cld
|
|
||||||
|
|
||||||
2:
|
2:
|
||||||
decq %rdx
|
decq %rdx
|
||||||
@ -671,7 +663,6 @@ ENTRY(copystr)
|
|||||||
|
|
||||||
xchgq %rdi,%rsi
|
xchgq %rdi,%rsi
|
||||||
incq %rdx
|
incq %rdx
|
||||||
cld
|
|
||||||
1:
|
1:
|
||||||
decq %rdx
|
decq %rdx
|
||||||
jz 4f
|
jz 4f
|
||||||
|
@ -50,7 +50,6 @@ ENTRY(bzero)
|
|||||||
movl 12(%esp),%ecx
|
movl 12(%esp),%ecx
|
||||||
xorl %eax,%eax
|
xorl %eax,%eax
|
||||||
shrl $2,%ecx
|
shrl $2,%ecx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
stosl
|
stosl
|
||||||
movl 12(%esp),%ecx
|
movl 12(%esp),%ecx
|
||||||
@ -90,7 +89,6 @@ ENTRY(i686_pagezero)
|
|||||||
|
|
||||||
movl 12(%esp),%edi
|
movl 12(%esp),%edi
|
||||||
movl $1024,%ecx
|
movl $1024,%ecx
|
||||||
cld
|
|
||||||
|
|
||||||
ALIGN_TEXT
|
ALIGN_TEXT
|
||||||
1:
|
1:
|
||||||
@ -141,7 +139,6 @@ ENTRY(fillw)
|
|||||||
movl 8(%esp),%eax
|
movl 8(%esp),%eax
|
||||||
movl 12(%esp),%edi
|
movl 12(%esp),%edi
|
||||||
movl 16(%esp),%ecx
|
movl 16(%esp),%ecx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
stosw
|
stosw
|
||||||
popl %edi
|
popl %edi
|
||||||
@ -158,7 +155,6 @@ ENTRY(bcopyb)
|
|||||||
subl %esi,%eax
|
subl %esi,%eax
|
||||||
cmpl %ecx,%eax /* overlapping && src < dst? */
|
cmpl %ecx,%eax /* overlapping && src < dst? */
|
||||||
jb 1f
|
jb 1f
|
||||||
cld /* nope, copy forwards */
|
|
||||||
rep
|
rep
|
||||||
movsb
|
movsb
|
||||||
popl %edi
|
popl %edi
|
||||||
@ -199,7 +195,6 @@ ENTRY(bcopy)
|
|||||||
jb 1f
|
jb 1f
|
||||||
|
|
||||||
shrl $2,%ecx /* copy by 32-bit words */
|
shrl $2,%ecx /* copy by 32-bit words */
|
||||||
cld /* nope, copy forwards */
|
|
||||||
rep
|
rep
|
||||||
movsl
|
movsl
|
||||||
movl 16(%ebp),%ecx
|
movl 16(%ebp),%ecx
|
||||||
@ -245,7 +240,6 @@ ENTRY(memcpy)
|
|||||||
movl 20(%esp),%ecx
|
movl 20(%esp),%ecx
|
||||||
movl %edi,%eax
|
movl %edi,%eax
|
||||||
shrl $2,%ecx /* copy by 32-bit words */
|
shrl $2,%ecx /* copy by 32-bit words */
|
||||||
cld /* nope, copy forwards */
|
|
||||||
rep
|
rep
|
||||||
movsl
|
movsl
|
||||||
movl 20(%esp),%ecx
|
movl 20(%esp),%ecx
|
||||||
@ -314,7 +308,6 @@ ENTRY(copyout)
|
|||||||
movl %ebx,%ecx
|
movl %ebx,%ecx
|
||||||
|
|
||||||
shrl $2,%ecx
|
shrl $2,%ecx
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
movsl
|
movsl
|
||||||
movb %bl,%cl
|
movb %bl,%cl
|
||||||
@ -365,7 +358,6 @@ ENTRY(copyin)
|
|||||||
|
|
||||||
movb %cl,%al
|
movb %cl,%al
|
||||||
shrl $2,%ecx /* copy longword-wise */
|
shrl $2,%ecx /* copy longword-wise */
|
||||||
cld
|
|
||||||
rep
|
rep
|
||||||
movsl
|
movsl
|
||||||
movb %al,%cl
|
movb %al,%cl
|
||||||
@ -582,7 +574,6 @@ ENTRY(copyinstr)
|
|||||||
movl %eax,20(%esp)
|
movl %eax,20(%esp)
|
||||||
1:
|
1:
|
||||||
incl %edx
|
incl %edx
|
||||||
cld
|
|
||||||
|
|
||||||
2:
|
2:
|
||||||
decl %edx
|
decl %edx
|
||||||
@ -635,7 +626,6 @@ ENTRY(copystr)
|
|||||||
movl 16(%esp),%edi /* %edi = to */
|
movl 16(%esp),%edi /* %edi = to */
|
||||||
movl 20(%esp),%edx /* %edx = maxlen */
|
movl 20(%esp),%edx /* %edx = maxlen */
|
||||||
incl %edx
|
incl %edx
|
||||||
cld
|
|
||||||
1:
|
1:
|
||||||
decl %edx
|
decl %edx
|
||||||
jz 4f
|
jz 4f
|
||||||
@ -675,7 +665,6 @@ ENTRY(bcmp)
|
|||||||
|
|
||||||
movl %edx,%ecx
|
movl %edx,%ecx
|
||||||
shrl $2,%ecx
|
shrl $2,%ecx
|
||||||
cld /* compare forwards */
|
|
||||||
repe
|
repe
|
||||||
cmpsl
|
cmpsl
|
||||||
jne 1f
|
jne 1f
|
||||||
|
Loading…
x
Reference in New Issue
Block a user