diff options
author | kristerw <kristerw> | 2004-01-16 00:59:18 +0000 |
---|---|---|
committer | kristerw <kristerw> | 2004-01-16 00:59:18 +0000 |
commit | 54af9edcbf9447cf232c8ba361d5121b6e132900 (patch) | |
tree | 02a79ee19041133e91eadcc3ed08c819edf7059a /lang | |
parent | ed28ad73d624d68173962adc451ca63987d610b3 (diff) | |
download | pkgsrc-54af9edcbf9447cf232c8ba361d5121b6e132900.tar.gz |
Add patches from the nhc98 web page:
* A degenerate type synonym like type T a = a in some circumstances
incorrectly caused an occurence check error.
* Several new features in gcc-3.3 cause breakage in the nhc98 build.
This patch fixes many [but ot all] of those problems.
PKGREVISION++.
Diffstat (limited to 'lang')
-rw-r--r-- | lang/nhc98/Makefile | 4 | ||||
-rw-r--r-- | lang/nhc98/distinfo | 8 | ||||
-rw-r--r-- | lang/nhc98/patches/patch-ac | 356 | ||||
-rw-r--r-- | lang/nhc98/patches/patch-ad | 16 | ||||
-rw-r--r-- | lang/nhc98/patches/patch-ae | 12 | ||||
-rw-r--r-- | lang/nhc98/patches/patch-af | 23 | ||||
-rw-r--r-- | lang/nhc98/patches/patch-ag | 133 |
7 files changed, 369 insertions, 183 deletions
diff --git a/lang/nhc98/Makefile b/lang/nhc98/Makefile index c104c2cd62f..b9d83308ea4 100644 --- a/lang/nhc98/Makefile +++ b/lang/nhc98/Makefile @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.23 2003/09/28 09:13:57 jlam Exp $ +# $NetBSD: Makefile,v 1.24 2004/01/16 00:59:18 kristerw Exp $ DISTNAME= nhc98src-1.16 PKGNAME= nhc98-1.16 -PKGREVISION= 1 +PKGREVISION= 2 WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} CATEGORIES= lang MASTER_SITES= ftp://ftp.cs.york.ac.uk/pub/haskell/nhc98/ diff --git a/lang/nhc98/distinfo b/lang/nhc98/distinfo index b76dd3a1f10..a780caa835c 100644 --- a/lang/nhc98/distinfo +++ b/lang/nhc98/distinfo @@ -1,7 +1,11 @@ -$NetBSD: distinfo,v 1.9 2004/01/03 09:50:39 kristerw Exp $ +$NetBSD: distinfo,v 1.10 2004/01/16 00:59:18 kristerw Exp $ SHA1 (nhc98src-1.16.tar.gz) = 7ca27c190d06462cab5d642726b7e5e73b61a7e4 Size (nhc98src-1.16.tar.gz) = 5689485 bytes SHA1 (patch-aa) = ba484e67af2574abda0708f882e4c5f973ef125e SHA1 (patch-ab) = 064fe3b954dadf46155a3ddcd1e0ba439ff5167d -SHA1 (patch-ac) = 5478a4b98583ee2ca165bc460a720d9f2a0742dc +SHA1 (patch-ac) = 514a8e8d74a4efb6149734c95b9b4f0c72678218 +SHA1 (patch-ad) = 53ff3bf9b71810c024df1ed04103964f0d65848f +SHA1 (patch-ae) = 89a661248bddb6dddbac232fe9abba81cc0db172 +SHA1 (patch-af) = 0036a99ddd54f86679faa2d564fab1297aa00273 +SHA1 (patch-ag) = 613b06d92328ff649ea8d3cd198b058f0354654a diff --git a/lang/nhc98/patches/patch-ac b/lang/nhc98/patches/patch-ac index 4648417bcde..c1bce8285cc 100644 --- a/lang/nhc98/patches/patch-ac +++ b/lang/nhc98/patches/patch-ac @@ -1,22 +1,22 @@ -$NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ +$NetBSD: patch-ac,v 1.2 2004/01/16 00:59:18 kristerw Exp $ ---- src/runtime/Integer/asmlong.h.orig Sat Jan 3 07:16:57 2004 -+++ src/runtime/Integer/asmlong.h Sat Jan 3 07:28:52 2004 +--- src/runtime/Integer/asmlong.h.orig 2003-02-27 10:19:30.000000000 +0000 ++++ src/runtime/Integer/asmlong.h 2003-12-16 16:33:42.000000000 +0000 @@ -1,13 +1,13 @@ #if defined (__a29k__) || defined (___AM29K__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add %1,%4,%5 - addc %0,%2,%3" \ -+ __asm__ ("add %1,%4,%5\n\t" \ -+ "addc %0,%2,%3" \ ++ __asm__ ("add %1,%4,%5\n" \ ++" addc %0,%2,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl)) \ : "%r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)), \ "%r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub %1,%4,%5 - subc %0,%2,%3" \ -+ __asm__ ("sub %1,%4,%5\n\t" \ -+ "subc %0,%2,%3" \ ++ __asm__ ("sub %1,%4,%5\n" \ ++" subc %0,%2,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl)) \ : "r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)), \ "r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) @@ -26,16 +26,16 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("adds %1,%4,%5 - adc %0,%2,%3" \ -+ __asm__ ("adds %1,%4,%5\n\t" \ -+ "adc %0,%2,%3" \ ++ __asm__ ("adds %1,%4,%5\n" \ ++" adc %0,%2,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl)) \ : "%r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)), \ "%r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subs %1,%4,%5 - sbc %0,%2,%3" \ -+ __asm__ ("subs %1,%4,%5\n\t" \ -+ "sbc %0,%2,%3" \ ++ __asm__ ("subs %1,%4,%5\n" \ ++" sbc %0,%2,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl)) \ : "r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)), \ "r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) @@ -45,16 +45,16 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add.w %5,%1 - addx %3,%0" \ -+ __asm__ ("add.w %5,%1\n\t" \ -+ "addx %3,%0" \ ++ __asm__ ("add.w %5,%1\n" \ ++" addx %3,%0" \ : "=g" ((unsigned long int)(sh)), "=&g" ((unsigned long int)(sl))\ : "%0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "%1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub.w %5,%1 - subx %3,%0" \ -+ __asm__ ("sub.w %5,%1\n\t" \ -+ "subx %3,%0" \ ++ __asm__ ("sub.w %5,%1\n" \ ++" subx %3,%0" \ : "=g" ((unsigned long int)(sh)), "=&g" ((unsigned long int)(sl))\ : "0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) @@ -64,16 +64,16 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add %4,%5,%1 - addc %2,%3,%0" \ -+ __asm__ ("add %4,%5,%1\n\t" \ -+ "addc %2,%3,%0" \ ++ __asm__ ("add %4,%5,%1\n" \ ++" addc %2,%3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%r" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)),\ "%r" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub %5,%4,%1 - subb %3,%2,%0" \ -+ __asm__ ("sub %5,%4,%1\n\t" \ -+ "subb %3,%2,%0" \ ++ __asm__ ("sub %5,%4,%1\n" \ ++" subb %3,%2,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "r" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)), \ "r" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) @@ -83,16 +83,16 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addl %5,%1 - adcl %3,%0" \ -+ __asm__ ("addl %5,%1\n\t" \ -+ "adcl %3,%0" \ ++ __asm__ ("addl %5,%1\n" \ ++" adcl %3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "%1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subl %5,%1 - sbbl %3,%0" \ -+ __asm__ ("subl %5,%1\n\t" \ -+ "sbbl %3,%0" \ ++ __asm__ ("subl %5,%1\n" \ ++" sbbl %3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) @@ -102,16 +102,16 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("a %1,%4,%5 - ae %0,%2,%3" \ -+ __asm__ ("a %1,%4,%5\n\t" \ -+ "ae %0,%2,%3" \ ++ __asm__ ("a %1,%4,%5\n" \ ++" ae %0,%2,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%r" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)),\ "%r" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sf %1,%5,%4 - sfe %0,%3,%2" \ -+ __asm__ ("sf %1,%5,%4\n\t" \ -+ "sfe %0,%3,%2" \ ++ __asm__ ("sf %1,%5,%4\n" \ ++" sfe %0,%3,%2" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "r" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)), \ "r" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) @@ -145,68 +145,66 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - movel d2,%1 - addl d1,d0 - movel d0,%0" \ -+ __asm__ ("| Inlined umul_ppmm\n\t" \ -+ "movel %2,d0\n\t" \ -+ "movel %3,d1\n\t" \ -+ "movel d0,d2\n\t" \ -+ "swap d0\n\t" \ -+ "movel d1,d3\n\t" \ -+ "swap d1\n\t" \ -+ "movew d2,d4\n\t" \ -+ "mulu d3,d4\n\t" \ -+ "mulu d1,d2\n\t" \ -+ "mulu d0,d3\n\t" \ -+ "mulu d0,d1\n\t" \ -+ "movel d4,d0\n\t" \ -+ "eorw d0,d0\n\t" \ -+ "swap d0\n\t" \ -+ "addl d0,d2\n\t" \ -+ "addl d3,d2\n\t" \ -+ "jcc 1f\n\t" \ -+ "addl #65536,d1\n"i \ -+"1: swap d2\n\t" \ -+ "moveq #0,d0\n\t" \ -+ "movew d2,d0\n\t" \ -+ "movew d4,d2\n\t" \ -+ "movel d2,%1\n\t" \ -+ "addl d1,d0\n\t" \ -+ "movel d0,%0" \ ++ __asm__ ("| Inlined umul_ppmm\n" \ ++" movel %2,d0\n" \ ++" movel %3,d1\n" \ ++" movel d0,d2\n" \ ++" swap d0\n" \ ++" movel d1,d3\n" \ ++" swap d1\n" \ ++" movew d2,d4\n" \ ++" mulu d3,d4\n" \ ++" mulu d1,d2\n" \ ++" mulu d0,d3\n" \ ++" mulu d0,d1\n" \ ++" movel d4,d0\n" \ ++" eorw d0,d0\n" \ ++" swap d0\n" \ ++" addl d0,d2\n" \ ++" addl d3,d2\n" \ ++" jcc 1f\n" \ ++" addl #65536,d1\n" \ ++"1: swap d2\n" \ ++" moveq #0,d0\n" \ ++" movew d2,d0\n" \ ++" movew d4,d2\n" \ ++" movel d2,%1\n" \ ++" addl d1,d0\n" \ ++" movel d0,%0" \ : "=g" ((unsigned long int)(xh)), "=g" ((unsigned long int)(xl)) \ :"g" ((unsigned long int)(a)), "g" ((unsigned long int)(b)) \ : "d0", "d1", "d2", "d3", "d4") -@@ -298,14 +298,14 @@ +@@ -298,14 +298,12 @@ #if defined (__m88000__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addu.co %1,%r4,%r5 - addu.ci %0,%r2,%r3" \ -+ __asm__ ("addu.co %1,%r4,%r5\n\t" \ -+ "addu.ci %0,%r2,%r3" \ ++ __asm__ ("addu.co %1,%r4,%r5\n\taddu.ci %0,%r2,%r3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%rJ" ((unsigned long int)(ah)), "rJ" ((unsigned long int)(bh)),\ "%rJ" ((unsigned long int)(al)), "rJ" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subu.co %1,%r4,%r5 - subu.ci %0,%r2,%r3" \ -+ __asm__ ("subu.co %1,%r4,%r5\n\t" \ -+ "subu.ci %0,%r2,%r3" \ ++ __asm__ ("subu.co %1,%r4,%r5\n\t subu.ci %0,%r2,%r3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "rJ" ((unsigned long int)(ah)), "rJ" ((unsigned long int)(bh)),\ "rJ" ((unsigned long int)(al)), "rJ" ((unsigned long int)(bl))) -@@ -322,9 +322,9 @@ +@@ -322,9 +320,9 @@ #if defined (__mips__) #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3 - mflo %0 - mfhi %1" \ -+ __asm__ ("multu %2,%3\n\t" \ -+ "mflo %0\n\t" \ -+ "mfhi %1" \ ++ __asm__ ("multu %2,%3\n" \ ++" mflo %0\n" \ ++" mfhi %1" \ : "=r" ((unsigned long int)(w0)), "=r" ((unsigned long int)(w1))\ : "r" ((unsigned long int)(u)), "r" ((unsigned long int)(v))) #define UMUL_TIME 5 -@@ -338,11 +338,11 @@ +@@ -338,11 +336,11 @@ : "%0" ((unsigned long int)(u)), "g" ((unsigned long int)(v))); \ __w; }) #define div_qrnnd(q, r, n1, n0, d) \ @@ -215,30 +213,30 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - deid %4,r0 - movd r1,%0 - movd r0,%1" \ -+ __asm__ ("movd %2,r0\n\t" \ -+ "movd %3,r1\n\t" \ -+ "deid %4,r0\n\t" \ -+ "movd r1,%0\n\t" \ -+ "movd r0,%1" \ ++ __asm__ ("movd %2,r0\n" \ ++" movd %3,r1\n" \ ++" deid %4,r0\n" \ ++" movd r1,%0\n" \ ++" movd r0,%1" \ : "=g" ((unsigned long int)(q)), "=g" ((unsigned long int)(r)) \ : "g" ((unsigned long int)(n0)), "g" ((unsigned long int)(n1)), \ "g" ((unsigned long int)(d)) : "r0", "r1") -@@ -350,23 +350,23 @@ +@@ -350,23 +348,23 @@ #if defined (__pyr__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addw %5,%1 - addwc %3,%0" \ -+ __asm__ ("addw %5,%1\n\t" \ -+ "addwc %3,%0" \ ++ __asm__ ("addw %5,%1\n" \ ++" addwc %3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)),\ "%1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subw %5,%1 - subwb %3,%0" \ -+ __asm__ ("subw %5,%1\n\t" \ -+ "subwb %3,%0" \ ++ __asm__ ("subw %5,%1\n" \ ++" subwb %3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) @@ -248,33 +246,33 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - uemul %3,tr10 - movw tr10,%0 - movw tr11,%1" \ -+ __asm__ ("movw %2,tr11\n\t" \ -+ "uemul %3,tr10\n\t" \ -+ "movw tr10,%0\n\t" \ -+ "movw tr11,%1" \ ++ __asm__ ("movw %2,tr11\n" \ ++" uemul %3,tr10\n" \ ++" movw tr10,%0\n" \ ++" movw tr11,%1" \ : "=r" ((unsigned long int)(w1)), "=r" ((unsigned long int)(w0))\ : "r" ((unsigned long int)(u)), "r" ((unsigned long int)(v)) \ : "tr10", "tr11") -@@ -374,14 +374,14 @@ +@@ -374,14 +372,14 @@ #if defined (__ibm032__) /* RT/ROMP */ #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("a %1,%5 - ae %0,%3" \ -+ __asm__ ("a %1,%5\n\t" \ -+ "ae %0,%3" \ ++ __asm__ ("a %1,%5\n" \ ++" ae %0,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%0" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)),\ "%1" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("s %1,%5 - se %0,%3" \ -+ __asm__ ("s %1,%5\n\t" \ -+ "se %0,%3" \ ++ __asm__ ("s %1,%5\n" \ ++" se %0,%3" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "0" ((unsigned long int)(ah)), "r" ((unsigned long int)(bh)), \ "1" ((unsigned long int)(al)), "r" ((unsigned long int)(bl))) -@@ -389,26 +389,26 @@ +@@ -389,26 +387,26 @@ do { \ unsigned long int __m0 = (m0), __m1 = (m1); \ __asm__ ( \ @@ -298,49 +296,49 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - m r2,%3 - cas %0,r2,r0 - mfs r10,%1" \ -+ "s r2,r2\n\t" \ -+ "mts r10,%2\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "m r2,%3\n\t" \ -+ "cas %0,r2,r0\n\t" \ -+ "mfs r10,%1" \ ++ "s r2,r2\n" \ ++" mts r10,%2\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" m r2,%3\n" \ ++" cas %0,r2,r0\n" \ ++" mfs r10,%1" \ : "=r" ((unsigned long int)(ph)), "=r" ((unsigned long int)(pl)) \ : "%r" (__m0), "r" (__m1) \ : "r2"); \ -@@ -433,14 +433,14 @@ +@@ -433,14 +431,14 @@ #if defined (__sparc__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addcc %4,%5,%1 - addx %2,%3,%0" \ -+ __asm__ ("addcc %4,%5,%1\n\t" \ -+ "addx %2,%3,%0" \ ++ __asm__ ("addcc %4,%5,%1\n" \ ++" addx %2,%3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "%r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)),\ "%r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subcc %4,%5,%1 - subx %2,%3,%0" \ -+ __asm__ ("subcc %4,%5,%1\n\t" \ -+ "subx %2,%3,%0" \ ++ __asm__ ("subcc %4,%5,%1\n" \ ++" subx %2,%3,%0" \ : "=r" ((unsigned long int)(sh)), "=&r" ((unsigned long int)(sl))\ : "r" ((unsigned long int)(ah)), "rI" ((unsigned long int)(bh)),\ "r" ((unsigned long int)(al)), "rI" ((unsigned long int)(bl))) -@@ -458,46 +458,46 @@ +@@ -458,46 +456,46 @@ /* SPARC without integer multiplication and divide instructions. (i.e. at least Sun4/20,40,60,65,75,110,260,280,330,360,380,470,490) */ #define umul_ppmm(w1, w0, u, v) \ @@ -384,50 +382,50 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - mulscc %%g1,0,%%g1 - add %%g1,%%g2,%0 - rd %%y,%1" \ -+ __asm__ ("! Inlined umul_ppmm\n\t" \ -+ "wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n\t" \ -+ "sra %3,31,%%g2 ! Don't move this insn\n\t" \ -+ "and %2,%%g2,%%g2 ! Don't move this insn\n\t" \ -+ "andcc %%g0,0,%%g1 ! Don't move this insn\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,%3,%%g1\n\t" \ -+ "mulscc %%g1,0,%%g1\n\t" \ -+ "add %%g1,%%g2,%0\n\t" \ -+ "rd %%y,%1" \ ++ __asm__ ("! Inlined umul_ppmm\n" \ ++" wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr\n" \ ++" sra %3,31,%%g2 ! Don't move this insn\n" \ ++" and %2,%%g2,%%g2 ! Don't move this insn\n" \ ++" andcc %%g0,0,%%g1 ! Don't move this insn\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,%3,%%g1\n" \ ++" mulscc %%g1,0,%%g1\n" \ ++" add %%g1,%%g2,%0\n" \ ++" rd %%y,%1" \ : "=r" ((unsigned long int)(w1)), "=r" ((unsigned long int)(w0))\ : "%rI" ((unsigned long int)(u)), "r" ((unsigned long int)(v)) \ : "%g1", "%g2") -@@ -505,30 +505,30 @@ +@@ -505,30 +503,30 @@ /* It's quite necessary to add this much assembler for the sparc. The default udiv_qrnnd (in C) is more than 10 times slower! */ #define udiv_qrnnd(q, r, n1, n0, d) \ @@ -455,49 +453,49 @@ $NetBSD: patch-ac,v 1.1 2004/01/03 09:50:39 kristerw Exp $ - sub %1,%2,%1 -3: xnor %0,0,%0 - ! End of inline udiv_qrnnd" \ -+ __asm__ ("! Inlined udiv_qrnnd\n\t" \ -+ "mov 32,%%g1\n\t" \ -+ "subcc %1,%2,%%g0\n" \ -+"1: bcs 5f\n\t" \ -+ "addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n\t" \ -+ "sub %1,%2,%1 ! this kills msb of n\n\t" \ -+ "addx %1,%1,%1 ! so this can't give carry\n\t" \ -+ "subcc %%g1,1,%%g1\n" \ -+"2: bne 1b\n\t" \ -+ "subcc %1,%2,%%g0\n\t" \ -+ "bcs 3f\n\t" \ -+ "addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n\t" \ -+ "b 3f\n\t" \ -+ "sub %1,%2,%1 ! this kills msb of n\n" \ -+"4: sub %1,%2,%1\n" \ -+"5: addxcc %1,%1,%1\n\t" \ -+ "bcc 2b\n\t" \ -+ "subcc %%g1,1,%%g1\n\t" \ -+"! Got carry from n. Subtract next step to cancel this carry.\n\t" \ -+ "bne 4b\n\t" \ -+ "addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n\t" \ -+ "sub %1,%2,%1\n" \ -+"3: xnor %0,0,%0\n\t" \ -+ "! End of inline udiv_qrnnd" \ ++ __asm__ ("! Inlined udiv_qrnnd\n" \ ++" mov 32,%%g1\n" \ ++" subcc %1,%2,%%g0\n" \ ++"1: bcs 5f\n" \ ++" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ ++" sub %1,%2,%1 ! this kills msb of n\n" \ ++" addx %1,%1,%1 ! so this can't give carry\n" \ ++" subcc %%g1,1,%%g1\n" \ ++"2: bne 1b\n" \ ++" subcc %1,%2,%%g0\n" \ ++" bcs 3f\n" \ ++" addxcc %0,%0,%0 ! shift n1n0 and a q-bit in lsb\n" \ ++" b 3f\n" \ ++" sub %1,%2,%1 ! this kills msb of n\n" \ ++"4: sub %1,%2,%1\n" \ ++"5: addxcc %1,%1,%1\n" \ ++" bcc 2b\n" \ ++" subcc %%g1,1,%%g1\n" \ ++"! Got carry from n. Subtract next step to cancel this carry.\n" \ ++" bne 4b\n" \ ++" addcc %0,%0,%0 ! shift n1n0 and a 0-bit in lsb\n" \ ++" sub %1,%2,%1\n" \ ++"3: xnor %0,0,%0\n" \ ++" ! End of inline udiv_qrnnd" \ : "=r&" ((unsigned long int)(q)), "=r&" ((unsigned long int)(r))\ : "r" ((unsigned long int)(d)), "1" ((unsigned long int)(n1)), \ "0" ((unsigned long int)(n0)) : "%g1") -@@ -538,14 +538,14 @@ +@@ -538,14 +536,14 @@ #if defined (__vax__) #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addl2 %5,%1 - adwc %3,%0" \ -+ __asm__ ("addl2 %5,%1\n\t" \ -+ "adwc %3,%0" \ ++ __asm__ ("addl2 %5,%1\n" \ ++" adwc %3,%0" \ : "=g" ((unsigned long int)(sh)), "=&g" ((unsigned long int)(sl))\ : "%0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)),\ "%1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subl2 %5,%1 - sbwc %3,%0" \ -+ __asm__ ("subl2 %5,%1\n\t" \ -+ "sbwc %3,%0" \ ++ __asm__ ("subl2 %5,%1\n" \ ++" sbwc %3,%0" \ : "=g" ((unsigned long int)(sh)), "=&g" ((unsigned long int)(sl))\ : "0" ((unsigned long int)(ah)), "g" ((unsigned long int)(bh)), \ "1" ((unsigned long int)(al)), "g" ((unsigned long int)(bl))) diff --git a/lang/nhc98/patches/patch-ad b/lang/nhc98/patches/patch-ad new file mode 100644 index 00000000000..f74c30fc285 --- /dev/null +++ b/lang/nhc98/patches/patch-ad @@ -0,0 +1,16 @@ +$NetBSD: patch-ad,v 1.1 2004/01/16 00:59:18 kristerw Exp $ + +--- src/runtime/Kernel/Makefile.orig 2003-02-05 15:39:18.000000000 +0000 ++++ src/runtime/Kernel/Makefile 2003-12-16 16:31:29.000000000 +0000 +@@ -38,8 +38,9 @@ + ${AOBJS} ${OOBJS}: ${OBJDIR}/%.o: %.c + ${CC} -c ${CFLAGS} -o $@ $< + ${SOBJS}: ${OBJDIR}/%.o: %.c +- ${CC} -S ${CFLAGS} -o - $< | sed '/.align 32/s/32/4/' |\ +- ${CC} -c -x assembler ${CFLAGS} -o $@ - ++ ${CC} -S ${CFLAGS} -o - $< |\ ++ sed -e '/.align 32/s/32/4/' -e '/.p2align 5/s/5/2/' |\ ++ ${CC} -c -x assembler-with-cpp ${CFLAGS} -o $@ - + + LINKS = bytecode.h cinterface.h mutlib.h newmacros.h \ + node.h runtime.h stableptr.h newbytecode.h bytecode_o.h diff --git a/lang/nhc98/patches/patch-ae b/lang/nhc98/patches/patch-ae new file mode 100644 index 00000000000..b54c899425d --- /dev/null +++ b/lang/nhc98/patches/patch-ae @@ -0,0 +1,12 @@ +$NetBSD: patch-ae,v 1.1 2004/01/16 00:59:18 kristerw Exp $ + +--- script/nhc98.inst.orig 2003-03-07 16:48:45.000000000 +0000 ++++ script/nhc98.inst 2003-12-16 16:30:11.000000000 +0000 +@@ -543,6 +543,7 @@ + echo $CPPAS $ENDIAN $CPPASFLAGS $CINCDIRS $TMPCPPASFILE -o $TMPASFILE + fi + $CPPAS $ENDIAN $CPPASFLAGS $CINCDIRS $TMPCPPASFILE -o - | \ ++ sed -e '/.p2align 5/s/5/2/' |\ + sed -e '/.align 32/s/32/4/' >$TMPASFILE # evil mangler! + if test $CSRC -eq 0 + then diff --git a/lang/nhc98/patches/patch-af b/lang/nhc98/patches/patch-af new file mode 100644 index 00000000000..70475dd6cf8 --- /dev/null +++ b/lang/nhc98/patches/patch-af @@ -0,0 +1,23 @@ +$NetBSD: patch-af,v 1.1 2004/01/16 00:59:18 kristerw Exp $ + +--- src/compiler98/NT.hs.orig 3 Jun 2002 15:03:19 ++++ src/compiler98/NT.hs 1 Apr 2003 13:54:36 +@@ -1,7 +1,7 @@ + module NT ( NT(..), NewType(..) + , anyNT, consNT, freeNT, freshNT, polyNT, strTVar + , sndNTvar, strNT, strictNT, transCtxs, useNT +- , contextNT, ntContext2Pair, stripNT ++ , contextNT, ntContext2Pair, stripNT, anyVarNT + ) where + + +@@ -157,3 +157,9 @@ + + + sndNTvar (c,v) = (c,NTvar v) -- used for ctxs ++ ++ ++anyVarNT :: NT -> Maybe Id ++anyVarNT (NTany tvn) = Just tvn ++anyVarNT (NTvar tvn) = Just tvn ++anyVarNT _ = Nothing diff --git a/lang/nhc98/patches/patch-ag b/lang/nhc98/patches/patch-ag new file mode 100644 index 00000000000..c6e6c9b10a4 --- /dev/null +++ b/lang/nhc98/patches/patch-ag @@ -0,0 +1,133 @@ +$NetBSD: patch-ag,v 1.1 2004/01/16 00:59:18 kristerw Exp $ + +--- src/compiler98/TypeUnify.hs.orig 20 Feb 2003 18:23:29 ++++ src/compiler98/TypeUnify.hs 1 Apr 2003 13:54:36 +@@ -3,7 +3,7 @@ + -} + module TypeUnify(unify,unifyr) where + +-import NT(NT(..),NewType(..),freeNT,strNT) ++import NT(NT(..),NewType(..),freeNT,strNT,anyVarNT) + import IdKind + import TypeSubst + import TypeUtil +@@ -20,12 +20,12 @@ + + unify state phi (t1@(NTany tvn1),t2) = + case applySubst phi tvn1 of +- Nothing -> extend phi tvn1 (subst phi t2) ++ Nothing -> extendV state phi tvn1 (subst phi t2) + Just phitvn -> unify state phi (phitvn,subst phi t2) + + unify state phi (t1@(NTvar tvn1),(NTany tvn2)) = + case applySubst phi tvn2 of +- Nothing -> extend phi tvn2 (subst phi t1) ++ Nothing -> extendV state phi tvn2 (subst phi t1) + Just phitvn -> unify state phi (phitvn,subst phi t1) + + unify state phi (t1@(NTvar tvn1),t2) = +@@ -35,7 +35,7 @@ + + unify state phi (t1@(NTcons _ _),t2@(NTany tvn2)) = + case applySubst phi tvn2 of +- Nothing -> extend phi tvn2 (subst phi t1) ++ Nothing -> extendV state phi tvn2 (subst phi t1) + Just phitvn -> unify state phi (phitvn,subst phi t1) + + unify state phi (t1@(NTcons _ _),t2@(NTvar tvn2)) = +@@ -81,13 +81,13 @@ + unify state phi (t1@(NTapp ta1 tb1),t2@(NTany tvn2)) = + -- strace ("unify(2) " ++ show t1 ++ " " ++ show t2) $ + case applySubst phi tvn2 of +- Nothing -> extend phi tvn2 (subst phi t1) ++ Nothing -> extendV state phi tvn2 (subst phi t1) + Just phitvn -> unify state phi (phitvn,subst phi t1) + + unify state phi (t1@(NTapp ta1 tb1),t2@(NTvar tvn2)) = + -- strace ("unify(3) " ++ show t1 ++ " " ++ show t2) $ + case applySubst phi tvn2 of +- Nothing -> extend phi tvn2 (subst phi t1) ++ Nothing -> extendV state phi tvn2 (subst phi t1) + Just phitvn -> unify state phi (phitvn,subst phi t1) + + unify state phi (t1@(NTapp ta1 tb1),t2@(NTcons c2 ts2)) = +@@ -130,7 +130,7 @@ + unify state phi (t1@(NTexist e),t2@(NTany tvn2)) = + -- strace ("unify exist " ++ show e ++ " any " ++ show tvn2) $ + case applySubst phi tvn2 of +- Nothing -> extend phi tvn2 (subst phi t1) ++ Nothing -> extendV state phi tvn2 (subst phi t1) + Just phitvn -> unify state phi (phitvn,subst phi t1) + + unify state phi (t1@(NTexist e),t2@(NTvar tvn2)) = +@@ -166,6 +166,8 @@ + + ------ + ++-- expand any type synonym at top, so that none is at top in result ++expandAll :: IntState -> NT -> NT + expandAll state t@(NTcons tcon ts) = + case unifyExpand state tcon of + Left _ -> t +@@ -178,6 +180,15 @@ + Right _ -> False + Left _ -> True + ++-- expand all type synonyms, so that none is left in result ++fullyExpand :: IntState -> NT -> NT ++fullyExpand state t = ++ case expandAll state t of ++ NTstrict t -> NTstrict (fullyExpand state t) ++ NTapp t1 t2 -> NTapp (fullyExpand state t1) (fullyExpand state t2) ++ NTcons id ts -> NTcons id (map (fullyExpand state) ts) ++ t -> t ++ + {- + If tcon is a type synoym, then unifyExpand returns the depth and the + definition body of the type synoym. +@@ -205,27 +216,26 @@ + + expand (NewType free [] ctxs [nt]) ts = subst (list2Subst (zip free ts)) nt + +- ++{- ++Extends substitution by subtitution of `t' for `tvn'. ++Performs occurrence check and assures that replacement of `tvn' is a type ++variable, if `t' expands to a type variable. ++-} + extendV :: IntState -> AssocTree Id NT -> Id -> NT + -> Either (AssocTree Id NT, String) (AssocTree Id NT) + +-extendV state phi tvn t@(NTcons c _) = +- if unboxedIS state c then +- Left (phi,"polymorphic type variable bound to unboxed data " ++ strIS state c) +- else +- extend phi tvn t + extendV state phi tvn t = +- extend phi tvn t ++ let t' = expandAll state t ++ in case anyVarNT t' of ++ Just tvn' -> if tvn' == tvn ++ then Right phi ++ else Right (addSubst phi tvn t') ++ Nothing -> ++ if tvn `elem` freeNT t' ++ then let t'' = fullyExpand state t' ++ -- expansion may have less free variables ++ in if tvn `elem` freeNT t'' ++ then Left (phi,"(type-variable occurrence check fails)") ++ else Right (addSubst phi tvn t'') ++ else Right (addSubst phi tvn t) -- do not expand unnecessarily + +-extend phi tvn t@(NTany tvn') = +- if tvn' == tvn +- then Right phi +- else Right (addSubst phi tvn t) +-extend phi tvn t@(NTvar tvn') = +- if tvn' == tvn +- then Right phi +- else Right (addSubst phi tvn t) +-extend phi tvn t | tvn `elem` freeNT t = +- Left (phi,"(type-variable occurrence check fails)") +-extend phi tvn t@(NTcons c _) = Right (addSubst phi tvn t) +-extend phi tvn t = Right (addSubst phi tvn t) |