Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Apr 2003 12:10:34 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 30039 for review
Message-ID:  <200304291910.h3TJAYCY076442@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=30039

Change 30039 by peter@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))



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200304291910.h3TJAYCY076442>