rpms/dietlibc/devel dietlibc-0.28-syscall.patch,NONE,1.1

Enrico Scholz (ensc) fedora-extras-commits at redhat.com
Sun May 1 11:05:25 UTC 2005


Author: ensc

Update of /cvs/extras/rpms/dietlibc/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14176

Added Files:
	dietlibc-0.28-syscall.patch 
Log Message:
initial checkin


dietlibc-0.28-syscall.patch:

--- NEW FILE dietlibc-0.28-syscall.patch ---
2005-05--1  Enrico Scholz  <enrico.scholz at informatik.tu-chemnitz.de>
	* libcompat/syscall.S: added Herbert Poetzl's syscall(2)
	  implementation for x86_64 and sparc* architectures (see
	  http://vserver.13thfloor.at/Experimental/delta-diet.diff)

diff -NurpP --minimal dietlibc-0.28/libcompat/syscall.S dietlibc-0.28.fixed/libcompat/syscall.S
--- dietlibc-0.28/libcompat/syscall.S	2004-03-28 10:13:43.000000000 +0200
+++ dietlibc-0.28.fixed/libcompat/syscall.S	2005-05-01 05:47:50.000000000 +0200
@@ -77,5 +77,65 @@ syscall:
 	cmp.eq p6,p0=-1,r10
 (p6)	br __error_unified_syscall
 	br.ret.sptk.few rp
+#elif (defined(__x86_64__))
+	mov %rdi, %rax
+	mov %rsi, %rdi
+	mov %rdx, %rsi
+	mov %rcx, %rdx
+	mov %r8, %r10
+	mov %r9, %r8
+	mov 0x8(%rsp), %r9
+	syscall
+	cmp $0xfffffffffffff001,%rax
+	jb .Lret
+#ifdef __DYN_LIB
+	mov %rax, %rdx
+	call __errno_location
+	mov %rdx, (%rax)
+#else
+	mov %rax, errno
+#endif
+	xor %rax, %rax
+	dec %rax
+.Lret:
+	retq
+#elif (defined(__sparc__) && defined(__arch64__))
+	mov  %o0, %g1
+	mov  %o1, %o0
+	mov  %o2, %o1
+	mov  %o3, %o2
+	mov  %o4, %o3
+	mov  %o5, %o4
+	ta  0x6d
+	bcc  .Lret
+#ifdef __DYN_LIB
+#else
+	neg  %o0
+	sethi  %hi(errno), %g1
+	or  %g1, %lo(errno), %g2
+	st  %o0, [%g2]
+#endif
+	mov  -1, %o0
+.Lret:
+	retl 
+#elif (defined(__sparc__))
+	mov  %o0, %g1
+	mov  %o1, %o0
+	mov  %o2, %o1
+	mov  %o3, %o2
+	mov  %o4, %o3
+	mov  %o5, %o4
+	t  0x10
+	bcc  .Lret
+#ifdef __DYN_LIB
+#else
+	neg  %o0
+	sethi  %hi(errno), %g1
+	or  %g1, %lo(errno), %g2
+	st  %o0, [%g2]
+#endif
+	mov  -1, %o0
+.Lret:
+	retl 
 #endif
 .size	syscall, . - syscall




More information about the fedora-extras-commits mailing list