Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146305799
D17167.id48076.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D17167.id48076.diff
View Options
Index: lib/libc/amd64/string/bcopy.S
===================================================================
--- lib/libc/amd64/string/bcopy.S
+++ lib/libc/amd64/string/bcopy.S
@@ -66,6 +66,9 @@
movsq
movq %rdx,%rcx
andq $7,%rcx /* any bytes left? */
+ jne 2f
+ ret
+2:
rep
movsb
ret
@@ -73,11 +76,13 @@
addq %rcx,%rdi /* copy backwards. */
addq %rcx,%rsi
std
- andq $7,%rcx /* any fractional bytes? */
decq %rdi
decq %rsi
+ andq $7,%rcx /* any fractional bytes? */
+ je 3f
rep
movsb
+3:
movq %rdx,%rcx /* copy remainder by words */
shrq $3,%rcx
subq $7,%rsi
Index: lib/libc/i386/string/bcopy.S
===================================================================
--- lib/libc/i386/string/bcopy.S
+++ lib/libc/i386/string/bcopy.S
@@ -72,6 +72,11 @@
movsl
movl %edx,%ecx
andl $3,%ecx /* any bytes left? */
+ jne 2f
+ popl %edi
+ popl %esi
+ ret
+2:
rep
movsb
popl %edi
@@ -82,11 +87,13 @@
addl %ecx,%esi
std
movl %ecx,%edx
- andl $3,%ecx /* any fractional bytes? */
decl %edi
decl %esi
+ andl $3,%ecx /* any fractional bytes? */
+ jne 3f
rep
movsb
+3:
movl %edx,%ecx /* copy remainder by words */
shrl $2,%ecx
subl $3,%esi
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 2, 2:27 PM (3 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29140041
Default Alt Text
D17167.id48076.diff (1 KB)
Attached To
Mode
D17167: Partially depessimize userspace memmove, memcpy and bcopy
Attached
Detach File
Event Timeline
Log In to Comment