--- sprng-2.0a.orig/cleanup.sh +++ sprng-2.0a/cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/sh +find lib -type f -name \*.a -mmin -10 | xargs rm -v +find SRC -type f -name \*.o -mmin -10 | xargs rm -v +find TESTS -type f -name \*.o -mmin -10 | xargs rm -v +find TESTS -type f -perm 755 | xargs rm -v +find EXAMPLES -type f -perm 755 | xargs rm -v --- sprng-2.0a.orig/make.CHOICES +++ sprng-2.0a/make.CHOICES @@ -30,14 +30,14 @@ #PLAT = CONVEX #PLAT = DEC #PLAT = HP -PLAT = INTEL +#PLAT = INTEL #PLAT = O2K #PLAT = SGI #PLAT = SP2 # IBM SP2 #PLAT = SUN # For T3D, Use PLAT=T3E instead #PLAT = T3E -#PLAT = GENERIC +PLAT = GENERIC ############################################################################ --- sprng-2.0a.orig/Makefile +++ sprng-2.0a/Makefile @@ -26,6 +26,12 @@ all : src examples tests +install: + install -d $(DESTDIR)/usr/lib + install -p $(SRCDIR)/../lib/libsprng.a $(DESTDIR)/usr/lib + install -d $(DESTDIR)/usr/include + install -p $(SRCDIR)/../include/* $(DESTDIR)/usr/include + src : (cd SRC; $(MAKE) ; cd ..) --- sprng-2.0a.orig/EXAMPLES/Makefile +++ sprng-2.0a/EXAMPLES/Makefile @@ -115,7 +115,7 @@ invalid_ID : invalid_ID.c $(LIBDIR)/lib$(SPRNGLIB).a $(CC) $(CFLAGS) -DCHECK_POINTERS -I$(INCDIR) -o invalid_ID invalid_ID.c -L$(LIBDIR) -l$(SPRNGLIB) $(GMPLIB) -sprngf : sprngf.$(FSUFFIX) $(LIBDIR)/lib$(SPRNGLIB).a +sprngf : sprngf.$(FSUFFIX) $(LIBDIR)/lib$(SPRNGLIB).so $(F77) $(FFLAGS) -I$(INCDIR) -o sprngf sprngf.$(FSUFFIX) -L$(LIBDIR) -l$(SPRNGLIB) $(GMPLIB) sprngf_mpi : sprngf_mpi.$(FSUFFIX) $(LIBDIR)/lib$(SPRNGLIB).a --- sprng-2.0a.orig/TESTS/Makefile +++ sprng-2.0a/TESTS/Makefile @@ -58,11 +58,10 @@ all : $(LIBDIR)/lib$(TESTLIB).a $(TESTLIST) -$(LIBDIR)/lib$(TESTLIB).a: init_tests.o util.o \ - chisquare.o stirling.o communicate.o - $(AR) $(ARFLAGS) $(LIBDIR)/lib$(TESTLIB).a \ - init_tests.o util.o chisquare.o stirling.o communicate.o +$(LIBDIR)/lib$(TESTLIB).a: init_tests.o chisquare.o stirling.o communicate.o + $(AR) $(ARFLAGS) $(LIBDIR)/lib$(TESTLIB).a init_tests.o chisquare.o stirling.o communicate.o $(RANLIB) $(LIBDIR)/lib$(TESTLIB).a + $(LD) -r -o $(LIBDIR)/lib$(TESTLIB).so init_tests.o chisquare.o stirling.o communicate.o init_tests.o : init_tests.c $(CC) -c $(CFLAGS) $(INCLUDEDIR) $(DEF) init_tests.c --- sprng-2.0a.orig/SRC/make.GENERIC +++ sprng-2.0a/SRC/make.GENERIC @@ -1,13 +1,13 @@ AR = ar ARFLAGS = cr #If your system has ranlib, then replace next statement with the one after it. -RANLIB = echo -#RANLIB = ranlib +# RANLIB = echo +RANLIB = ranlib CC = gcc CLD = $(CC) -F77 = f77 +F77 = g77 F77LD = $(F77) -FFXN = -DAdd_ +FFXN = -DAdd_ FSUFFIX = F MPIF77 = $(F77) @@ -26,9 +26,9 @@ # Try adding: -DGENERIC to CFLAGS. This can improve speed, but may give # incorrect values. Check with 'checksprng' to see if it works. -CFLAGS = -O $(PMLCGDEF) $(MPIDEF) +CFLAGS = -O -fpic $(PMLCGDEF) $(MPIDEF) ${GMPDEF} $(compilerflags) CLDFLAGS = -O -FFLAGS = -O $(PMLCGDEF) $(MPIDEF) +FFLAGS = -O $(PMLCGDEF) $(MPIDEF) ${GMPDEF} F77LDFLAGS = -O CPP = f77 -F --- sprng-2.0a.orig/SRC/pmlcg/pmlcg.c +++ sprng-2.0a/SRC/pmlcg/pmlcg.c @@ -30,7 +30,7 @@ #include "memory.h" #include "interface.h" #include "pmlcg.h" -#include "gmp.h" +#include #include "basic.h" #include @@ -72,9 +72,9 @@ #define NPARAMS 1 /*** number of valid parameters ***/ -int MAX_STREAMS = (1<<30); /* Maximum number of streams for initialization */ +int oldMAX_STREAMS = (1<<30); /* Maximum number of streams for initialization */ /* ... more streams can be spawned, though */ - +#define MAX_STREAMS (1<<30) struct rngen { --- sprng-2.0a.orig/SRC/pmlcg/longlong.h +++ sprng-2.0a/SRC/pmlcg/longlong.h @@ -153,8 +153,8 @@ #if (defined (__a29k__) || defined (_AM29K)) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add %1,%4,%5 - addc %0,%2,%3" \ + __asm__ ("add %1,%4,%5" + "\n addc %0,%2,%3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%r" ((USItype)(ah)), \ @@ -162,8 +162,8 @@ "%r" ((USItype)(al)), \ "rI" ((USItype)(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 subc %0,%2,%3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "r" ((USItype)(ah)), \ @@ -220,7 +220,7 @@ #if defined (__arm__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("adds %1, %4, %5 + __asm__ ("adds %1, %4, %5\n\ adc %0, %2, %3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ @@ -229,7 +229,7 @@ "%r" ((USItype)(al)), \ "rI" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subs %1, %4, %5 + __asm__ ("subs %1, %4, %5\n\ sbc %0, %2, %3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ @@ -238,18 +238,18 @@ "r" ((USItype)(al)), \ "rI" ((USItype)(bl))) #define umul_ppmm(xh, xl, a, b) \ - __asm__ ("%@ Inlined umul_ppmm - mov %|r0, %2, lsr #16 - mov %|r2, %3, lsr #16 - bic %|r1, %2, %|r0, lsl #16 - bic %|r2, %3, %|r2, lsl #16 - mul %1, %|r1, %|r2 - mul %|r2, %|r0, %|r2 - mul %|r1, %0, %|r1 - mul %0, %|r0, %0 - adds %|r1, %|r2, %|r1 - addcs %0, %0, #65536 - adds %1, %1, %|r1, lsl #16 + __asm__ ("%@ Inlined umul_ppmm\n\ + mov %|r0, %2, lsr #16\n\ + mov %|r2, %3, lsr #16\n\ + bic %|r1, %2, %|r0, lsl #16\n\ + bic %|r2, %3, %|r2, lsl #16\n\ + mul %1, %|r1, %|r2\n\ + mul %|r2, %|r0, %|r2\n\ + mul %|r1, %0, %|r1\n\ + mul %0, %|r0, %0\n\ + adds %|r1, %|r2, %|r1\n\ + addcs %0, %0, #65536\n\ + adds %1, %1, %|r1, lsl #16\n\ adc %0, %0, %|r1, lsr #16" \ : "=&r" ((USItype)(xh)), \ "=r" ((USItype)(xl)) \ @@ -290,8 +290,8 @@ #if defined (__gmicro__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add.w %5,%1 - addx %3,%0" \ + __asm__ ("add.w %5,%1" + "\n addx %3,%0" \ : "=g" ((USItype)(sh)), \ "=&g" ((USItype)(sl)) \ : "%0" ((USItype)(ah)), \ @@ -299,8 +299,8 @@ "%1" ((USItype)(al)), \ "g" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub.w %5,%1 - subx %3,%0" \ + __asm__ ("sub.w %5,%1" + "\n subx %3,%0" \ : "=g" ((USItype)(sh)), \ "=&g" ((USItype)(sl)) \ : "0" ((USItype)(ah)), \ @@ -329,8 +329,8 @@ #if defined (__hppa) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add %4,%5,%1 - addc %2,%3,%0" \ + __asm__ ("add %4,%5,%1\n\ + addc %2,%3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%rM" ((USItype)(ah)), \ @@ -338,8 +338,8 @@ "%rM" ((USItype)(al)), \ "rM" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub %4,%5,%1 - subb %2,%3,%0" \ + __asm__ ("sub %4,%5,%1\n\ + subb %2,%3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "rM" ((USItype)(ah)), \ @@ -377,22 +377,22 @@ do { \ USItype __tmp; \ __asm__ ( \ - "ldi 1,%0 - extru,= %1,15,16,%%r0 ; Bits 31..16 zero? - extru,tr %1,15,16,%1 ; No. Shift down, skip add. - ldo 16(%0),%0 ; Yes. Perform add. - extru,= %1,23,8,%%r0 ; Bits 15..8 zero? - extru,tr %1,23,8,%1 ; No. Shift down, skip add. - ldo 8(%0),%0 ; Yes. Perform add. - extru,= %1,27,4,%%r0 ; Bits 7..4 zero? - extru,tr %1,27,4,%1 ; No. Shift down, skip add. - ldo 4(%0),%0 ; Yes. Perform add. - extru,= %1,29,2,%%r0 ; Bits 3..2 zero? - extru,tr %1,29,2,%1 ; No. Shift down, skip add. - ldo 2(%0),%0 ; Yes. Perform add. - extru %1,30,1,%1 ; Extract bit 1. - sub %0,%1,%0 ; Subtract it. - " : "=r" (count), "=r" (__tmp) : "1" (x)); \ + "ldi 1,%0\n\ + extru,= %1,15,16,%%r0 ; Bits 31..16 zero?\n\ + extru,tr %1,15,16,%1 ; No. Shift down, skip add.\n\ + ldo 16(%0),%0 ; Yes. Perform add.\n\ + extru,= %1,23,8,%%r0 ; Bits 15..8 zero?\n\ + extru,tr %1,23,8,%1 ; No. Shift down, skip add.\n\ + ldo 8(%0),%0 ; Yes. Perform add.\n\ + extru,= %1,27,4,%%r0 ; Bits 7..4 zero?\n\ + extru,tr %1,27,4,%1 ; No. Shift down, skip add.\n\ + ldo 4(%0),%0 ; Yes. Perform add.\n\ + extru,= %1,29,2,%%r0 ; Bits 3..2 zero?\n\ + extru,tr %1,29,2,%1 ; No. Shift down, skip add.\n\ + ldo 2(%0),%0 ; Yes. Perform add.\n\ + extru %1,30,1,%1 ; Extract bit 1.\n\ + sub %0,%1,%0 ; Subtract it." \ + : "=r" (count), "=r" (__tmp) : "1" (x)); \ } while (0) #endif /* hppa */ @@ -439,7 +439,7 @@ #if (defined (__i386__) || defined (__i486__)) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addl %5,%1 + __asm__ ("addl %5,%1\n\ adcl %3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ @@ -448,7 +448,7 @@ "%1" ((USItype)(al)), \ "g" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subl %5,%1 + __asm__ ("subl %5,%1\n\ sbbl %3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ @@ -561,8 +561,8 @@ #if (defined (__mc68000__) || defined (__mc68020__) || defined (__NeXT__) || defined(mc68020)) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("add%.l %5,%1 - addx%.l %3,%0" \ + __asm__ ("add%.l %5,%1\n\ + addx%.l %3,%0" \ : "=d" ((USItype)(sh)), \ "=&d" ((USItype)(sl)) \ : "%0" ((USItype)(ah)), \ @@ -570,8 +570,8 @@ "%1" ((USItype)(al)), \ "g" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("sub%.l %5,%1 - subx%.l %3,%0" \ + __asm__ ("sub%.l %5,%1\n\ + subx%.l %3,%0" \ : "=d" ((USItype)(sh)), \ "=&d" ((USItype)(sl)) \ : "0" ((USItype)(ah)), \ @@ -609,28 +609,28 @@ #else /* not mc68020 */ #define umul_ppmm(xh, xl, a, b) \ do { USItype __umul_tmp1, __umul_tmp2; \ - __asm__ ("| Inlined umul_ppmm - move%.l %5,%3 - move%.l %2,%0 - move%.w %3,%1 - swap %3 - swap %0 - mulu %2,%1 - mulu %3,%0 - mulu %2,%3 - swap %2 - mulu %5,%2 - add%.l %3,%2 - jcc 1f - add%.l %#0x10000,%0 -1: move%.l %2,%3 - clr%.w %2 - swap %2 - swap %3 - clr%.w %3 - add%.l %3,%1 - addx%.l %2,%0 - | End inlined umul_ppmm" \ + __asm__ ("| Inlined umul_ppmm\n\ + move%.l %5,%3\n\ + move%.l %2,%0\n\ + move%.w %3,%1\n\ + swap %3\n\ + swap %0\n\ + mulu %2,%1\n\ + mulu %3,%0\n\ + mulu %2,%3\n\ + swap %2\n\ + mulu %5,%2\n\ + add%.l %3,%2\n\ + jcc 1f\n\ + add%.l %#0x10000,%0\n\ + 1: move%.l %2,%3\n\ + clr%.w %2\n\ + swap %2\n\ + swap %3\n\ + clr%.w %3\n\ + add%.l %3,%1\n\ + addx%.l %2,%0\n\ + | End inlined umul_ppmm " : "=&d" ((USItype)(xh)), "=&d" ((USItype)(xl)), \ "=d" (__umul_tmp1), "=&d" (__umul_tmp2) \ : "%2" ((USItype)(a)), "d" ((USItype)(b))); \ @@ -642,8 +642,8 @@ #if defined (__m88000__) && W_TYPE_SIZE == 32 #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\ + addu.ci %0,%r2,%r3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%rJ" ((USItype)(ah)), \ @@ -651,8 +651,8 @@ "%rJ" ((USItype)(al)), \ "rJ" ((USItype)(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\ + subu.ci %0,%r2,%r3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "rJ" ((USItype)(ah)), \ @@ -701,23 +701,12 @@ #endif /* __m88000__ */ #if defined (__mips__) && W_TYPE_SIZE == 32 -#if __GNUC__ > 2 || __GNUC_MINOR__ >= 7 -#define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3" \ - : "=l" ((USItype)(w0)), \ - "=h" ((USItype)(w1)) \ - : "d" ((USItype)(u)), \ - "d" ((USItype)(v))) -#else -#define umul_ppmm(w1, w0, u, v) \ - __asm__ ("multu %2,%3 - mflo %0 - mfhi %1" \ - : "=d" ((USItype)(w0)), \ - "=d" ((USItype)(w1)) \ - : "d" ((USItype)(u)), \ - "d" ((USItype)(v))) -#endif +#define umul_ppmm(w1, w0, u, v) \ + do { \ + UDItype __x = (UDItype) (USItype) (u) * (USItype) (v); \ + (w1) = (USItype) (__x >> 32); \ + (w0) = (USItype) (__x); \ + } while (0) #define UMUL_TIME 10 #define UDIV_TIME 100 #endif /* __mips__ */ @@ -732,9 +721,9 @@ "d" ((UDItype)(v))) #else #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("dmultu %2,%3 - mflo %0 - mfhi %1" \ + __asm__ ("dmultu %2,%3" + "\n mflo %0" + "\n mfhi %1" \ : "=d" ((UDItype)(w0)), \ "=d" ((UDItype)(w1)) \ : "d" ((UDItype)(u)), \ @@ -902,8 +891,8 @@ #if defined (__pyr__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addw %5,%1 - addwc %3,%0" \ + __asm__ ("addw %5,%1" + "\n addwc %3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%0" ((USItype)(ah)), \ @@ -911,8 +900,8 @@ "%1" ((USItype)(al)), \ "g" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subw %5,%1 - subwb %3,%0" \ + __asm__ ("subw %5,%1" + "\n subwb %3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "0" ((USItype)(ah)), \ @@ -924,8 +913,8 @@ ({union {UDItype __ll; \ struct {USItype __h, __l;} __i; \ } __xx; \ - __asm__ ("movw %1,%R0 - uemul %2,%0" \ + __asm__ ("movw %1,%R0" + "\n uemul %2,%0" \ : "=&r" (__xx.__ll) \ : "g" ((USItype) (u)), \ "g" ((USItype)(v))); \ @@ -934,8 +923,8 @@ #if defined (__ibm032__) /* RT/ROMP */ && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("a %1,%5 - ae %0,%3" \ + __asm__ ("a %1,%5" + "\n ae %0,%3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%0" ((USItype)(ah)), \ @@ -943,8 +932,8 @@ "%1" ((USItype)(al)), \ "r" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("s %1,%5 - se %0,%3" \ + __asm__ ("s %1,%5" + "\n se %0,%3" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "0" ((USItype)(ah)), \ @@ -955,26 +944,26 @@ do { \ USItype __m0 = (m0), __m1 = (m1); \ __asm__ ( \ - "s r2,r2 - mts r10,%2 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - m r2,%3 - cas %0,r2,r0 - 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" ((USItype)(ph)), \ "=r" ((USItype)(pl)) \ : "%r" (__m0), \ @@ -1004,9 +993,9 @@ #if defined (__sh2__) && W_TYPE_SIZE == 32 #define umul_ppmm(w1, w0, u, v) \ __asm__ ( \ - "dmulu.l %2,%3 - sts macl,%1 - sts mach,%0" \ + "dmulu.l %2,%3" + "\n sts macl,%1" + "\n sts mach,%0" \ : "=r" ((USItype)(w1)), \ "=r" ((USItype)(w0)) \ : "r" ((USItype)(u)), \ @@ -1017,8 +1006,8 @@ #if defined (__sparc__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addcc %r4,%5,%1 - addx %r2,%3,%0" \ + __asm__ ("addcc %r4,%5,%1\n\ + addx %r2,%3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "%rJ" ((USItype)(ah)), \ @@ -1027,8 +1016,8 @@ "rI" ((USItype)(bl)) \ __CLOBBER_CC) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subcc %r4,%5,%1 - subx %r2,%3,%0" \ + __asm__ ("subcc %r4,%5,%1\n\ + subx %r2,%3,%0" \ : "=r" ((USItype)(sh)), \ "=&r" ((USItype)(sl)) \ : "rJ" ((USItype)(ah)), \ @@ -1074,45 +1063,45 @@ "r" ((USItype)(v))) #define UMUL_TIME 5 #define udiv_qrnnd(q, r, n1, n0, d) \ - __asm__ ("! Inlined udiv_qrnnd - wr %%g0,%2,%%y ! Not a delayed write for sparclite - tst %%g0 - divscc %3,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%%g1 - divscc %%g1,%4,%0 - rd %%y,%1 - bl,a 1f - add %1,%4,%1 -1: ! End of inline udiv_qrnnd" \ + __asm__ ("! Inlined udiv_qrnnd\n\ + wr %%g0,%2,%%y ! Not a delayed write for sparclite\n\ + tst %%g0\n\ + divscc %3,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%%g1\n\ + divscc %%g1,%4,%0\n\ + rd %%y,%1\n\ + bl,a 1f\n\ + add %1,%4,%1\n\ + 1: ! End of inline udiv_qrnnd" \ : "=r" ((USItype)(q)), \ "=r" ((USItype)(r)) \ : "r" ((USItype)(n1)), \ @@ -1132,45 +1121,45 @@ /* Default to sparc v7 versions of umul_ppmm and udiv_qrnnd. */ #ifndef umul_ppmm #define umul_ppmm(w1, w0, u, v) \ - __asm__ ("! Inlined umul_ppmm - wr %%g0,%2,%%y ! SPARC has 0-3 delay insn after a wr - sra %3,31,%%g2 ! Don't move this insn - and %2,%%g2,%%g2 ! Don't move this insn - andcc %%g0,0,%%g1 ! Don't move this insn - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,%3,%%g1 - mulscc %%g1,0,%%g1 - add %%g1,%%g2,%0 + __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" ((USItype)(w1)), \ "=r" ((USItype)(w0)) \ @@ -1194,8 +1183,8 @@ #if defined (__vax__) && W_TYPE_SIZE == 32 #define add_ssaaaa(sh, sl, ah, al, bh, bl) \ - __asm__ ("addl2 %5,%1 - adwc %3,%0" \ + __asm__ ("addl2 %5,%1" + "\n adwc %3,%0" \ : "=g" ((USItype)(sh)), \ "=&g" ((USItype)(sl)) \ : "%0" ((USItype)(ah)), \ @@ -1203,8 +1192,8 @@ "%1" ((USItype)(al)), \ "g" ((USItype)(bl))) #define sub_ddmmss(sh, sl, ah, al, bh, bl) \ - __asm__ ("subl2 %5,%1 - sbwc %3,%0" \ + __asm__ ("subl2 %5,%1" + "\n sbwc %3,%0" \ : "=g" ((USItype)(sh)), \ "=&g" ((USItype)(sl)) \ : "0" ((USItype)(ah)), \ --- sprng-2.0a.orig/SRC/pmlcg/Makefile +++ sprng-2.0a/SRC/pmlcg/Makefile @@ -23,7 +23,7 @@ all : pmlcg.o -pmlcg.o : $(SRCDIR)/interface.h pmlcg.c pmlcg.h $(SRCDIR)/memory.h basic.h info.h gmp.h longlong.h $(SRCDIR)/store.h $(SRCDIR)/fwrap_.h +pmlcg.o : $(SRCDIR)/interface.h pmlcg.c pmlcg.h $(SRCDIR)/memory.h basic.h info.h longlong.h $(SRCDIR)/store.h $(SRCDIR)/fwrap_.h $(CC) -c $(CFLAGS) $(FFXN) $(INLINEOPT) pmlcg.c -I$(SRCDIR) clean : --- sprng-2.0a.orig/SRC/sprng/Makefile +++ sprng-2.0a/SRC/sprng/Makefile @@ -21,7 +21,7 @@ include $(SRCDIR)/make.$(PLAT) -all : sprng timesprng checksprng +all : sprng # timesprng checksprng #--------------------------------------------------------------------------- @@ -44,16 +44,23 @@ $(LIBDIR)/libsprng.a : sprng.o \ $(SRCDIR)/lcg/lcg.o $(SRCDIR)/lfg/lfg.o \ $(SRCDIR)/lcg64/lcg64.o \ - $(SRCDIR)/mlfg/mlfg.o $(SRCDIR)/cmrg/cmrg.o \ $(SRCDIR)/pmlcg/pmlcg.o \ + $(SRCDIR)/mlfg/mlfg.o $(SRCDIR)/cmrg/cmrg.o \ $(SPRNG_COMMON_DEPEND) $(AR) $(ARFLAGS) $(LIBDIR)/libsprng.a sprng.o \ $(SRCDIR)/lcg/lcg.o $(SRCDIR)/lfg/lfg.o \ $(SRCDIR)/lcg64/lcg64.o \ - $(SRCDIR)/mlfg/mlfg.o $(SRCDIR)/cmrg/cmrg.o \ $(SRCDIR)/pmlcg/pmlcg.o \ + $(SRCDIR)/mlfg/mlfg.o $(SRCDIR)/cmrg/cmrg.o \ $(SPRNG_COMMON_DEPEND) $(RANLIB) $(LIBDIR)/libsprng.a + $(CC) -shared -Wl,-soname,libsprng.so.2 \ + -o $(LIBDIR)/libsprng.so.2.0 sprng.o \ + $(SRCDIR)/lcg/lcg.o $(SRCDIR)/lfg/lfg.o \ + $(SRCDIR)/lcg64/lcg64.o \ + $(SRCDIR)/pmlcg/pmlcg.o \ + $(SRCDIR)/mlfg/mlfg.o $(SRCDIR)/cmrg/cmrg.o \ + $(SPRNG_COMMON_DEPEND) $(GMPLIB) sprng.o : $(SRCDIR)/interface.h sprng.c $(SRCDIR)/memory.h \ $(SRCDIR)/multiply.h $(SRCDIR)/store.h $(SRCDIR)/fwrap_.h --- sprng-2.0a.orig/debian/changelog +++ sprng-2.0a/debian/changelog @@ -0,0 +1,87 @@ +sprng (2.0a-8ubuntu1) precise; urgency=low + + * Use -Wa,-mimplicit-it=thumb on armel as well for now, since Ubuntu's + armel requires Thumb-2 interworking (LP: #791238). + + -- Colin Watson Thu, 19 Apr 2012 16:41:25 +0100 + +sprng (2.0a-8build1) precise; urgency=low + + * No-change rebuild against current pkgbinarymangler to fix broken + md5sums. (see LP #875466) + + -- Martin Pitt Wed, 29 Feb 2012 09:07:40 +0100 + +sprng (2.0a-8) unstable; urgency=low + + * debian/rules, SRC/make.GENERIC: Applied patch kindly supplied by + Konstantinos Margaritis to address a build regression on armhf systems + (Closes: #627254) + + * debian/control: Removed article from beginning of Description: + [lintian] + + -- Dirk Eddelbuettel Wed, 18 May 2011 19:10:54 -0500 + +sprng (2.0a-7) unstable; urgency=low + + * SRC/pmlcg/longlong.h: Applied patch kindly supplied by Aurelien Jarno + to address builds on mips/mipsel with recent gcc versions (>= 4.4) + (Closes: #623015) + + -- Dirk Eddelbuettel Sat, 16 Apr 2011 12:25:34 -0500 + +sprng (2.0a-6) unstable; urgency=low + + * debian/control: Updated Build-Depends: to libgmp-dev + * debian/control: Updated Standards-Version: to 3.9.1 + + -- Dirk Eddelbuettel Sun, 06 Mar 2011 10:13:54 -0600 + +sprng (2.0a-5) unstable; urgency=low + + * debian/control: Changed Section: of libsprng2-doc to 'doc' to satisfy + a Lintian warning and a wishlist bug report (Closes: #515925) + + * debian/control: Updated Standards-Version: to 3.8.0 + + * debian/copyright: Updated to newer format + + -- Dirk Eddelbuettel Wed, 18 Feb 2009 20:22:14 -0600 + +sprng (2.0a-4) unstable; urgency=low + + * debian/control: Changed use ${binary:Version} and ${source:Version} to + allow for binNMUs. Thanks to Lior Kaplan for the patch (Closes: #437501) + * debian/control: Set Depends: of -doc toe (>= ${source:Version}) [lintian] + + * debian/control: Upgraded Standards-Version: to 3.7.2 + * debian/compat: Created, set version to 5 + * debian/control: Upgraded Build-Depends to debhelper (>= 5.0.0) + * debian/rules: Changed 'make realclean' invocation [lintian] + + -- Dirk Eddelbuettel Sun, 12 Aug 2007 18:10:28 -0500 + +sprng (2.0a-3) unstable; urgency=low + + * SRC/sprng/Makefile: Add $(GMPLIB) to libsprng build (Closes: #318050) + * SRC/{make.GENERIC: Add ${GMPDEF} to CFLAGS and FFLAGS + * debian/control: Added libgmp3-dev to Depends for libsprng2-dev + (Closes: #318051) + * debian/control: Increase Standards-Version: to 3.6.2.1 + + -- Dirk Eddelbuettel Sun, 17 Jul 2005 10:58:54 -0500 + +sprng (2.0a-2) unstable; urgency=low + + * SRC/pmlcg/longlong.h: more patching for multi-line string literals + + -- Dirk Eddelbuettel Thu, 15 Jul 2004 13:27:14 -0500 + +sprng (2.0a-1) unstable; urgency=low + + * Initial Debian packaging + + -- Dirk Eddelbuettel Mon, 5 Jul 2004 21:26:37 -0500 + + --- sprng-2.0a.orig/debian/rules +++ sprng-2.0a/debian/rules @@ -0,0 +1,143 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# debian/rules file for the Debian/GNU Linux sprng package +# Copyright (C) 2004-2007 by Dirk Eddelbuettel + +source := $(shell head -1 debian/changelog | awk '{print $$1}') +sonum := 2 +libpack := lib$(source)$(sonum) +devpack := $(libpack)-dev +#binpack := $(source)-bin +#docpack := $(source)-doc-pdf +debtmp := $(CURDIR)/debian/$(libpack) +debdoc := $(CURDIR)/debian/$(docpack) +arch := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) + +DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH) +ifneq (,$(filter armel armhf,$(DEB_HOST_ARCH))) +export compilerflags = -O2 -D_REENTRANT -Wa,-mimplicit-it=thumb +else +export compilerflags = -O2 -D_REENTRANT +endif + +#export DH_VERBOSE=1 +#export DH_COMPAT=3 + +upstream: get-orig-source +get-orig-source: + #lynx ftp://sources.redhat.com/pub/gsl + lynx http://sprng.cs.fsu.edu/ + +build: build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + #$(MAKE) + ## NB 'make src' makes just the library + $(MAKE) src + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp + + [ ! -f Makefile ] || $(MAKE) realclean + + # An executable forgotten in the upstream sources + rm -rvf EXAMPLES/sprngD SRC/check_gen_simple SRC/check_gen_ptr + + dh_clean + +install: +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs usr/lib usr/include/sprng + + # Add here commands to install the package into debian/tmp. + #$(MAKE) prefix=`pwd`/debian/tmp/usr install + ## NB 'make install' doesn't work as it doesn't honour $PREFIX + make -n install + ## so do it all by hand + cp -vax lib/libsprng.so.2.0 $(debtmp)/usr/lib/ + (cd $(debtmp)/usr/lib && \ + ln -s libsprng.so.$(sonum).0 libsprng.so.$(sonum) && \ + ln -s libsprng.so.$(sonum).0 libsprng.so ) + cp -vax lib/libsprng.a $(debtmp)/usr/lib + cp -vax include/* $(debtmp)/usr/include/sprng + + #dh_install + # use older dh_movefiles instead + dh_movefiles --sourcedir=debian/$(libpack) + # silence lintian + rmdir -v debian/$(libpack)/usr/include/sprng + rmdir -v debian/$(libpack)/usr/include + +# Build architecture-independent files here. +binary-indep: #build install + dh_testdir -i + dh_testroot -i + dh_installchangelogs -i + dh_installdocs -i DOCS/ TESTS/ EXAMPLES/ +# dh_installexamples -i +# dh_installmenu -i +# dh_installdebconf -i +# dh_installlogrotate -i +# dh_installemacsen -i +# dh_installcatalogs -i +# dh_installpam -i +# dh_installmime -i +# dh_installinit -i +# dh_installcron -i +# dh_installinfo -i +# dh_undocumented -i + dh_installman -i + dh_link -i + dh_compress -i + dh_fixperms -i +# dh_perl -i +# dh_python -i + dh_installdeb -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a + dh_installchangelogs -a + dh_installdocs -a + dh_installexamples -a + dh_installmenu -a +# dh_installdebconf -a +# dh_installlogrotate -a +# dh_installemacsen -a +# dh_installcatalogs -a +# dh_installpam -a +# dh_installmime -a +# dh_installinit -a +# dh_installcron -a +# dh_installinfo -a +# dh_undocumented -a + dh_installman -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a +# dh_perl -a +# dh_python -a + dh_makeshlibs -a + dh_installdeb -a + dh_shlibdeps -a + dh_gencontrol -a + dh_md5sums -a + dh_builddeb -a + +#binary: binary-indep binary-arch +binary: binary-arch binary-indep +.PHONY: build clean binary-indep binary-arch binary install --- sprng-2.0a.orig/debian/libsprng2.shlibs +++ sprng-2.0a/debian/libsprng2.shlibs @@ -0,0 +1 @@ +libsprng 2 libsprng2 --- sprng-2.0a.orig/debian/compat +++ sprng-2.0a/debian/compat @@ -0,0 +1 @@ +5 \ No newline at end of file --- sprng-2.0a.orig/debian/libsprng2-dev.files +++ sprng-2.0a/debian/libsprng2-dev.files @@ -0,0 +1,3 @@ +usr/include/sprng +usr/lib/lib*.so +usr/lib/lib*.a --- sprng-2.0a.orig/debian/control +++ sprng-2.0a/debian/control @@ -0,0 +1,48 @@ +Source: sprng +Section: math +Priority: optional +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Dirk Eddelbuettel +Standards-Version: 3.9.1 +Build-Depends: debhelper (>= 5.0.0), libgmp-dev + +Package: libsprng2 +Section: math +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: SPRNG Scalable Parallel RNG library -- library package + The SPRNG (Scalable Parallel Random Number Generator) library provides + several RNGs that are suitable for use in parallel computing. + . + URL: http://sprng.cs.fsu.edu + . + This package provides the shared libraries needed to execute programs + built with SPRNG. + +Package: libsprng2-dev +Section: libdevel +Architecture: any +Depends: ${misc:Depends}, libsprng2 (= ${binary:Version}), libgmp-dev +Suggests: libsprng2-doc +Description: SPRNG Scalable Parallel RNG library -- development package + The SPRNG (Scalable Parallel Random Number Generator) library provides + several RNGs that are suitable for use in parallel computing. + . + URL: http://sprng.cs.fsu.edu + . + This package contains the header files, static libraries and symbolic + links that are need to compile programs using the SPRNG library. + +Package: libsprng2-doc +Section: doc +Architecture: all +Depends: ${misc:Depends}, libsprng2 (>= ${source:Version}) +Description: SPRNG Scalable Parallel RNG library -- documentation package + The SPRNG (Scalable Parallel Random Number Generator) library provides + several RNGs that are suitable for use in parallel computing. + . + URL: http://sprng.cs.fsu.edu + . + This package contains files from the docs, examples and tests + directories included in the source distribution. + --- sprng-2.0a.orig/debian/copyright +++ sprng-2.0a/debian/copyright @@ -0,0 +1,58 @@ +This is the Debian GNU/Linux prepackaged version of the SPRNG +(Scalable Parallel Random Number Generator) library. SPRNG version +1.0 was written by David Ceperley, Michael Mascagni, Lubos Mitas, +Faisal Saied and Ashok Srinivasan at the University of Illinois at +Urbana-Champaign. SPRNG 2.0 was written by Michael Mascagni and Chi-Ok +Hwang. + +This package was created by Dirk Eddelbuettel , with +ample help by Kai Hendry and elijah wright +. The original sources can be obtained at + + http://sprng.cs.fsu.edu/main.html + http://sprng.cs.fsu.edu/SPRNGmain.html + +There is no direct copyright or license statement in the sources, but +the main parallel random number generators in SRC/*/ carry statements +like the following (from SRC/mlfg/mlfg.c): + + /*************************************************************************/ + /* Parallel Multiplicative Lagged Fibonacci Generator */ + /* */ + /* Author: Ashok Srinivasan, */ + /* NCSA, University of Illinois, Urbana-Champaign */ + /* E-Mail: ashoks@ncsa.uiuc.edu */ + /* */ + /* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ + /* or implied, concerning the enclosed software. The intent in sharing */ + /* this software is to promote the productive interchange of ideas */ + /* throughout the research community. All software is furnished on an */ + /* "as is" basis. No further updates to this software should be */ + /* expected. Although this may occur, no commitment exists. The authors */ + /* certainly invite your comments as well as the reporting of any bugs. */ + /* NCSA cannot commit that any or all bugs will be fixed. */ + /*************************************************************************/ + +Copyright (C) 1996 - 1999 David Ceperley, Michael Mascagni, Lubos Mitas, Faisal Saied and Ashok Srinivasan +Copyright (C) 1999 Michael Mascagni and Chi-Ok Hwang + +Portions Copyright (C) 1999 Steven A. Cuccaro and Daniel V. Pryor + +Portions Copyright (C) 1996 United States Government as Represented by the Director, National Security Agency + +Portions Copyright (C) 1991 - 1996 Free Software Foundation + +License: LGPL-2 for GMP, see below for SPRNG + + /* Disclaimer: NCSA expressly disclaims any and all warranties, expressed*/ + /* or implied, concerning the enclosed software. The intent in sharing */ + /* this software is to promote the productive interchange of ideas */ + /* throughout the research community. All software is furnished on an */ + /* "as is" basis. No further updates to this software should be */ + /* expected. Although this may occur, no commitment exists. The authors */ + /* certainly invite your comments as well as the reporting of any bugs. */ + /* NCSA cannot commit that any or all bugs will be fixed. */ + + +On a Debian GNU/Linux system, the LGPL-2 license is included in the file +/usr/share/common-licenses/LGPL-2.