Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F152559031
D17281.id48380.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
839 B
Referenced Files
None
Subscribers
None
D17281.id48380.diff
View Options
Index: sys/amd64/amd64/support.S
===================================================================
--- sys/amd64/amd64/support.S
+++ sys/amd64/amd64/support.S
@@ -1023,34 +1023,33 @@
PUSH_FRAME_POINTER
movq %rdx,%r8 /* %r8 = maxlen */
- xchgq %rdi,%rsi
- incq %rdx
+ incq %rdx
1:
decq %rdx
jz 4f
- lodsb
- stosb
- orb %al,%al
+ movb (%rdi),%al
+ movb %al,(%rsi)
+ incq %rsi
+ incq %rdi
+ testb %al,%al
jnz 1b
/* Success -- 0 byte reached */
decq %rdx
xorl %eax,%eax
- jmp 6f
-4:
- /* rdx is zero -- return ENAMETOOLONG */
- movq $ENAMETOOLONG,%rax
-
-6:
-
+2:
testq %rcx,%rcx
- jz 7f
+ jz 3f
/* set *lencopied and return %rax */
subq %rdx,%r8
movq %r8,(%rcx)
-7:
+3:
POP_FRAME_POINTER
ret
+4:
+ /* rdx is zero -- return ENAMETOOLONG */
+ movl $ENAMETOOLONG,%eax
+ jmp 2b
END(copystr)
/*
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 16, 4:40 PM (2 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31614292
Default Alt Text
D17281.id48380.diff (839 B)
Attached To
Mode
D17281: amd64: mostly depessimize copystr
Attached
Detach File
Event Timeline
Log In to Comment