source: freewrt/target/linux/generic-2.4/patches/113-even_more_gcc4_stuff.patch@ a3abab6

freewrt_1_0 freewrt_2_0
Last change on this file since a3abab6 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
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  
    3030#include <asm/floppy.h>
    3131#endif
    3232
     33asmlinkage long long __ashldi3 (long long, int);
     34asmlinkage long long __ashrdi3 (long long, int);
     35asmlinkage long long __lshrdi3 (long long, int);
     36asmlinkage long long __muldi3 (long long, long long);
    3337extern void *__bzero(void *__s, size_t __count);
    3438extern long __strncpy_from_user_nocheck_asm(char *__to,
    3539                                            const char *__from, long __len);
     
    7882EXPORT_SYMBOL_NOVERS(__strnlen_user_asm);
    7983
    8084
     85/* Compiler stuff */
     86EXPORT_SYMBOL_NOVERS(__ashldi3);
     87EXPORT_SYMBOL_NOVERS(__ashrdi3);
     88EXPORT_SYMBOL_NOVERS(__lshrdi3);
     89EXPORT_SYMBOL_NOVERS(__muldi3);
     90
     91
    8192/* Networking helper routines. */
    8293EXPORT_SYMBOL(csum_partial_copy);
    8394
  • arch/mips/lib/Makefile

    diff -Nur linux.old/arch/mips/lib/Makefile linux.dev/arch/mips/lib/Makefile
    old new  
    99obj-y                           += csum_partial.o csum_partial_copy.o \
    1010                                   promlib.o rtc-std.o rtc-no.o memcpy.o \
    1111                                   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
    1314
    1415export-objs                     := rtc-std.o rtc-no.o
    1516
  • 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
     4This file is part of GNU CC.
     5
     6GNU CC is free software; you can redistribute it and/or modify
     7it under the terms of the GNU General Public License as published by
     8the Free Software Foundation; either version 2, or (at your option)
     9any later version.
     10
     11GNU CC is distributed in the hope that it will be useful,
     12but WITHOUT ANY WARRANTY; without even the implied warranty of
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU General Public License for more details.
     15
     16You should have received a copy of the GNU General Public License
     17along with GNU CC; see the file COPYING.  If not, write to
     18the Free Software Foundation, 59 Temple Place - Suite 330,
     19Boston, MA 02111-1307, USA.  */
     20
     21#define BITS_PER_UNIT 8
     22
     23typedef          int SItype     __attribute__ ((mode (SI)));
     24typedef unsigned int USItype    __attribute__ ((mode (SI)));
     25typedef          int DItype     __attribute__ ((mode (DI)));
     26typedef int word_type __attribute__ ((mode (__word__)));
     27
     28struct DIstruct {SItype high, low;};
     29
     30typedef union
     31{
     32  struct DIstruct s;
     33  DItype ll;
     34} DIunion;
     35
     36DItype
     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
     4This file is part of GNU CC.
     5
     6GNU CC is free software; you can redistribute it and/or modify
     7it under the terms of the GNU General Public License as published by
     8the Free Software Foundation; either version 2, or (at your option)
     9any later version.
     10
     11GNU CC is distributed in the hope that it will be useful,
     12but WITHOUT ANY WARRANTY; without even the implied warranty of
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU General Public License for more details.
     15
     16You should have received a copy of the GNU General Public License
     17along with GNU CC; see the file COPYING.  If not, write to
     18the Free Software Foundation, 59 Temple Place - Suite 330,
     19Boston, MA 02111-1307, USA.  */
     20
     21#define BITS_PER_UNIT 8
     22
     23typedef          int SItype     __attribute__ ((mode (SI)));
     24typedef unsigned int USItype    __attribute__ ((mode (SI)));
     25typedef          int DItype     __attribute__ ((mode (DI)));
     26typedef int word_type __attribute__ ((mode (__word__)));
     27
     28struct DIstruct {SItype high, low;};
     29
     30typedef union
     31{
     32  struct DIstruct s;
     33  DItype ll;
     34} DIunion;
     35
     36DItype
     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
     4This file is part of GNU CC.
     5
     6GNU CC is free software; you can redistribute it and/or modify
     7it under the terms of the GNU General Public License as published by
     8the Free Software Foundation; either version 2, or (at your option)
     9any later version.
     10
     11GNU CC is distributed in the hope that it will be useful,
     12but WITHOUT ANY WARRANTY; without even the implied warranty of
     13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14GNU General Public License for more details.
     15
     16You should have received a copy of the GNU General Public License
     17along with GNU CC; see the file COPYING.  If not, write to
     18the Free Software Foundation, 59 Temple Place - Suite 330,
     19Boston, MA 02111-1307, USA.  */
     20
     21#define BITS_PER_UNIT 8
     22
     23typedef          int SItype     __attribute__ ((mode (SI)));
     24typedef unsigned int USItype    __attribute__ ((mode (SI)));
     25typedef          int DItype     __attribute__ ((mode (DI)));
     26typedef int word_type __attribute__ ((mode (__word__)));
     27
     28struct DIstruct {SItype high, low;};
     29
     30typedef union
     31{
     32  struct DIstruct s;
     33  DItype ll;
     34} DIunion;
     35
     36DItype
     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
     5This file is part of GNU CC.
     6
     7GNU CC is free software; you can redistribute it and/or modify
     8it under the terms of the GNU General Public License as published by
     9the Free Software Foundation; either version 2, or (at your option)
     10any later version.
     11
     12GNU CC is distributed in the hope that it will be useful,
     13but WITHOUT ANY WARRANTY; without even the implied warranty of
     14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15GNU General Public License for more details.
     16
     17You should have received a copy of the GNU General Public License
     18along with GNU CC; see the file COPYING.  If not, write to
     19the Free Software Foundation, 59 Temple Place - Suite 330,
     20Boston, 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
     36typedef          int SItype     __attribute__ ((mode (SI)));
     37typedef unsigned int USItype    __attribute__ ((mode (SI)));
     38typedef          int DItype     __attribute__ ((mode (DI)));
     39typedef int word_type __attribute__ ((mode (__word__)));
     40
     41struct DIstruct {SItype high, low;};
     42
     43typedef union
     44{
     45  struct DIstruct s;
     46  DItype ll;
     47} DIunion;
     48
     49DItype
     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  
    5050static struct quotactl_ops cifs_quotactl_ops;
    5151#endif
    5252
    53 extern struct file_system_type cifs_fs_type;
    54 
    5553int cifsFYI = 0;
    5654int cifsERROR = 1;
    5755int 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  
    149149 * Returns zero on success, or -EFAULT on error.
    150150 */
    151151#define put_user(x,ptr) \
    152         __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
     152        __put_user_check((x),(ptr),sizeof(*(ptr)))
    153153
    154154/*
    155155 * get_user: - Get a simple variable from user space.
     
    169169 * On error, the variable @x is set to zero.
    170170 */
    171171#define get_user(x,ptr) \
    172         __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
     172        __get_user_check((x),(ptr),sizeof(*(ptr)))
    173173
    174174/*
    175175 * __put_user: - Write a simple value into user space, with less checking.
     
    191191 * Returns zero on success, or -EFAULT on error.
    192192 */
    193193#define __put_user(x,ptr) \
    194         __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
     194        __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
    195195
    196196/*
    197197 * __get_user: - Get a simple variable from user space, with less checking.
     
    214214 * On error, the variable @x is set to zero.
    215215 */
    216216#define __get_user(x,ptr) \
    217         __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
     217        __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
    218218
    219219struct __large_struct { unsigned long buf[100]; };
    220220#define __m(x) (*(struct __large_struct *)(x))
     
    232232#define __get_user_nocheck(x,ptr,size)                                  \
    233233({                                                                      \
    234234        long __gu_err = 0;                                              \
    235         __typeof(*(ptr)) __gu_val = 0;                                  \
     235        __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0;                                       \
    236236        long __gu_addr;                                                 \
    237237        __gu_addr = (long) (ptr);                                       \
    238238        switch (size) {                                                 \
Note: See TracBrowser for help on using the repository browser.