[uClibc-cvs] uClibc/libc/sysdeps/linux/powerpc syscall.S,NONE,1.1 Makefile,1.19,1.20 _mmap.c,1.4,1.5

Erik Andersen andersen at uclibc.org
Sun Jun 15 01:08:48 UTC 2003


Update of /var/cvs/uClibc/libc/sysdeps/linux/powerpc
In directory winder:/tmp/cvs-serv16542/libc/sysdeps/linux/powerpc

Modified Files:
	Makefile _mmap.c 
Added Files:
	syscall.S 
Log Message:
Implement syscall() for powerpc.  Fixup syscall code so 
it compiles properly with gcc 3.3.
 -Erik


--- NEW FILE: syscall.S ---
/* Copyright (C) 1991, 1992, 1997, 1999 Free Software Foundation, Inc.
   This file is part of the GNU C Library.

   The GNU C Library is free software; you can redistribute it and/or
   modify it under the terms of the GNU Lesser General Public
   License as published by the Free Software Foundation; either
   version 2.1 of the License, or (at your option) any later version.

   The GNU C Library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   Lesser General Public License for more details.

   You should have received a copy of the GNU Lesser General Public
   License along with the GNU C Library; if not, write to the Free
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   02111-1307 USA.  */

#include <features.h>

	.section ".text"
	.globl	syscall;
	.type	syscall, at function;
	.align  2;

.globl syscall;
.type syscall, at function;
.align 2;

syscall:
	mr 0,3
	mr 3,4
	mr 4,5
	mr 5,6
	mr 6,7
	mr 7,8
	sc
	bnslr;
#ifdef __PIC__
	b __syscall_error at plt
#else
	b __syscall_error
#endif

.size syscall,.-syscall

Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/powerpc/Makefile,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- Makefile	6 Mar 2003 15:03:33 -0000	1.19
+++ Makefile	15 Jun 2003 01:08:44 -0000	1.20
@@ -24,7 +24,8 @@
 CRT0_OBJ = crt0.o crt1.o gcrt1.o
 CRT0_DEPS=gmon-start.S
 
-SSRC=__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S clone.S __uClibc_syscall.S
+SSRC=__longjmp.S setjmp.S bsd-setjmp.S bsd-_setjmp.S brk.S \
+	clone.S __uClibc_syscall.S syscall.S
 ifeq ($(strip $(UCLIBC_PROFILING)),y)
 SSRC+=mcount.S
 endif

Index: _mmap.c
===================================================================
RCS file: /var/cvs/uClibc/libc/sysdeps/linux/powerpc/_mmap.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- _mmap.c	15 Nov 2002 14:12:11 -0000	1.4
+++ _mmap.c	15 Jun 2003 01:08:44 -0000	1.5
@@ -5,7 +5,7 @@
 #include <sys/syscall.h>
 
 #define __syscall_clobbers \
-	"r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12"
+	"r9", "r10", "r11", "r12"
 #define __syscall_return(type) \
 	return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
 	       (type) __sc_ret



More information about the uClibc-cvs mailing list