PERFORCE change 30039 for review

Peter Wemm peter at FreeBSD.org
Tue Apr 29 12:10:37 PDT 2003


http://perforce.freebsd.org/chv.cgi?CH=30039

Change 30039 by peter at peter_daintree on 2003/04/29 12:10:15

	take advantage of the kernel preserving %rdi across a syscall

Affected files ...

.. //depot/projects/hammer/lib/libc/x86_64/sys/pipe.S#6 edit

Differences ...

==== //depot/projects/hammer/lib/libc/x86_64/sys/pipe.S#6 (text+ko) ====

@@ -42,20 +42,8 @@
 
 #include "SYS.h"
 
-	.weak	_pipe
-	.set	_pipe,__sys_pipe
-	.weak	pipe
-	.set	pipe,__sys_pipe
-ENTRY(__sys_pipe)
-	pushq	%rdi
-	mov	$SYS_pipe,%rax
-	KERNCALL
-	jb	1f
-	popq	%rcx
-	movl	%eax,(%rcx)
-	movl	%edx,4(%rcx)
+SYSCALL(pipe)
+	movl	%eax,(%rdi)	/* %rdi is preserved by syscall */
+	movl	%edx,4(%rdi)
 	movq	$0,%rax
 	ret
-1:	
-	popq	%rdi
-	jmp	PIC_PLT(HIDENAME(cerror))


More information about the p4-projects mailing list