diff options
author | tnn <tnn@pkgsrc.org> | 2008-03-03 21:41:30 +0000 |
---|---|---|
committer | tnn <tnn@pkgsrc.org> | 2008-03-03 21:41:30 +0000 |
commit | 77a0443568cb7fdba4dbaf94e8ec23ca851b79b7 (patch) | |
tree | 17df8dc77cba333b1ec21ec0d065d2317d7e0571 /devel | |
parent | d6ccf8cf664251c9f27f0424467fbf2bd95a5cc6 (diff) | |
download | pkgsrc-77a0443568cb7fdba4dbaf94e8ec23ca851b79b7.tar.gz |
Merge sparc and sparc64 avcall patches, taken from clisp-2.43.
Needed for clisp-2.44 now that it doesn't ship bundled avcall.
Hinted by uwe@
Bump PKGREVISION.
XXX untested
Diffstat (limited to 'devel')
-rw-r--r-- | devel/ffcall/Makefile | 4 | ||||
-rw-r--r-- | devel/ffcall/distinfo | 6 | ||||
-rw-r--r-- | devel/ffcall/patches/patch-ag | 117 | ||||
-rw-r--r-- | devel/ffcall/patches/patch-ah | 254 | ||||
-rw-r--r-- | devel/ffcall/patches/patch-ai | 13 | ||||
-rw-r--r-- | devel/ffcall/patches/patch-aj | 17 |
6 files changed, 408 insertions, 3 deletions
diff --git a/devel/ffcall/Makefile b/devel/ffcall/Makefile index 978c69a1572..335296d952a 100644 --- a/devel/ffcall/Makefile +++ b/devel/ffcall/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.22 2007/06/18 02:56:05 schmonz Exp $ +# $NetBSD: Makefile,v 1.23 2008/03/03 21:41:30 tnn Exp $ DISTNAME= ffcall-1.10 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= devel MASTER_SITES= ftp://ftp.santafe.edu/pub/gnu/ \ http://www.haible.de/bruno/gnu/ \ diff --git a/devel/ffcall/distinfo b/devel/ffcall/distinfo index fece125057e..e768e7a2ec9 100644 --- a/devel/ffcall/distinfo +++ b/devel/ffcall/distinfo @@ -1,4 +1,4 @@ -$NetBSD: distinfo,v 1.7 2005/02/23 22:24:13 agc Exp $ +$NetBSD: distinfo,v 1.8 2008/03/03 21:41:30 tnn Exp $ SHA1 (ffcall-1.10.tar.gz) = 6b4fdc7bd38b434bbf3d65508a3d117fc8b349f3 RMD160 (ffcall-1.10.tar.gz) = 910af54fae0b992ceb5620f155e301827d2e03c5 @@ -8,3 +8,7 @@ SHA1 (patch-ab) = 7e4b587a080af5530c7bd883a71b614162522320 SHA1 (patch-ad) = 4cfba7c4ce9fb709d1e857433c5caad293ca9c29 SHA1 (patch-ae) = 183b4e0dcd194a47fd94c19573ffd698bab14392 SHA1 (patch-af) = cff72d52332759b42f09acded753b08043b8aefc +SHA1 (patch-ag) = b21d51fc1d78d81a4f7a99183ca1033675ff04ac +SHA1 (patch-ah) = 07781ee5caef0ca98e9f15c504fee0b43a111245 +SHA1 (patch-ai) = 03a5a572e94ddbcb78dd11201e0afd91998d1e3a +SHA1 (patch-aj) = 8db7daeb150db176dfb2f59ad9b4854cb1f895fd diff --git a/devel/ffcall/patches/patch-ag b/devel/ffcall/patches/patch-ag new file mode 100644 index 00000000000..5757eef1ddc --- /dev/null +++ b/devel/ffcall/patches/patch-ag @@ -0,0 +1,117 @@ +$NetBSD: patch-ag,v 1.1 2008/03/03 21:41:30 tnn Exp $ + +--- avcall/avcall-sparc.c.orig 2004-01-26 15:58:38.000000000 +0100 ++++ avcall/avcall-sparc.c +@@ -2,7 +2,7 @@ + #define _avcall_sparc_c + /** + Copyright 1993 Bill Triggs, <Bill.Triggs@inrialpes.fr> +- Copyright 1995-1999 Bruno Haible, <bruno@clisp.org> ++ Copyright 1995-1999, 2005 Bruno Haible, <bruno@clisp.org> + + This is free software distributed under the GNU General Public + Licence described in the file COPYING. Contact the author if +@@ -77,7 +77,7 @@ __builtin_avcall(av_alist* l) + int arglen = l->aptr - l->args; + __avword i; + +- if ((l->rtype == __AVstruct) && !(l->flags & __AV_SUNCC_STRUCT_RETURN)) ++ if (l->rtype == __AVstruct) + argframe[-1] = (__avword)l->raddr; /* push struct return address */ + + { +@@ -108,7 +108,7 @@ __builtin_avcall(av_alist* l) + } + + /* call function with 1st 6 args */ +- i = ({ __avword iret; /* %o0 */ ++ i = ({ register __avword iret __asm__("%o0"); + iret = (*l->func)(l->args[0], l->args[1], l->args[2], + l->args[3], l->args[4], l->args[5]); + asm ("nop"); /* struct returning functions skip this instruction */ +@@ -167,70 +167,36 @@ __builtin_avcall(av_alist* l) + RETURN(void*, i); + } else + if (l->rtype == __AVstruct) { +- /* This is a kludge for old Sun cc and is probably fragile. */ +- if (l->flags & __AV_SUNCC_STRUCT_RETURN) { +- /* Sun cc struct return convention */ ++ if (l->flags & __AV_PCC_STRUCT_RETURN) { ++ /* pcc struct return convention: need a *(TYPE*)l->raddr = *(TYPE*)i; */ + if (l->rsize == sizeof(char)) { +- RETURN(char, ((char*)sp)[-1]); ++ RETURN(char, *(char*)i); + } else + if (l->rsize == sizeof(short)) { +- RETURN(short, ((short*)sp)[-1]); ++ RETURN(short, *(short*)i); + } else + if (l->rsize == sizeof(int)) { +- RETURN(int, ((int*)sp)[-1]); ++ RETURN(int, *(int*)i); + } else + if (l->rsize == sizeof(double)) { +- ((int*)l->raddr)[0] = ((int*)sp)[-2]; +- ((int*)l->raddr)[1] = ((int*)sp)[-1]; +- } else +- if (l->rsize % 4) { +- char* dstaddr = (char*)l->raddr; +- char* srcaddr = (char*)((long)sp - l->rsize); +- unsigned int count = l->rsize; +- if (count > 4) +- srcaddr = (char*)((long)srcaddr & -4); +- while (count > 0) { +- *dstaddr++ = *srcaddr++; +- count--; +- } ++ ((int*)l->raddr)[0] = ((int*)i)[0]; ++ ((int*)l->raddr)[1] = ((int*)i)[1]; + } else { +- __avword* dstaddr = (__avword*)l->raddr; +- __avword* srcaddr = (__avword*)((long)sp - l->rsize); +- while (srcaddr < sp) +- *dstaddr++ = *srcaddr++; ++ int n = (l->rsize + sizeof(__avword)-1)/sizeof(__avword); ++ while (--n >= 0) ++ ((__avword*)l->raddr)[n] = ((__avword*)i)[n]; + } + } else { +- if (l->flags & __AV_PCC_STRUCT_RETURN) { +- /* pcc struct return convention: need a *(TYPE*)l->raddr = *(TYPE*)i; */ ++ /* normal struct return convention */ ++ if (l->flags & __AV_SMALL_STRUCT_RETURN) { + if (l->rsize == sizeof(char)) { +- RETURN(char, *(char*)i); ++ RETURN(char, i); + } else + if (l->rsize == sizeof(short)) { +- RETURN(short, *(short*)i); ++ RETURN(short, i); + } else + if (l->rsize == sizeof(int)) { +- RETURN(int, *(int*)i); +- } else +- if (l->rsize == sizeof(double)) { +- ((int*)l->raddr)[0] = ((int*)i)[0]; +- ((int*)l->raddr)[1] = ((int*)i)[1]; +- } else { +- int n = (l->rsize + sizeof(__avword)-1)/sizeof(__avword); +- while (--n >= 0) +- ((__avword*)l->raddr)[n] = ((__avword*)i)[n]; +- } +- } else { +- /* normal struct return convention */ +- if (l->flags & __AV_SMALL_STRUCT_RETURN) { +- if (l->rsize == sizeof(char)) { +- RETURN(char, i); +- } else +- if (l->rsize == sizeof(short)) { +- RETURN(short, i); +- } else +- if (l->rsize == sizeof(int)) { +- RETURN(int, i); +- } ++ RETURN(int, i); + } + } + } diff --git a/devel/ffcall/patches/patch-ah b/devel/ffcall/patches/patch-ah new file mode 100644 index 00000000000..6b86bf98f10 --- /dev/null +++ b/devel/ffcall/patches/patch-ah @@ -0,0 +1,254 @@ +$NetBSD: patch-ah,v 1.1 2008/03/03 21:41:30 tnn Exp $ + +--- avcall/avcall-sparc.S.orig 1999-11-26 21:02:01.000000000 +0100 ++++ avcall/avcall-sparc.S +@@ -16,16 +16,11 @@ C(__builtin_avcall:) + cmp %o7, 16 + bne L3 + sra %g3, 2, %l0 +- ld [%i0+4], %g3 +- andcc %g3, 8, %g0 +- bne L87 +- cmp %l0, 6 + ld [%i0+8], %g3 + st %g3, [%l2-4] + L3: + cmp %l0, 6 +-L87: +- ble,a L88 ++ ble,a L66 + ld [%i0+12], %g3 + add %l0, -6, %l0 + add %i0, 40, %l1 +@@ -37,9 +32,9 @@ L7: + bne L7 + add %o7, 4, %o7 + ld [%i0+12], %g3 +-L88: ++L66: + cmp %g3, 16 +- bne,a L89 ++ bne,a L67 + ld [%i0], %g3 + ld [%i0+4], %g3 + andcc %g3, 16, %g0 +@@ -75,7 +70,7 @@ L88: + ld [%i0+60], %o5 + L9: + ld [%i0], %g3 +-L89: ++L67: + ld [%i0+40], %o0 + ld [%i0+44], %o1 + ld [%i0+48], %o2 +@@ -83,31 +78,31 @@ L89: + ld [%i0+56], %o4 + call %g3, 0 + ld [%i0+60], %o5 +- mov %o0, %l2 + nop + ld [%i0+12], %g3 + cmp %g3, 1 + be L11 ++ mov %o0, %l2 + cmp %g3, 0 +- be L84 ++ be L63 + cmp %g3, 2 +- be L85 ++ be L64 + cmp %g3, 3 +- be L85 ++ be L64 + cmp %g3, 4 +- be L85 ++ be L64 + cmp %g3, 5 +- be L86 ++ be L65 + cmp %g3, 6 +- be L86 ++ be L65 + cmp %g3, 7 +- be L84 ++ be L63 + cmp %g3, 8 +- be L84 ++ be L63 + cmp %g3, 9 +- be L84 ++ be L63 + cmp %g3, 10 +- be,a L90 ++ be,a L68 + ld [%i0+8], %g3 + ld [%i0+12], %o7 + add %o7, -11, %g3 +@@ -137,105 +132,38 @@ L34: + b L11 + std %f0, [%g3] + L38: +- be L84 ++ be L63 + cmp %o7, 16 + bne L11 + nop + ld [%i0+4], %g3 +- andcc %g3, 8, %g0 +- be L43 + andcc %g3, 1, %g0 ++ be L43 ++ andcc %g3, 2, %g0 + ld [%i0+16], %g3 + cmp %g3, 1 + bne L44 + cmp %g3, 2 + ld [%i0+8], %o7 +- ldub [%sp-1], %g3 ++ ldub [%l2], %g3 + b L11 + stb %g3, [%o7] + L44: + bne L46 + cmp %g3, 4 + ld [%i0+8], %o7 +- lduh [%sp-2], %g3 ++ lduh [%l2], %g3 + b L11 + sth %g3, [%o7] + L46: + bne L48 + cmp %g3, 8 + ld [%i0+8], %o7 +- ld [%sp-4], %g3 ++ ld [%l2], %g3 + b L11 + st %g3, [%o7] + L48: + bne L50 +- andcc %g3, 3, %g0 +- ld [%sp-8], %g3 +- ld [%i0+8], %o7 +- st %g3, [%o7] +- ld [%i0+8], %l0 +- ld [%sp-4], %g3 +- b L11 +- st %g3, [%l0+4] +-L50: +- be L52 +- sub %sp, %g3, %o7 +- ld [%i0+8], %i0 +- cmp %g3, 4 +- bleu L53 +- mov %g3, %l0 +- and %o7, -4, %o7 +-L53: +- cmp %g3, 0 +- be L11 +- nop +-L56: +- ldub [%o7], %g3 +- addcc %l0, -1, %l0 +- stb %g3, [%i0] +- add %o7, 1, %o7 +- bne L56 +- add %i0, 1, %i0 +- b,a L11 +-L52: +- cmp %o7, %sp +- bgeu L11 +- ld [%i0+8], %i0 +-L61: +- ld [%o7], %g3 +- add %o7, 4, %o7 +- st %g3, [%i0] +- cmp %o7, %sp +- blu L61 +- add %i0, 4, %i0 +- b,a L11 +-L43: +- be L64 +- andcc %g3, 2, %g0 +- ld [%i0+16], %g3 +- cmp %g3, 1 +- bne L65 +- cmp %g3, 2 +- ld [%i0+8], %o7 +- ldub [%l2], %g3 +- b L11 +- stb %g3, [%o7] +-L65: +- bne L67 +- cmp %g3, 4 +- ld [%i0+8], %o7 +- lduh [%l2], %g3 +- b L11 +- sth %g3, [%o7] +-L67: +- bne L69 +- cmp %g3, 8 +- ld [%i0+8], %o7 +- ld [%l2], %g3 +- b L11 +- st %g3, [%o7] +-L69: +- bne L71 + add %g3, 3, %g3 + ld [%l2], %g3 + ld [%i0+8], %o7 +@@ -244,43 +172,43 @@ L69: + ld [%l2+4], %g3 + b L11 + st %g3, [%l0+4] +-L71: ++L50: + srl %g3, 2, %l1 + addcc %l1, -1, %l1 + bneg L11 + sll %l1, 2, %l0 +-L75: ++L54: + ld [%l0+%l2], %o7 + addcc %l1, -1, %l1 + ld [%i0+8], %g3 + st %o7, [%g3+%l0] +- bpos L75 ++ bpos L54 + add %l0, -4, %l0 + b,a L11 +-L64: ++L43: + be L11 + nop + ld [%i0+16], %g3 + cmp %g3, 1 +- bne L79 ++ bne L58 + cmp %g3, 2 +-L85: ++L64: + ld [%i0+8], %g3 + b L11 + stb %l2, [%g3] +-L79: +- bne L81 ++L58: ++ bne L60 + cmp %g3, 4 +-L86: ++L65: + ld [%i0+8], %g3 + b L11 + sth %l2, [%g3] +-L81: ++L60: + bne L11 + nop +-L84: ++L63: + ld [%i0+8], %g3 +-L90: ++L68: + st %l2, [%g3] + L11: + ret diff --git a/devel/ffcall/patches/patch-ai b/devel/ffcall/patches/patch-ai new file mode 100644 index 00000000000..8aac6fcbb49 --- /dev/null +++ b/devel/ffcall/patches/patch-ai @@ -0,0 +1,13 @@ +$NetBSD: patch-ai,v 1.1 2008/03/03 21:41:30 tnn Exp $ + +--- avcall/avcall-sparc64.c.orig 2004-01-26 15:58:39.000000000 +0100 ++++ avcall/avcall-sparc64.c +@@ -185,7 +185,7 @@ __builtin_avcall(av_alist* l) + } + + /* call function with 1st 6 args */ +- i = ({ __avword iret; /* %o0 */ ++ i = ({ register __avword iret __asm__ ("%o0"); + iret = (*l->func)(l->args[0], l->args[1], l->args[2], + l->args[3], l->args[4], l->args[5]); + asm ("nop"); /* struct returning functions skip this instruction */ diff --git a/devel/ffcall/patches/patch-aj b/devel/ffcall/patches/patch-aj new file mode 100644 index 00000000000..e33593ca7ec --- /dev/null +++ b/devel/ffcall/patches/patch-aj @@ -0,0 +1,17 @@ +$NetBSD: patch-aj,v 1.1 2008/03/03 21:41:30 tnn Exp $ + +--- avcall/avcall-sparc64.S.orig 1999-11-26 21:28:33.000000000 +0100 ++++ avcall/avcall-sparc64.S +@@ -241,11 +241,11 @@ __builtin_avcall: + ldx [%i0+104], %o4 + call %g3, 0 + ldx [%i0+112], %o5 +- mov %o0, %g1 + nop + ld [%i0+24], %g3 + cmp %g3, 1 + be,pn %icc, .LL43 ++ mov %o0, %g1 + cmp %g3, 0 + be,pn %icc, .LL157 + cmp %g3, 2 |