diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-06 12:26:17 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-06 12:26:17 -0800 |
commit | e1b7361f32fdf60f575566ddef8a36b33086631d (patch) | |
tree | ee5e64036a4f99159d63d71fa603cf582729ef3a | |
parent | ceaeee6ad6c2a24bf37d9f426414cf3007432352 (diff) | |
parent | 84f4506cb788d85a50c97b399f2999f90e6272b0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/kyle/parisc-2.6:
[PARISC] lba_pci: pci_claim_resources disabled expansion roms
[PARISC] print more than one character at a time for pdc console
[PARISC] Update parisc-linux MAINTAINERS entries
[PARISC] timer interrupt should not be IRQ_DISABLED
Revert "[PARISC] import necessary bits of libgcc.a"
37 files changed, 73 insertions, 4703 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 3002cc811c1..f3d7256bc74 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -1681,8 +1681,7 @@ S: Maintained HARMONY SOUND DRIVER P: Kyle McMartin M: kyle@parisc-linux.org -W: http://www.parisc-linux.org/~kyle/harmony/ -L: parisc-linux@lists.parisc-linux.org +L: linux-parisc@vger.kernel.org S: Maintained HAYES ESP SERIAL DRIVER @@ -2890,16 +2889,15 @@ W: http://www.torque.net/linux-pp.html S: Maintained PARISC ARCHITECTURE +P: Kyle McMartin +M: kyle@parisc-linux.org P: Matthew Wilcox M: matthew@wil.cx P: Grant Grundler M: grundler@parisc-linux.org -P: Kyle McMartin -M: kyle@parisc-linux.org -L: parisc-linux@parisc-linux.org +L: linux-parisc@vger.kernel.org W: http://www.parisc-linux.org/ T: git kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6.git -T: cvs cvs.parisc-linux.org:/var/cvs/linux-2.6 S: Maintained PARAVIRT_OPS INTERFACE diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index ae4a9b3d4fd..e574de4efb3 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile @@ -70,7 +70,7 @@ kernel-y := mm/ kernel/ math-emu/ kernel/init_task.o kernel-$(CONFIG_HPUX) += hpux/ core-y += $(addprefix arch/parisc/, $(kernel-y)) -libs-y += arch/parisc/lib/ +libs-y += arch/parisc/lib/ `$(CC) -print-libgcc-file-name` drivers-$(CONFIG_OPROFILE) += arch/parisc/oprofile/ diff --git a/arch/parisc/kernel/firmware.c b/arch/parisc/kernel/firmware.c index fd6552c4c08..4ab83d56974 100644 --- a/arch/parisc/kernel/firmware.c +++ b/arch/parisc/kernel/firmware.c @@ -1082,76 +1082,56 @@ void pdc_io_reset_devices(void) /** - * pdc_iodc_putc - Console character print using IODC. - * @c: the character to output. + * pdc_iodc_print - Console print using IODC. + * @str: the string to output. + * @count: length of str * * Note that only these special chars are architected for console IODC io: * BEL, BS, CR, and LF. Others are passed through. * Since the HP console requires CR+LF to perform a 'newline', we translate * "\n" to "\r\n". */ -void pdc_iodc_putc(unsigned char c) +int pdc_iodc_print(unsigned char *str, unsigned count) { - /* XXX Should we spinlock posx usage */ - static int posx; /* for simple TAB-Simulation... */ - static int __attribute__((aligned(8))) iodc_retbuf[32]; - static char __attribute__((aligned(64))) iodc_dbuf[4096]; - unsigned int n; + /* XXX Should we spinlock posx usage */ + static int posx; /* for simple TAB-Simulation... */ + int __attribute__((aligned(8))) iodc_retbuf[32]; + char __attribute__((aligned(64))) iodc_dbuf[4096]; + unsigned int i; unsigned long flags; - switch (c) { - case '\n': - iodc_dbuf[0] = '\r'; - iodc_dbuf[1] = '\n'; - n = 2; - posx = 0; - break; - case '\t': - pdc_iodc_putc(' '); - while (posx & 7) /* expand TAB */ - pdc_iodc_putc(' '); - return; /* return since IODC can't handle this */ - case '\b': - posx-=2; /* BS */ - default: - iodc_dbuf[0] = c; - n = 1; - posx++; - break; - } + memset(iodc_dbuf, 0, 4096); + for (i = 0; i < count && i < 2048;) { + switch(str[i]) { + case '\n': + iodc_dbuf[i+0] = '\r'; + iodc_dbuf[i+1] = '\n'; + i += 2; + posx = 0; + break; + case '\t': + while (posx & 7) { + iodc_dbuf[i] = ' '; + i++, posx++; + } + break; + case '\b': /* BS */ + posx -= 2; + default: + iodc_dbuf[i] = str[i]; + i++, posx++; + break; + } + } spin_lock_irqsave(&pdc_lock, flags); real32_call(PAGE0->mem_cons.iodc_io, (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT, PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers), - __pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0); + __pa(iodc_retbuf), 0, __pa(iodc_dbuf), i, 0); spin_unlock_irqrestore(&pdc_lock, flags); -} -/** - * pdc_iodc_outc - Console character print using IODC (without conversions). - * @c: the character to output. - * - * Write the character directly to the IODC console. - */ -void pdc_iodc_outc(unsigned char c) -{ - unsigned int n; - unsigned long flags; - - /* fill buffer with one caracter and print it */ - static int __attribute__((aligned(8))) iodc_retbuf[32]; - static char __attribute__((aligned(64))) iodc_dbuf[4096]; - - n = 1; - iodc_dbuf[0] = c; - - spin_lock_irqsave(&pdc_lock, flags); - real32_call(PAGE0->mem_cons.iodc_io, - (unsigned long)PAGE0->mem_cons.hpa, ENTRY_IO_COUT, - PAGE0->mem_cons.spa, __pa(PAGE0->mem_cons.dp.layers), - __pa(iodc_retbuf), 0, __pa(iodc_dbuf), n, 0); - spin_unlock_irqrestore(&pdc_lock, flags); + return i; } /** diff --git a/arch/parisc/kernel/irq.c b/arch/parisc/kernel/irq.c index 76ce5e3b005..23ef950df00 100644 --- a/arch/parisc/kernel/irq.c +++ b/arch/parisc/kernel/irq.c @@ -397,7 +397,7 @@ static void claim_cpu_irqs(void) } irq_desc[TIMER_IRQ].action = &timer_action; - irq_desc[TIMER_IRQ].status |= IRQ_PER_CPU; + irq_desc[TIMER_IRQ].status = IRQ_PER_CPU; #ifdef CONFIG_SMP irq_desc[IPI_IRQ].action = &ipi_action; irq_desc[IPI_IRQ].status = IRQ_PER_CPU; diff --git a/arch/parisc/kernel/parisc_ksyms.c b/arch/parisc/kernel/parisc_ksyms.c index 671ee5b9950..7aca704e96f 100644 --- a/arch/parisc/kernel/parisc_ksyms.c +++ b/arch/parisc/kernel/parisc_ksyms.c @@ -122,9 +122,31 @@ EXPORT_SYMBOL($$divI_12); EXPORT_SYMBOL($$divI_14); EXPORT_SYMBOL($$divI_15); +extern void __ashrdi3(void); +extern void __ashldi3(void); +extern void __lshrdi3(void); +extern void __muldi3(void); + +EXPORT_SYMBOL(__ashrdi3); +EXPORT_SYMBOL(__ashldi3); +EXPORT_SYMBOL(__lshrdi3); +EXPORT_SYMBOL(__muldi3); + asmlinkage void * __canonicalize_funcptr_for_compare(void *); EXPORT_SYMBOL(__canonicalize_funcptr_for_compare); +#ifdef CONFIG_64BIT +extern void __divdi3(void); +extern void __udivdi3(void); +extern void __umoddi3(void); +extern void __moddi3(void); + +EXPORT_SYMBOL(__divdi3); +EXPORT_SYMBOL(__udivdi3); +EXPORT_SYMBOL(__umoddi3); +EXPORT_SYMBOL(__moddi3); +#endif + #ifndef CONFIG_64BIT extern void $$dyncall(void); EXPORT_SYMBOL($$dyncall); diff --git a/arch/parisc/kernel/pdc_cons.c b/arch/parisc/kernel/pdc_cons.c index aab05767427..33b1f84441b 100644 --- a/arch/parisc/kernel/pdc_cons.c +++ b/arch/parisc/kernel/pdc_cons.c @@ -55,13 +55,7 @@ static void pdc_console_write(struct console *co, const char *s, unsigned count) { - while(count--) - pdc_iodc_putc(*s++); -} - -void pdc_outc(unsigned char c) -{ - pdc_iodc_outc(c); + pdc_iodc_print(s, count); } void pdc_printf(const char *fmt, ...) @@ -74,8 +68,7 @@ void pdc_printf(const char *fmt, ...) len = vscnprintf(buf, sizeof(buf), fmt, args); va_end(args); - for (i = 0; i < len; i++) - pdc_iodc_outc(buf[i]); + pdc_iodc_print(buf, len); } int pdc_console_poll_key(struct console *co) diff --git a/arch/parisc/lib/Makefile b/arch/parisc/lib/Makefile index 7ce406c7daf..5f2e6904d14 100644 --- a/arch/parisc/lib/Makefile +++ b/arch/parisc/lib/Makefile @@ -4,4 +4,4 @@ lib-y := lusercopy.o bitops.o checksum.o io.o memset.o fixup.o memcpy.o -obj-y := libgcc/ milli/ iomap.o +obj-y := iomap.o diff --git a/arch/parisc/lib/libgcc/Makefile b/arch/parisc/lib/libgcc/Makefile deleted file mode 100644 index b67a85ad9c8..00000000000 --- a/arch/parisc/lib/libgcc/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -obj-y := __ashldi3.o __ashrdi3.o __clzsi2.o __divdi3.o __divsi3.o \ - __lshrdi3.o __moddi3.o __modsi3.o __udivdi3.o \ - __udivmoddi4.o __udivmodsi4.o __udivsi3.o \ - __umoddi3.o __umodsi3.o __muldi3.o __umulsidi3.o diff --git a/arch/parisc/lib/libgcc/__ashldi3.c b/arch/parisc/lib/libgcc/__ashldi3.c deleted file mode 100644 index a14a257abb2..00000000000 --- a/arch/parisc/lib/libgcc/__ashldi3.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "libgcc.h" - -u64 __ashldi3(u64 v, int cnt) -{ - int c = cnt & 31; - u32 vl = (u32) v; - u32 vh = (u32) (v >> 32); - - if (cnt & 32) { - vh = (vl << c); - vl = 0; - } else { - vh = (vh << c) + (vl >> (32 - c)); - vl = (vl << c); - } - - return ((u64) vh << 32) + vl; -} -EXPORT_SYMBOL(__ashldi3); diff --git a/arch/parisc/lib/libgcc/__ashrdi3.c b/arch/parisc/lib/libgcc/__ashrdi3.c deleted file mode 100644 index 8636a5aa4f7..00000000000 --- a/arch/parisc/lib/libgcc/__ashrdi3.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "libgcc.h" - -u64 __ashrdi3(u64 v, int cnt) -{ - int c = cnt & 31; - u32 vl = (u32) v; - u32 vh = (u32) (v >> 32); - - if (cnt & 32) { - vl = ((s32) vh >> c); - vh = (s32) vh >> 31; - } else { - vl = (vl >> c) + (vh << (32 - c)); - vh = ((s32) vh >> c); - } - - return ((u64) vh << 32) + vl; -} -EXPORT_SYMBOL(__ashrdi3); diff --git a/arch/parisc/lib/libgcc/__clzsi2.c b/arch/parisc/lib/libgcc/__clzsi2.c deleted file mode 100644 index a7aa2f55a9c..00000000000 --- a/arch/parisc/lib/libgcc/__clzsi2.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "libgcc.h" - -u32 __clzsi2(u32 v) -{ - int p = 31; - - if (v & 0xffff0000) { - p -= 16; - v >>= 16; - } - if (v & 0xff00) { - p -= 8; - v >>= 8; - } - if (v & 0xf0) { - p -= 4; - v >>= 4; - } - if (v & 0xc) { - p -= 2; - v >>= 2; - } - if (v & 0x2) { - p -= 1; - v >>= 1; - } - - return p; -} -EXPORT_SYMBOL(__clzsi2); diff --git a/arch/parisc/lib/libgcc/__divdi3.c b/arch/parisc/lib/libgcc/__divdi3.c deleted file mode 100644 index f23c6fe2838..00000000000 --- a/arch/parisc/lib/libgcc/__divdi3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "libgcc.h" - -s64 __divdi3(s64 num, s64 den) -{ - int minus = 0; - s64 v; - - if (num < 0) { - num = -num; - minus = 1; - } - if (den < 0) { - den = -den; - minus ^= 1; - } - - v = __udivmoddi4(num, den, NULL); - if (minus) - v = -v; - - return v; -} -EXPORT_SYMBOL(__divdi3); diff --git a/arch/parisc/lib/libgcc/__divsi3.c b/arch/parisc/lib/libgcc/__divsi3.c deleted file mode 100644 index 730fb530680..00000000000 --- a/arch/parisc/lib/libgcc/__divsi3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "libgcc.h" - -s32 __divsi3(s32 num, s32 den) -{ - int minus = 0; - s32 v; - - if (num < 0) { - num = -num; - minus = 1; - } - if (den < 0) { - den = -den; - minus ^= 1; - } - - v = __udivmodsi4(num, den, NULL); - if (minus) - v = -v; - - return v; -} -EXPORT_SYMBOL(__divsi3); diff --git a/arch/parisc/lib/libgcc/__lshrdi3.c b/arch/parisc/lib/libgcc/__lshrdi3.c deleted file mode 100644 index 4a820708ec5..00000000000 --- a/arch/parisc/lib/libgcc/__lshrdi3.c +++ /dev/null @@ -1,19 +0,0 @@ -#include "libgcc.h" - -u64 __lshrdi3(u64 v, int cnt) -{ - int c = cnt & 31; - u32 vl = (u32) v; - u32 vh = (u32) (v >> 32); - - if (cnt & 32) { - vl = (vh >> c); - vh = 0; - } else { - vl = (vl >> c) + (vh << (32 - c)); - vh = (vh >> c); - } - - return ((u64) vh << 32) + vl; -} -EXPORT_SYMBOL(__lshrdi3); diff --git a/arch/parisc/lib/libgcc/__moddi3.c b/arch/parisc/lib/libgcc/__moddi3.c deleted file mode 100644 index ed64bbafc98..00000000000 --- a/arch/parisc/lib/libgcc/__moddi3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "libgcc.h" - -s64 __moddi3(s64 num, s64 den) -{ - int minus = 0; - s64 v; - - if (num < 0) { - num = -num; - minus = 1; - } - if (den < 0) { - den = -den; - minus ^= 1; - } - - (void)__udivmoddi4(num, den, (u64 *) & v); - if (minus) - v = -v; - - return v; -} -EXPORT_SYMBOL(__moddi3); diff --git a/arch/parisc/lib/libgcc/__modsi3.c b/arch/parisc/lib/libgcc/__modsi3.c deleted file mode 100644 index 62f773efaee..00000000000 --- a/arch/parisc/lib/libgcc/__modsi3.c +++ /dev/null @@ -1,23 +0,0 @@ -#include "libgcc.h" - -s32 __modsi3(s32 num, s32 den) -{ - int minus = 0; - s32 v; - - if (num < 0) { - num = -num; - minus = 1; - } - if (den < 0) { - den = -den; - minus ^= 1; - } - - (void)__udivmodsi4(num, den, (u32 *) & v); - if (minus) - v = -v; - - return v; -} -EXPORT_SYMBOL(__modsi3); diff --git a/arch/parisc/lib/libgcc/__muldi3.c b/arch/parisc/lib/libgcc/__muldi3.c deleted file mode 100644 index 3308abdd558..00000000000 --- a/arch/parisc/lib/libgcc/__muldi3.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "libgcc.h" - -union DWunion { - struct { - s32 high; - s32 low; - } s; - s64 ll; -}; - -s64 __muldi3(s64 u, s64 v) -{ - const union DWunion uu = { .ll = u }; - const union DWunion vv = { .ll = v }; - union DWunion w = { .ll = __umulsidi3(uu.s.low, vv.s.low) }; - - w.s.high += ((u32)uu.s.low * (u32)vv.s.high - + (u32)uu.s.high * (u32)vv.s.low); - - return w.ll; -} -EXPORT_SYMBOL(__muldi3); diff --git a/arch/parisc/lib/libgcc/__udivdi3.c b/arch/parisc/lib/libgcc/__udivdi3.c deleted file mode 100644 index 740023d690f..00000000000 --- a/arch/parisc/lib/libgcc/__udivdi3.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "libgcc.h" - -u64 __udivdi3(u64 num, u64 den) -{ - return __udivmoddi4(num, den, NULL); -} -EXPORT_SYMBOL(__udivdi3); diff --git a/arch/parisc/lib/libgcc/__udivmoddi4.c b/arch/parisc/lib/libgcc/__udivmoddi4.c deleted file mode 100644 index 2df0caa5a7d..00000000000 --- a/arch/parisc/lib/libgcc/__udivmoddi4.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "libgcc.h" - -u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p) -{ - u64 quot = 0, qbit = 1; - - if (den == 0) { - BUG(); - } - - /* Left-justify denominator and count shift */ - while ((s64) den >= 0) { - den <<= 1; - qbit <<= 1; - } - - while (qbit) { - if (den <= num) { - num -= den; - quot += qbit; - } - den >>= 1; - qbit >>= 1; - } - - if (rem_p) - *rem_p = num; - - return quot; -} -EXPORT_SYMBOL(__udivmoddi4); diff --git a/arch/parisc/lib/libgcc/__udivmodsi4.c b/arch/parisc/lib/libgcc/__udivmodsi4.c deleted file mode 100644 index 2a2fc28b202..00000000000 --- a/arch/parisc/lib/libgcc/__udivmodsi4.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "libgcc.h" - -u32 __udivmodsi4(u32 num, u32 den, u32 * rem_p) -{ - u32 quot = 0, qbit = 1; - - if (den == 0) { - BUG(); - } - - /* Left-justify denominator and count shift */ - while ((s32) den >= 0) { - den <<= 1; - qbit <<= 1; - } - - while (qbit) { - if (den <= num) { - num -= den; - quot += qbit; - } - den >>= 1; - qbit >>= 1; - } - - if (rem_p) - *rem_p = num; - - return quot; -} -EXPORT_SYMBOL(__udivmodsi4); diff --git a/arch/parisc/lib/libgcc/__udivsi3.c b/arch/parisc/lib/libgcc/__udivsi3.c deleted file mode 100644 index 756a44164e9..00000000000 --- a/arch/parisc/lib/libgcc/__udivsi3.c +++ /dev/null @@ -1,7 +0,0 @@ -#include "libgcc.h" - -u32 __udivsi3(u32 num, u32 den) -{ - return __udivmodsi4(num, den, NULL); -} -EXPORT_SYMBOL(__udivsi3); diff --git a/arch/parisc/lib/libgcc/__umoddi3.c b/arch/parisc/lib/libgcc/__umoddi3.c deleted file mode 100644 index ac744e948bc..00000000000 --- a/arch/parisc/lib/libgcc/__umoddi3.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "libgcc.h" - -u64 __umoddi3(u64 num, u64 den) -{ - u64 v; - - (void)__udivmoddi4(num, den, &v); - return v; -} -EXPORT_SYMBOL(__umoddi3); diff --git a/arch/parisc/lib/libgcc/__umodsi3.c b/arch/parisc/lib/libgcc/__umodsi3.c deleted file mode 100644 index 51f55aa89f9..00000000000 --- a/arch/parisc/lib/libgcc/__umodsi3.c +++ /dev/null @@ -1,10 +0,0 @@ -#include "libgcc.h" - -u32 __umodsi3(u32 num, u32 den) -{ - u32 v; - - (void)__udivmodsi4(num, den, &v); - return v; -} -EXPORT_SYMBOL(__umodsi3); diff --git a/arch/parisc/lib/libgcc/__umulsidi3.c b/arch/parisc/lib/libgcc/__umulsidi3.c deleted file mode 100644 index 396f669164d..00000000000 --- a/arch/parisc/lib/libgcc/__umulsidi3.c +++ /dev/null @@ -1,46 +0,0 @@ -#include "libgcc.h" - -#define __ll_B ((u32) 1 << (32 / 2)) -#define __ll_lowpart(t) ((u32) (t) & (__ll_B - 1)) -#define __ll_highpart(t) ((u32) (t) >> 16) - -#define umul_ppmm(w1, w0, u, v) \ - do { \ - u32 __x0, __x1, __x2, __x3; \ - u16 __ul, __vl, __uh, __vh; \ - \ - __ul = __ll_lowpart (u); \ - __uh = __ll_highpart (u); \ - __vl = __ll_lowpart (v); \ - __vh = __ll_highpart (v); \ - \ - __x0 = (u32) __ul * __vl; \ - __x1 = (u32) __ul * __vh; \ - __x2 = (u32) __uh * __vl; \ - __x3 = (u32) __uh * __vh; \ - \ - __x1 += __ll_highpart (__x0);/* this can't give carry */ \ - __x1 += __x2; /* but this indeed can */ \ - if (__x1 < __x2) /* did we get it? */ \ - __x3 += __ll_B; /* yes, add it in the proper pos. */ \ - \ - (w1) = __x3 + __ll_highpart (__x1); \ - (w0) = __ll_lowpart (__x1) * __ll_B + __ll_lowpart (__x0); \ - } while (0) - -union DWunion { - struct { - s32 high; - s32 low; - } s; - s64 ll; -}; - -u64 __umulsidi3(u32 u, u32 v) -{ - union DWunion __w; - - umul_ppmm(__w.s.high, __w.s.low, u, v); - - return __w.ll; -} diff --git a/arch/parisc/lib/libgcc/libgcc.h b/arch/parisc/lib/libgcc/libgcc.h deleted file mode 100644 index 5a6f7a510fb..00000000000 --- a/arch/parisc/lib/libgcc/libgcc.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _PA_LIBGCC_H_ -#define _PA_LIBGCC_H_ - -#include <linux/types.h> -#include <linux/module.h> - -/* Cribbed from klibc/libgcc/ */ -u64 __ashldi3(u64 v, int cnt); -u64 __ashrdi3(u64 v, int cnt); - -u32 __clzsi2(u32 v); - -s64 __divdi3(s64 num, s64 den); -s32 __divsi3(s32 num, s32 den); - -u64 __lshrdi3(u64 v, int cnt); - -s64 __moddi3(s64 num, s64 den); -s32 __modsi3(s32 num, s32 den); - -u64 __udivdi3(u64 num, u64 den); -u32 __udivsi3(u32 num, u32 den); - -u64 __udivmoddi4(u64 num, u64 den, u64 * rem_p); -u32 __udivmodsi4(u32 num, u32 den, u32 * rem_p); - -u64 __umulsidi3(u32 u, u32 v); - -u64 __umoddi3(u64 num, u64 den); -u32 __umodsi3(u32 num, u32 den); - -#endif /*_PA_LIBGCC_H_*/ diff --git a/arch/parisc/lib/milli/Makefile b/arch/parisc/lib/milli/Makefile deleted file mode 100644 index 9b24e9b1f3c..00000000000 --- a/arch/parisc/lib/milli/Makefile +++ /dev/null @@ -1 +0,0 @@ -obj-y := dyncall.o divI.o divU.o remI.o remU.o div_const.o mulI.o diff --git a/arch/parisc/lib/milli/divI.S b/arch/parisc/lib/milli/divI.S deleted file mode 100644 index ac106b7b6f2..00000000000 --- a/arch/parisc/lib/milli/divI.S +++ /dev/null @@ -1,254 +0,0 @@ -/* 32 and 64-bit millicode, original author Hewlett-Packard - adapted for gcc by Paul Bame <bame@debian.org> - and Alan Modra <alan@linuxcare.com.au>. - - Copyright 2001, 2002, 2003 Free Software Foundation, Inc. - - This file is part of GCC and is released under the terms of - of the GNU General Public License as published by the Free Software - Foundation; either version 2, or (at your option) any later version. - See the file COPYING in the top-level GCC source directory for a copy - of the license. */ - -#include "milli.h" - -#ifdef L_divI -/* ROUTINES: $$divI, $$divoI - - Single precision divide for signed binary integers. - - The quotient is truncated towards zero. - The sign of the quotient is the XOR of the signs of the dividend and - divisor. - Divide by zero is trapped. - Divide of -2**31 by -1 is trapped for $$divoI but not for $$divI. - - INPUT REGISTERS: - . arg0 == dividend - . arg1 == divisor - . mrp == return pc - . sr0 == return space when called externally - - OUTPUT REGISTERS: - . arg0 = undefined - . arg1 = undefined - . ret1 = quotient - - OTHER REGISTERS AFFECTED: - . r1 = undefined - - SIDE EFFECTS: - . Causes a trap under the following conditions: - . divisor is zero (traps with ADDIT,= 0,25,0) - . dividend==-2**31 and divisor==-1 and routine is $$divoI - . (traps with ADDO 26,25,0) - . Changes memory at the following places: - . NONE - - PERMISSIBLE CONTEXT: - . Unwindable. - . Suitable for internal or external millicode. - . Assumes the special millicode register conventions. - - DISCUSSION: - . Branchs to other millicode routines using BE - . $$div_# for # being 2,3,4,5,6,7,8,9,10,12,14,15 - . - . For selected divisors, calls a divide by constant routine written by - . Karl Pettis. Eligible divisors are 1..15 excluding 11 and 13. - . - . The only overflow case is -2**31 divided by -1. - . Both routines return -2**31 but only $$divoI traps. */ - -RDEFINE(temp,r1) -RDEFINE(retreg,ret1) /* r29 */ -RDEFINE(temp1,arg0) - SUBSPA_MILLI_DIV - ATTR_MILLI - .import $$divI_2,millicode - .import $$divI_3,millicode - .import $$divI_4,millicode - .import $$divI_5,millicode - .import $$divI_6,millicode - .import $$divI_7,millicode - .import $$divI_8,millicode - .import $$divI_9,millicode - .import $$divI_10,millicode - .import $$divI_12,millicode - .import $$divI_14,millicode - .import $$divI_15,millicode - .export $$divI,millicode - .export $$divoI,millicode - .proc - .callinfo millicode - .entry -GSYM($$divoI) - comib,=,n -1,arg1,LREF(negative1) /* when divisor == -1 */ -GSYM($$divI) - ldo -1(arg1),temp /* is there at most one bit set ? */ - and,<> arg1,temp,r0 /* if not, don't use power of 2 divide */ - addi,> 0,arg1,r0 /* if divisor > 0, use power of 2 divide */ - b,n LREF(neg_denom) -LSYM(pow2) - addi,>= 0,arg0,retreg /* if numerator is negative, add the */ - add arg0,temp,retreg /* (denominaotr -1) to correct for shifts */ - extru,= arg1,15,16,temp /* test denominator with 0xffff0000 */ - extrs retreg,15,16,retreg /* retreg = retreg >> 16 */ - or arg1,temp,arg1 /* arg1 = arg1 | (arg1 >> 16) */ - ldi 0xcc,temp1 /* setup 0xcc in temp1 */ - extru,= arg1,23,8,temp /* test denominator with 0xff00 */ - extrs retreg,23,24,retreg /* retreg = retreg >> 8 */ - or arg1,temp,arg1 /* arg1 = arg1 | (arg1 >> 8) */ - ldi 0xaa,temp /* setup 0xaa in temp */ - extru,= arg1,27,4,r0 /* test denominator with 0xf0 */ - extrs retreg,27,28,retreg /* retreg = retreg >> 4 */ - and,= arg1,temp1,r0 /* test denominator with 0xcc */ - extrs |