From: Kenn H. <ke...@us...> - 2001-02-05 00:07:51
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/lib In directory usw-pr-cvs1:/tmp/cvs-serv30022 Modified Files: Makefile Added Files: negdi.c string_user.c Log Message: Add temporary implementation of GCC __negdi2 primitive. Add skeletons for copy to/from user and str*_user functions --- NEW FILE --- /* * $Id: negdi.c,v 1.1 2001/02/05 00:08:02 kenn Exp $ * * Copyright (C) 2001, Kenn Humborg * * This is a temporary implementation of GCCs negdi2 primitive. * Once we get native support in the compiler, this will be * removed from here * */ long long __negdi2(long long x) { __asm__ volatile ( " xorl2 $-1, 4(%0) \n" /* complement high longword */ " mnegl (%0), (%0) \n" /* negate low longword */ " bneq 1f \n" /* no overflow */ " incl 4(%0) \n" /* inc high longword */ "1: " : : "r"(&x) : "r0"); return x; } --- NEW FILE --- /* * $Id: string_user.c,v 1.1 2001/02/05 00:08:02 kenn Exp $ * * Copyright (C) 2001, Kenn Humborg * * These functions are used to do string operations on user memory */ #include <linux/string.h> #include <linux/kernel.h> /* for panic() */ int __copy_tofrom_user(void *to, const void *from, unsigned long size) { panic("__copy_tofrom_user: not implemented"); } unsigned long __clear_user(void *addr, unsigned long size) { panic("__clear_user: not implemented"); } int __strncpy_from_user(char *dst, const char *src, long count) { panic("__strncpy_from_user: not implemented"); } extern long __strlen_user(const char *s) { panic("__strlen_user: not implemented"); } extern long __strnlen_user(const char *s, long n) { panic("__strnlen_user: not implemented"); } Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/lib/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Makefile 2001/01/29 01:00:20 1.3 +++ Makefile 2001/02/05 00:08:02 1.4 @@ -10,7 +10,7 @@ all: libio.a L_TARGET := libio.a -obj-y := string.o console.o +obj-y := string.o string_user.o console.o negdi.o include $(TOPDIR)/Rules.make |