PERFORCE change 29988 for review

Peter Wemm peter at FreeBSD.org
Mon Apr 28 15:59:48 PDT 2003


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

Change 29988 by peter at peter_daintree on 2003/04/28 15:59:08

	keep these in sync

Affected files ...

.. //depot/projects/hammer/lib/libc/amd64/sys/Ovfork.S#2 integrate
.. //depot/projects/hammer/lib/libc/amd64/sys/pipe.S#2 integrate

Differences ...

==== //depot/projects/hammer/lib/libc/amd64/sys/Ovfork.S#2 (text+ko) ====

@@ -47,11 +47,11 @@
 	.weak	vfork
 	.set	vfork,__sys_vfork
 ENTRY(__sys_vfork)
-	popq	%rcx		/* my rta into ecx */
+	popq	%rsi		/* fetch return address (%rsi preserved) */
 	mov	$SYS_vfork,%rax
 	KERNCALL
 	jb	1f
-	jmp	*%rcx
+	jmp	*%rsi
 1:
 	pushq	%rcx
 	jmp     PIC_PLT(HIDENAME(cerror))

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

@@ -42,9 +42,20 @@
 
 #include "SYS.h"
 
-SYSCALL(pipe)
-	movq	8(%rsp),%rcx	/* XXX wrong!! %rdi!! */
-	movq	%rax,(%rcx)
-	movq	%rdx,8(%rcx)
+	.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)
 	movq	$0,%rax
 	ret
+1:	
+	popq	%rdi
+	jmp	PIC_PLT(HIDENAME(cerror))


More information about the p4-projects mailing list