PERFORCE change 29902 for review
Peter Wemm
peter at FreeBSD.org
Sun Apr 27 15:54:41 PDT 2003
http://perforce.freebsd.org/chv.cgi?CH=29902
Change 29902 by peter at peter_daintree on 2003/04/27 15:54:18
make pipe(2) work with syscall for now. int 0x80 preserves all
registers except for the return values. syscall does not. This can
be simplified when I make the fast_syscall handler preserve some
scratch registers.
Affected files ...
.. //depot/projects/hammer/lib/libc/x86_64/sys/pipe.S#3 edit
Differences ...
==== //depot/projects/hammer/lib/libc/x86_64/sys/pipe.S#3 (text+ko) ====
@@ -42,9 +42,20 @@
#include "SYS.h"
-SYSCALL(pipe)
- movq 8(%rsp),%rcx /* XXX wrong!! %rdi!! */
+ .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
movq %rax,(%rcx)
movq %rdx,8(%rcx)
movq $0,%rax
ret
+1:
+ popq %rdi
+ jmp PIC_PLT(HIDENAME(cerror)
More information about the p4-projects
mailing list