source:
freewrt/target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch@
a3abab6
| Last change on this file since a3abab6 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 11.3 KB | |
-
arch/mips/kernel/mips_ksyms.c
diff -Nur linux.old/arch/mips/kernel/mips_ksyms.c linux.dev/arch/mips/kernel/mips_ksyms.c
old new 30 30 #include <asm/floppy.h> 31 31 #endif 32 32 33 asmlinkage long long __ashldi3 (long long, int); 34 asmlinkage long long __ashrdi3 (long long, int); 35 asmlinkage long long __lshrdi3 (long long, int); 36 asmlinkage long long __muldi3 (long long, long long); 33 37 extern void *__bzero(void *__s, size_t __count); 34 38 extern long __strncpy_from_user_nocheck_asm(char *__to, 35 39 const char *__from, long __len); … … 78 82 EXPORT_SYMBOL_NOVERS(__strnlen_user_asm); 79 83 80 84 85 /* Compiler stuff */ 86 EXPORT_SYMBOL_NOVERS(__ashldi3); 87 EXPORT_SYMBOL_NOVERS(__ashrdi3); 88 EXPORT_SYMBOL_NOVERS(__lshrdi3); 89 EXPORT_SYMBOL_NOVERS(__muldi3); 90 91 81 92 /* Networking helper routines. */ 82 93 EXPORT_SYMBOL(csum_partial_copy); 83 94 -
arch/mips/lib/Makefile
diff -Nur linux.old/arch/mips/lib/Makefile linux.dev/arch/mips/lib/Makefile
old new 9 9 obj-y += csum_partial.o csum_partial_copy.o \ 10 10 promlib.o rtc-std.o rtc-no.o memcpy.o \ 11 11 memset.o watch.o strlen_user.o \ 12 strncpy_user.o strnlen_user.o 12 strncpy_user.o strnlen_user.o \ 13 ashldi3.o ashrdi3.o lshrdi3.o muldi3.o 13 14 14 15 export-objs := rtc-std.o rtc-no.o 15 16 -
arch/mips/lib/ashldi3.c
diff -Nur linux.old/arch/mips/lib/ashldi3.c linux.dev/arch/mips/lib/ashldi3.c
old new 1 /* ashrdi3.c extracted from gcc-2.95.2/libgcc2.c which is: */ 2 /* Copyright (C) 1989, 92-98, 1999 Free Software Foundation, Inc. 3 4 This file is part of GNU CC. 5 6 GNU CC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU CC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU CC; see the file COPYING. If not, write to 18 the Free Software Foundation, 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 #define BITS_PER_UNIT 8 22 23 typedef int SItype __attribute__ ((mode (SI))); 24 typedef unsigned int USItype __attribute__ ((mode (SI))); 25 typedef int DItype __attribute__ ((mode (DI))); 26 typedef int word_type __attribute__ ((mode (__word__))); 27 28 struct DIstruct {SItype high, low;}; 29 30 typedef union 31 { 32 struct DIstruct s; 33 DItype ll; 34 } DIunion; 35 36 DItype 37 __ashldi3 (DItype u, word_type b) 38 { 39 DIunion w; 40 word_type bm; 41 DIunion uu; 42 43 if (b == 0) 44 return u; 45 46 uu.ll = u; 47 48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b; 49 if (bm <= 0) 50 { 51 w.s.low = 0; 52 w.s.high = (USItype)uu.s.low << -bm; 53 } 54 else 55 { 56 USItype carries = (USItype)uu.s.low >> bm; 57 w.s.low = (USItype)uu.s.low << b; 58 w.s.high = ((USItype)uu.s.high << b) | carries; 59 } 60 61 return w.ll; 62 } -
arch/mips/lib/ashrdi3.c
diff -Nur linux.old/arch/mips/lib/ashrdi3.c linux.dev/arch/mips/lib/ashrdi3.c
old new 1 /* ashrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */ 2 /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. 3 4 This file is part of GNU CC. 5 6 GNU CC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU CC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU CC; see the file COPYING. If not, write to 18 the Free Software Foundation, 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 #define BITS_PER_UNIT 8 22 23 typedef int SItype __attribute__ ((mode (SI))); 24 typedef unsigned int USItype __attribute__ ((mode (SI))); 25 typedef int DItype __attribute__ ((mode (DI))); 26 typedef int word_type __attribute__ ((mode (__word__))); 27 28 struct DIstruct {SItype high, low;}; 29 30 typedef union 31 { 32 struct DIstruct s; 33 DItype ll; 34 } DIunion; 35 36 DItype 37 __ashrdi3 (DItype u, word_type b) 38 { 39 DIunion w; 40 word_type bm; 41 DIunion uu; 42 43 if (b == 0) 44 return u; 45 46 uu.ll = u; 47 48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b; 49 if (bm <= 0) 50 { 51 /* w.s.high = 1..1 or 0..0 */ 52 w.s.high = uu.s.high >> (sizeof (SItype) * BITS_PER_UNIT - 1); 53 w.s.low = uu.s.high >> -bm; 54 } 55 else 56 { 57 USItype carries = (USItype)uu.s.high << bm; 58 w.s.high = uu.s.high >> b; 59 w.s.low = ((USItype)uu.s.low >> b) | carries; 60 } 61 62 return w.ll; 63 } -
arch/mips/lib/lshrdi3.c
diff -Nur linux.old/arch/mips/lib/lshrdi3.c linux.dev/arch/mips/lib/lshrdi3.c
old new 1 /* lshrdi3.c extracted from gcc-2.7.2/libgcc2.c which is: */ 2 /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. 3 4 This file is part of GNU CC. 5 6 GNU CC is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 11 GNU CC is distributed in the hope that it will be useful, 12 but WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 GNU General Public License for more details. 15 16 You should have received a copy of the GNU General Public License 17 along with GNU CC; see the file COPYING. If not, write to 18 the Free Software Foundation, 59 Temple Place - Suite 330, 19 Boston, MA 02111-1307, USA. */ 20 21 #define BITS_PER_UNIT 8 22 23 typedef int SItype __attribute__ ((mode (SI))); 24 typedef unsigned int USItype __attribute__ ((mode (SI))); 25 typedef int DItype __attribute__ ((mode (DI))); 26 typedef int word_type __attribute__ ((mode (__word__))); 27 28 struct DIstruct {SItype high, low;}; 29 30 typedef union 31 { 32 struct DIstruct s; 33 DItype ll; 34 } DIunion; 35 36 DItype 37 __lshrdi3 (DItype u, word_type b) 38 { 39 DIunion w; 40 word_type bm; 41 DIunion uu; 42 43 if (b == 0) 44 return u; 45 46 uu.ll = u; 47 48 bm = (sizeof (SItype) * BITS_PER_UNIT) - b; 49 if (bm <= 0) 50 { 51 w.s.high = 0; 52 w.s.low = (USItype)uu.s.high >> -bm; 53 } 54 else 55 { 56 USItype carries = (USItype)uu.s.high << bm; 57 w.s.high = (USItype)uu.s.high >> b; 58 w.s.low = ((USItype)uu.s.low >> b) | carries; 59 } 60 61 return w.ll; 62 } -
arch/mips/lib/muldi3.c
diff -Nur linux.old/arch/mips/lib/muldi3.c linux.dev/arch/mips/lib/muldi3.c
old new 1 /* muldi3.c extracted from gcc-2.7.2.3/libgcc2.c and 2 gcc-2.7.2.3/longlong.h which is: */ 3 /* Copyright (C) 1989, 1992, 1993, 1994, 1995 Free Software Foundation, Inc. 4 5 This file is part of GNU CC. 6 7 GNU CC is free software; you can redistribute it and/or modify 8 it under the terms of the GNU General Public License as published by 9 the Free Software Foundation; either version 2, or (at your option) 10 any later version. 11 12 GNU CC is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 GNU General Public License for more details. 16 17 You should have received a copy of the GNU General Public License 18 along with GNU CC; see the file COPYING. If not, write to 19 the Free Software Foundation, 59 Temple Place - Suite 330, 20 Boston, MA 02111-1307, USA. */ 21 22 #define BITS_PER_UNIT 8 23 24 #define umul_ppmm(w1, w0, u, v) \ 25 __asm__ ("multu %2,%3" \ 26 : "=l" ((USItype)(w0)), \ 27 "=h" ((USItype)(w1)) \ 28 : "d" ((USItype)(u)), \ 29 "d" ((USItype)(v))) 30 31 #define __umulsidi3(u, v) \ 32 ({DIunion __w; \ 33 umul_ppmm (__w.s.high, __w.s.low, u, v); \ 34 __w.ll; }) 35 36 typedef int SItype __attribute__ ((mode (SI))); 37 typedef unsigned int USItype __attribute__ ((mode (SI))); 38 typedef int DItype __attribute__ ((mode (DI))); 39 typedef int word_type __attribute__ ((mode (__word__))); 40 41 struct DIstruct {SItype high, low;}; 42 43 typedef union 44 { 45 struct DIstruct s; 46 DItype ll; 47 } DIunion; 48 49 DItype 50 __muldi3 (DItype u, DItype v) 51 { 52 DIunion w; 53 DIunion uu, vv; 54 55 uu.ll = u, 56 vv.ll = v; 57 58 w.ll = __umulsidi3 (uu.s.low, vv.s.low); 59 w.s.high += ((USItype) uu.s.low * (USItype) vv.s.high 60 + (USItype) uu.s.high * (USItype) vv.s.low); 61 62 return w.ll; 63 } -
fs/cifs/cifsfs.c
diff -Nur linux.old/fs/cifs/cifsfs.c linux.dev/fs/cifs/cifsfs.c
old new 50 50 static struct quotactl_ops cifs_quotactl_ops; 51 51 #endif 52 52 53 extern struct file_system_type cifs_fs_type;54 55 53 int cifsFYI = 0; 56 54 int cifsERROR = 1; 57 55 int traceSMB = 0; -
include/asm-mips/uaccess.h
diff -Nur linux.old/include/asm-mips/uaccess.h linux.dev/include/asm-mips/uaccess.h
old new 149 149 * Returns zero on success, or -EFAULT on error. 150 150 */ 151 151 #define put_user(x,ptr) \ 152 __put_user_check(( __typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))152 __put_user_check((x),(ptr),sizeof(*(ptr))) 153 153 154 154 /* 155 155 * get_user: - Get a simple variable from user space. … … 169 169 * On error, the variable @x is set to zero. 170 170 */ 171 171 #define get_user(x,ptr) \ 172 __get_user_check(( __typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))172 __get_user_check((x),(ptr),sizeof(*(ptr))) 173 173 174 174 /* 175 175 * __put_user: - Write a simple value into user space, with less checking. … … 191 191 * Returns zero on success, or -EFAULT on error. 192 192 */ 193 193 #define __put_user(x,ptr) \ 194 __put_user_nocheck(( __typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))194 __put_user_nocheck((x),(ptr),sizeof(*(ptr))) 195 195 196 196 /* 197 197 * __get_user: - Get a simple variable from user space, with less checking. … … 214 214 * On error, the variable @x is set to zero. 215 215 */ 216 216 #define __get_user(x,ptr) \ 217 __get_user_nocheck(( __typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))217 __get_user_nocheck((x),(ptr),sizeof(*(ptr))) 218 218 219 219 struct __large_struct { unsigned long buf[100]; }; 220 220 #define __m(x) (*(struct __large_struct *)(x)) … … 232 232 #define __get_user_nocheck(x,ptr,size) \ 233 233 ({ \ 234 234 long __gu_err = 0; \ 235 __typeof(*(ptr)) __gu_val = 0; \235 __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \ 236 236 long __gu_addr; \ 237 237 __gu_addr = (long) (ptr); \ 238 238 switch (size) { \
Note:
See TracBrowser
for help on using the repository browser.
