1 diff -ruN linux-2.6.15.1/include/asm-ppc/libgcc.h linux-2.6.15.1-openwrt/include/asm-ppc/libgcc.h
2 --- linux-2.6.15.1/include/asm-ppc/libgcc.h 1970-01-01 01:00:00.000000000 +0100
3 +++ linux-2.6.15.1-openwrt/include/asm-ppc/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-i386/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
14 --- linux-2.6.15.1/include/asm-i386/libgcc.h 1970-01-01 01:00:00.000000000 +0100
15 +++ linux-2.6.15.1-openwrt/include/asm-i386/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 -ruN linux-2.6.15.1/include/asm-um/libgcc.h linux-2.6.15.1-openwrt/include/asm-i386/libgcc.h
26 --- linux-2.6.15.1/include/asm-um/libgcc.h 1970-01-01 01:00:00.000000000 +0100
27 +++ linux-2.6.15.1-openwrt/include/asm-um/libgcc.h 2006-02-01 15:47:53.000000000 +0100
29 +#ifndef __ASM_LIBGCC_H
30 +#define __ASM_LIBGCC_H
32 +#undef ARCH_NEEDS_ashldi3
33 +#undef ARCH_NEEDS_ashrdi3
34 +#undef ARCH_NEEDS_lshrdi3
36 +#endif /* __ASM_LIBGCC_H */
37 diff -Nur linux-2.6.15.1/include/asm-mips/libgcc.h linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h
38 --- linux-2.6.15.1/include/asm-mips/libgcc.h 1970-01-01 01:00:00.000000000 +0100
39 +++ linux-2.6.15.1-openwrt/include/asm-mips/libgcc.h 2006-01-20 10:32:28.000000000 +0100
41 +#ifndef __ASM_LIBGCC_H
42 +#define __ASM_LIBGCC_H
44 +#define ARCH_NEEDS_ashldi3
45 +#define ARCH_NEEDS_ashrdi3
46 +#define ARCH_NEEDS_lshrdi3
48 +#endif /* __ASM_LIBGCC_H */
49 diff -Nur linux-2.6.15.1/include/linux/libgcc.h linux-2.6.15.1-openwrt/include/linux/libgcc.h
50 --- linux-2.6.15.1/include/linux/libgcc.h 1970-01-01 01:00:00.000000000 +0100
51 +++ linux-2.6.15.1-openwrt/include/linux/libgcc.h 2006-01-20 10:33:38.000000000 +0100
53 +#ifndef __LINUX_LIBGCC_H
54 +#define __LINUX_LIBGCC_H
56 +#include <asm/byteorder.h>
57 +#include <asm/libgcc.h>
59 +typedef long long DWtype;
61 +typedef unsigned int UWtype;
62 +typedef int word_type __attribute__ ((mode (__word__)));
64 +#define BITS_PER_UNIT 8
70 +#elif defined(__LITTLE_ENDIAN)
84 +#endif /* __LINUX_LIBGCC_H */
85 diff -Nur linux-2.6.15.1/lib/ashldi3.c linux-2.6.15.1-openwrt/lib/ashldi3.c
86 --- linux-2.6.15.1/lib/ashldi3.c 1970-01-01 01:00:00.000000000 +0100
87 +++ linux-2.6.15.1-openwrt/lib/ashldi3.c 2006-01-20 10:38:41.000000000 +0100
89 +#include <linux/libgcc.h>
90 +#include <linux/module.h>
92 +#ifdef ARCH_NEEDS_ashldi3
94 +DWtype __ashldi3(DWtype u, word_type b)
103 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
107 + w.s.high = (UWtype) uu.s.low << -bm;
109 + const UWtype carries = (UWtype) uu.s.low >> bm;
111 + w.s.low = (UWtype) uu.s.low << b;
112 + w.s.high = ((UWtype) uu.s.high << b) | carries;
118 +EXPORT_SYMBOL(__ashldi3);
120 +#endif /* ARCH_NEEDS_ashldi3 */
121 diff -Nur linux-2.6.15.1/lib/ashrdi3.c linux-2.6.15.1-openwrt/lib/ashrdi3.c
122 --- linux-2.6.15.1/lib/ashrdi3.c 1970-01-01 01:00:00.000000000 +0100
123 +++ linux-2.6.15.1-openwrt/lib/ashrdi3.c 2006-01-20 10:39:29.000000000 +0100
125 +#include <linux/libgcc.h>
126 +#include <linux/module.h>
128 +/* Unless shift functions are defined with full ANSI prototypes,
129 + parameter b will be promoted to int if word_type is smaller than an int. */
130 +#ifdef ARCH_NEEDS_ashrdi3
132 +DWtype __ashrdi3(DWtype u, word_type b)
141 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
144 + /* w.s.high = 1..1 or 0..0 */
146 + uu.s.high >> (sizeof(Wtype) * BITS_PER_UNIT - 1);
147 + w.s.low = uu.s.high >> -bm;
149 + const UWtype carries = (UWtype) uu.s.high << bm;
151 + w.s.high = uu.s.high >> b;
152 + w.s.low = ((UWtype) uu.s.low >> b) | carries;
158 +EXPORT_SYMBOL(__ashrdi3);
160 +#endif /* ARCH_NEEDS_ashrdi3 */
161 diff -Nur linux-2.6.15.1/lib/lshrdi3.c linux-2.6.15.1-openwrt/lib/lshrdi3.c
162 --- linux-2.6.15.1/lib/lshrdi3.c 1970-01-01 01:00:00.000000000 +0100
163 +++ linux-2.6.15.1-openwrt/lib/lshrdi3.c 2006-01-20 10:40:10.000000000 +0100
165 +#include <linux/libgcc.h>
166 +#include <linux/module.h>
168 +/* Unless shift functions are defined with full ANSI prototypes,
169 + parameter b will be promoted to int if word_type is smaller than an int. */
170 +#ifdef ARCH_NEEDS_lshrdi3
172 +DWtype __lshrdi3(DWtype u, word_type b)
181 + bm = (sizeof(Wtype) * BITS_PER_UNIT) - b;
185 + w.s.low = (UWtype) uu.s.high >> -bm;
187 + const UWtype carries = (UWtype) uu.s.high << bm;
189 + w.s.high = (UWtype) uu.s.high >> b;
190 + w.s.low = ((UWtype) uu.s.low >> b) | carries;
196 +EXPORT_SYMBOL(__lshrdi3);
198 +#endif /* ARCH_NEEDS_lshrdi3 */
199 diff -Nur linux-2.6.15.1/lib/Makefile linux-2.6.15.1-openwrt/lib/Makefile
200 --- linux-2.6.15.1/lib/Makefile 2006-01-15 07:16:02.000000000 +0100
201 +++ linux-2.6.15.1-openwrt/lib/Makefile 2006-01-20 10:34:19.000000000 +0100
205 lib-y += kobject.o kref.o kobject_uevent.o klist.o
206 +obj-y += ashldi3.o ashrdi3.o lshrdi3.o
208 obj-y += sort.o parser.o halfmd4.o
210 diff -Nur linux-2.6.15.1/include/asm-arm/libgcc.h linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h
211 --- linux-2.6.15.1/include/asm-arm/libgcc.h 1970-01-01 01:00:00.000000000 +0100
212 +++ linux-2.6.15.1-openwrt/include/asm-arm/libgcc.h 2006-04-12 23:01:18.000000000 +0200
214 +#ifndef __ASM_LIBGCC_H
215 +#define __ASM_LIBGCC_H
217 +#undef ARCH_NEEDS_ashldi3
218 +#undef ARCH_NEEDS_ashrdi3
219 +#undef ARCH_NEEDS_lshrdi3
221 +#endif /* __ASM_LIBGCC_H */