1 diff -ruN linux-2.6.15.1/include/asm-i386/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
2 --- linux-2.6.15.1/include/asm-i386/libgcc.h 1970-01-01 01:00:00.000000000 +0100
3 +++ linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h 2006-02-01 15:47:53.000000000 +0100
5 +#ifndef __ASM_LIBGCC_H
6 +#define __ASM_LIBGCC_H
8 +#undef ARCH_NEEDS_ashldi3
9 +#undef ARCH_NEEDS_ashrdi3
10 +#undef ARCH_NEEDS_lshrdi3
12 +#endif /* __ASM_LIBGCC_H */
13 diff -ruN linux-2.6.15.1/include/asm-um/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
14 --- linux-2.6.15.1/include/asm-um/libgcc.h 1970-01-01 01:00:00.000000000 +0100
15 +++ linux-2.6.15.1-openwrt/include/asm-um/libgcc.h 2006-02-01 15:47:53.000000000 +0100
17 +#ifndef __ASM_LIBGCC_H
18 +#define __ASM_LIBGCC_H
20 +#undef ARCH_NEEDS_ashldi3
21 +#undef ARCH_NEEDS_ashrdi3
22 +#undef ARCH_NEEDS_lshrdi3
24 +#endif /* __ASM_LIBGCC_H */
25 diff -Nur linux-2.6.15.1/include/asm-mips/libgcc.h linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h
26 --- linux-2.6.15.1/include/asm-mips/libgcc.h 1970-01-01 01:00:00.000000000 +0100
27 +++ linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h 2006-01-20 10:32:28.000000000 +0100
29 +#ifndef __ASM_LIBGCC_H
30 +#define __ASM_LIBGCC_H
32 +#define ARCH_NEEDS_ashldi3
33 +#define ARCH_NEEDS_ashrdi3
34 +#define ARCH_NEEDS_lshrdi3
36 +#endif /* __ASM_LIBGCC_H */
37 diff -Nur linux-2.6.15.1/include/linux/libgcc.h linux-2.6.15.1-openwrt/include/linux/libgcc.h
38 --- linux-2.6.15.1/include/linux/libgcc.h 1970-01-01 01:00:00.000000000 +0100
39 +++ linux-2.6.15.1-openwrt/include/linux/libgcc.h 2006-01-20 10:33:38.000000000 +0100
41 +#ifndef __LINUX_LIBGCC_H
42 +#define __LINUX_LIBGCC_H
44 +#include <asm/byteorder.h>
45 +#include <asm/libgcc.h>
47 +typedef long long DWtype;
49 +typedef unsigned int UWtype;
50 +typedef int word_type __attribute__ ((mode (__word__)));
52 +#define BITS_PER_UNIT 8
58 +#elif defined(__LITTLE_ENDIAN)
72 +#endif /* __LINUX_LIBGCC_H */
73 diff -Nur linux-2.6.15.1/lib/ashldi3.c linux-2.6.15.1-openwrt/lib/ashldi3.c
74 --- linux-2.6.15.1/lib/ashldi3.c 1970-01-01 01:00:00.000000000 +0100
75 +++ linux-2.6.15.1-openwrt/lib/ashldi3.c 2006-01-20 10:38:41.000000000 +0100
77 +#include <linux/libgcc.h>
78 +#include <linux/module.h>
80 +#ifdef ARCH_NEEDS_ashldi3
82 +DWtype __ashldi3(DWtype u, word_type b)
91 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
95 + w.s.high = (UWtype) uu.s.low << -bm;
97 + const UWtype carries = (UWtype) uu.s.low >> bm;
99 + w.s.low = (UWtype) uu.s.low << b;
100 + w.s.high = ((UWtype) uu.s.high << b) | carries;
106 +EXPORT_SYMBOL(__ashldi3);
108 +#endif /* ARCH_NEEDS_ashldi3 */
109 diff -Nur linux-2.6.15.1/lib/ashrdi3.c linux-2.6.15.1-openwrt/lib/ashrdi3.c
110 --- linux-2.6.15.1/lib/ashrdi3.c 1970-01-01 01:00:00.000000000 +0100
111 +++ linux-2.6.15.1-openwrt/lib/ashrdi3.c 2006-01-20 10:39:29.000000000 +0100
113 +#include <linux/libgcc.h>
114 +#include <linux/module.h>
116 +/* Unless shift functions are defined with full ANSI prototypes,
117 + parameter b will be promoted to int if word_type is smaller than an int. */
118 +#ifdef ARCH_NEEDS_ashrdi3
120 +DWtype __ashrdi3(DWtype u, word_type b)
129 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
132 + /* w.s.high = 1..1 or 0..0 */
134 + uu.s.high >> (sizeof(Wtype) * BITS_PER_UNIT - 1);
135 + w.s.low = uu.s.high >> -bm;
137 + const UWtype carries = (UWtype) uu.s.high << bm;
139 + w.s.high = uu.s.high >> b;
140 + w.s.low = ((UWtype) uu.s.low >> b) | carries;
146 +EXPORT_SYMBOL(__ashrdi3);
148 +#endif /* ARCH_NEEDS_ashrdi3 */
149 diff -Nur linux-2.6.15.1/lib/lshrdi3.c linux-2.6.15.1-openwrt/lib/lshrdi3.c
150 --- linux-2.6.15.1/lib/lshrdi3.c 1970-01-01 01:00:00.000000000 +0100
151 +++ linux-2.6.15.1-openwrt/lib/lshrdi3.c 2006-01-20 10:40:10.000000000 +0100
153 +#include <linux/libgcc.h>
154 +#include <linux/module.h>
156 +/* Unless shift functions are defined with full ANSI prototypes,
157 + parameter b will be promoted to int if word_type is smaller than an int. */
158 +#ifdef ARCH_NEEDS_lshrdi3
160 +DWtype __lshrdi3(DWtype u, word_type b)
169 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
173 + w.s.low = (UWtype) uu.s.high >> -bm;
175 + const UWtype carries = (UWtype) uu.s.high << bm;
177 + w.s.high = (UWtype) uu.s.high >> b;
178 + w.s.low = ((UWtype) uu.s.low >> b) | carries;
184 +EXPORT_SYMBOL(__lshrdi3);
186 +#endif /* ARCH_NEEDS_lshrdi3 */
187 diff -Nur linux-2.6.15.1/lib/Makefile linux-2.6.15.1-openwrt/lib/Makefile
188 --- linux-2.6.15.1/lib/Makefile 2006-01-15 07:16:02.000000000 +0100
189 +++ linux-2.6.15.1-openwrt/lib/Makefile 2006-01-20 10:34:19.000000000 +0100
193 lib-y += kobject.o kref.o kobject_uevent.o klist.o
194 +obj-y += ashldi3.o ashrdi3.o lshrdi3.o
196 obj-y += sort.o parser.o halfmd4.o
198 diff -Nur linux-2.6.15.1/include/asm-arm/libgcc.h linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h
199 --- linux-2.6.15.1/include/asm-arm/libgcc.h 1970-01-01 01:00:00.000000000 +0100
200 +++ linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h 2006-04-12 23:01:18.000000000 +0200
202 +#ifndef __ASM_LIBGCC_H
203 +#define __ASM_LIBGCC_H
205 +#undef ARCH_NEEDS_ashldi3
206 +#undef ARCH_NEEDS_ashrdi3
207 +#undef ARCH_NEEDS_lshrdi3
209 +#endif /* __ASM_LIBGCC_H */