]> www.ginac.de Git - cln.git/commitdiff
* src/base/digitseq/cl_asm.h: Test if (intDsize==32) for MIPS and HPPA,
authorRichard Kreckel <kreckel@ginac.de>
Mon, 13 Nov 2000 16:16:54 +0000 (16:16 +0000)
committerRichard Kreckel <kreckel@ginac.de>
Mon, 13 Nov 2000 16:16:54 +0000 (16:16 +0000)
          in order to guard against an accidented configuration.
        * src/integer/conv/cl_I_to_digits.cc (table): member b_hoch_k of
          struct power_table_entry initialized as ULL instead of as UL, if
          intDsize==64 (caused misprinting on MIPS w/ GMP).
        * src/base/cl_macros.h (minus_bitm, bitc): implemented ULL, if
          HAVE_FAST_LONGLONG.
        * src/integer/bitwise/cl_I_mkfx.cc (mkf_extract): Likewise.
        * src/integer/conv/cl_I_from_L.cc (cl_I_from_L): Added trival
          generation of Bignum for intDsize==64 and a notreached-check at end.
        * autoconf/config.guess, autoconf/config.sub: updated from FSF.
        * include/cln/config.h.in: Prepared support for IA64.
        * include/cln/types.h: Likewise.
        * include/cln/object.h: Likewise.
        * include/cln/modules.h: Likewise.
        * src/base/cl_macros.h (nonreturning_function): Likewise (NUE's
          compiler claims __GNUC_MINOR__==9).
        * src/base/cl_macros.h (bit, minus_bit): changed criterion for ULL from
          HAVE_DD to HAVE_FAST_LONGLONG.
        * src/base/cl_macros.h (bitm): implemented ULL, if HAVE_FAST_LONGLONG.
        * src/base/cl_low.h: actually no need to include "cln/types.h" here.
        * src/base/cl_low.h (logcount_64): always ULL, independent of HAVE_DD.
        * src/base/random/cl_UL_random.cc (random32): a is always ULL.

14 files changed:
ChangeLog
autoconf/config.guess
autoconf/config.sub
include/cln/config.h.in
include/cln/modules.h
include/cln/object.h
include/cln/types.h
src/base/cl_low.h
src/base/cl_macros.h
src/base/digitseq/cl_asm.h
src/base/random/cl_UL_random.cc
src/integer/bitwise/cl_I_mkfx.cc
src/integer/conv/cl_I_from_L.cc
src/integer/conv/cl_I_to_digits.cc

index 4284ffb6c0b8cca505464a91e1260b34c8e791e5..487d7dd014d29decd270690e60159019c54a7709 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2000-11-13  Richard Kreckel  <kreckel@ginac.de>
+
+        * src/base/digitseq/cl_asm.h: Test if (intDsize==32) for MIPS and HPPA,
+          in order to guard against an accidented configuration.
+        * src/integer/conv/cl_I_to_digits.cc (table): member b_hoch_k of 
+          struct power_table_entry initialized as ULL instead of as UL, if 
+          intDsize==64 (caused misprinting on MIPS w/ GMP).
+        * src/base/cl_macros.h (minus_bitm, bitc): implemented ULL, if 
+          HAVE_FAST_LONGLONG.
+        * src/integer/bitwise/cl_I_mkfx.cc (mkf_extract): Likewise.
+        * src/integer/conv/cl_I_from_L.cc (cl_I_from_L): Added trival 
+          generation of Bignum for intDsize==64 and a notreached-check at end.
+        * autoconf/config.guess, autoconf/config.sub: updated from FSF.
+        * include/cln/config.h.in: Prepared support for IA64.
+        * include/cln/types.h: Likewise.
+        * include/cln/object.h: Likewise.
+        * include/cln/modules.h: Likewise.
+        * src/base/cl_macros.h (nonreturning_function): Likewise (NUE's 
+          compiler claims __GNUC_MINOR__==9).
+
+2000-11-03  Richard Kreckel  <kreckel@ginac.de>
+
+        * src/base/cl_macros.h (bit, minus_bit): changed criterion for ULL from
+          HAVE_DD to HAVE_FAST_LONGLONG.
+        * src/base/cl_macros.h (bitm): implemented ULL, if HAVE_FAST_LONGLONG.
+        * src/base/cl_low.h: actually no need to include "cln/types.h" here.
+        * src/base/cl_low.h (logcount_64): always ULL, independent of HAVE_DD.
+        * src/base/random/cl_UL_random.cc (random32): a is always ULL.
+
 2000-11-01  Richard Kreckel  <kreckel@ginac.de>
 
         * include/cln/object.h (cl_combine): define additional signatures, if
index 81688c4cf1a4a470eb9f1166cc5146dbc69c8404..42cd3fec9792788af50670ca3537573a3fc87f1d 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
 
-version='2000-07-27'
+version='2000-11-08'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -669,6 +669,9 @@ EOF
     i*:MINGW*:*)
        echo ${UNAME_MACHINE}-pc-mingw32
        exit 0 ;;
+    i*:PW*:*)
+       echo ${UNAME_MACHINE}-pc-pw32
+       exit 0 ;;
     i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
        # How do we know it's Interix rather than the generic POSIX subsystem?
        # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
@@ -695,8 +698,7 @@ EOF
        # The BFD linker knows what the default object file format is, so
        # first see if it will tell us. cd to the root directory to prevent
        # problems with other programs or directories called `ld' in the path.
-       ld_help_string=`cd /; ld --help 2>&1`
-       ld_supported_emulations=`echo $ld_help_string \
+       ld_supported_emulations=`cd /; ld --help 2>&1 \
                         | sed -ne '/supported emulations:/!d
                                    s/[         ][      ]*/ /g
                                    s/.*supported emulations: *//
@@ -722,6 +724,10 @@ EOF
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
                exit 0
                ;;
+         elf32_sparc)
+               echo "${UNAME_MACHINE}-unknown-linux-gnu"
+               exit 0
+               ;;
          armlinux)
                echo "${UNAME_MACHINE}-unknown-linux-gnuaout"
                exit 0
@@ -855,14 +861,30 @@ EOF
          rm -f $dummy.c $dummy
        elif test "${UNAME_MACHINE}" = "s390"; then
          echo s390-ibm-linux && exit 0
+       elif test "${UNAME_MACHINE}" = "x86_64"; then
+         echo x86_64-unknown-linux-gnu && exit 0
+       elif test "${UNAME_MACHINE}" = "parisc" -o "${UNAME_MACHINE}" = "hppa"; then
+         # Look for CPU level
+         case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+           PA7*)
+               echo hppa1.1-unknown-linux-gnu
+               ;;
+           PA8*)
+               echo hppa2.0-unknown-linux-gnu
+               ;;
+           *)
+               echo hppa-unknown-linux-gnu
+               ;;
+         esac
+         exit 0
        else
          # Either a pre-BFD a.out linker (linux-gnuoldld)
          # or one that does not give us useful --help.
          # GCC wants to distinguish between linux-gnuoldld and linux-gnuaout.
          # If ld does not provide *any* "supported emulations:"
          # that means it is gnuoldld.
-         echo "$ld_help_string" | grep >/dev/null 2>&1 "supported emulations:"
-         test $? != 0 && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
+         test -z "$ld_supported_emulations" \
+           && echo "${UNAME_MACHINE}-pc-linux-gnuoldld" && exit 0
 
          case "${UNAME_MACHINE}" in
          i?86)
@@ -977,7 +999,7 @@ EOF
        exit 0 ;;
     M68*:*:R3V[567]*:*)
        test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
        OS_REL=''
        test -r /etc/.relid \
        && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
@@ -1036,7 +1058,7 @@ EOF
     mc68*:A/UX:*:*)
        echo m68k-apple-aux${UNAME_RELEASE}
        exit 0 ;;
-    news*:NEWS-OS:*:6*)
+    news*:NEWS-OS:6*:*)
        echo mips-sony-newsos6
        exit 0 ;;
     R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
@@ -1079,9 +1101,12 @@ EOF
     *:QNX:*:4*)
        echo i386-pc-qnx
        exit 0 ;;
-    NSR-W:NONSTOP_KERNEL:*:*)
+    NSR-[KW]:NONSTOP_KERNEL:*:*)
        echo nsr-tandem-nsk${UNAME_RELEASE}
        exit 0 ;;
+    *:NonStop-UX:*:*)
+       echo mips-compaq-nonstopux
+       exit 0 ;;
     BS2000:POSIX*:*:*)
        echo bs2000-siemens-sysv
        exit 0 ;;
index 945a7f4b8588f5328dc68461f1706008ac873859..ac1c2b518725465d06f62c961327fecedc6a7e87 100755 (executable)
@@ -3,7 +3,7 @@
 #   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000
 #   Free Software Foundation, Inc.
 
-version='2000-08-07'
+version='2000-11-04'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -105,7 +105,7 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
-  nto-qnx* | linux-gnu*)
+  nto-qnx* | linux-gnu* | storm-chaos*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
     ;;
@@ -204,7 +204,7 @@ case $basic_machine in
        # Recognize the basic CPU types without company name.
        # Some are omitted here because they have special meanings below.
        tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc | arm \
-               | arme[lb] | armv* | pyramid | mn10200 | mn10300 | tron | a29k \
+               | arme[lb] | armv[2345] | armv[345][lb] | pyramid | mn10200 | mn10300 | tron | a29k \
                | 580 | i960 | h8300 \
                | x86 | ppcbe | mipsbe | mipsle | shbe | shle | armbe | armle \
                | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \
@@ -232,7 +232,7 @@ case $basic_machine in
        # We use `pc' rather than `unknown'
        # because (1) that's what they normally are, and
        # (2) the word "unknown" tends to confuse beginning users.
-       i[234567]86)
+       i[234567]86 | x86_64)
          basic_machine=$basic_machine-pc
          ;;
        # Object if more than one company name word.
@@ -262,7 +262,7 @@ case $basic_machine in
              | f301-* | armv*-* | s390-* | sv1-* | t3e-* \
              | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \
              | thumb-* | v850-* | d30v-* | tic30-* | c30-* | fr30-* \
-             | bs2000-* | tic54x-* | c54x-*)
+             | bs2000-* | tic54x-* | c54x-* | x86_64-*)
                ;;
        # Recognize the various machine names and aliases which stand
        # for a CPU type and a company and sometimes even an OS.
@@ -517,6 +517,10 @@ case $basic_machine in
                basic_machine=i386-unknown
                os=-mingw32
                ;;
+       i[34567]86-pw32 | pw32)
+               basic_machine=i586-unknown
+               os=-pw32
+               ;;
        iris | iris4d)
                basic_machine=mips-sgi
                case $os in
@@ -636,6 +640,10 @@ case $basic_machine in
                basic_machine=i960-intel
                os=-mon960
                ;;
+       nonstopux)
+               basic_machine=mips-compaq
+               os=-nonstopux
+               ;;
        np1)
                basic_machine=np1-gould
                ;;
@@ -671,7 +679,7 @@ case $basic_machine in
         pc532 | pc532-*)
                basic_machine=ns32k-pc532
                ;;
-       pentium | p5 | k5 | k6 | nexen)
+       pentium | p5 | k5 | k6 | nexgen)
                basic_machine=i586-pc
                ;;
        pentiumpro | p6 | 6x86 | athlon)
@@ -680,7 +688,7 @@ case $basic_machine in
        pentiumii | pentium2)
                basic_machine=i786-pc
                ;;
-       pentium-* | p5-* | k5-* | k6-* | nexen-*)
+       pentium-* | p5-* | k5-* | k6-* | nexgen-*)
                basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
                ;;
        pentiumpro-* | p6-* | 6x86-* | athlon-*)
@@ -904,7 +912,7 @@ case $basic_machine in
                basic_machine=we32k-att
                ;;
        sh3 | sh4)
-               base_machine=sh-unknown
+               basic_machine=sh-unknown
                ;;
        sparc | sparcv9)
                basic_machine=sparc-sun
@@ -987,7 +995,7 @@ case $os in
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
-             | -openstep* | -oskit* | -conix*)
+             | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* | -storm-chaos*)
        # Remember, each alternative MUST END IN *, to match a version number.
                ;;
        -qnx*)
@@ -1048,7 +1056,7 @@ case $os in
        -ns2 )
                os=-nextstep2
                ;;
-       -nsk)
+       -nsk*)
                os=-nsk
                ;;
        # Preserve the version number of sinix5.
index 723341869f9b05e7a5519a801c4f938e836014db..58b0f04de314268c491a4fed4086003b133e0af7 100644 (file)
@@ -51,6 +51,9 @@
 #ifndef __convex__
 #undef __convex__
 #endif
+#ifndef __ia64__
+#undef __ia64__
+#endif
 
 
 /* assembler syntax */
index 913e4439ff58df098cc74e9b999ebb74009496e1..00be8355907392a6dabbe5ed42e076504c6c5233 100644 (file)
@@ -81,6 +81,9 @@
   #if defined(__convex__)
     #define CL_GLOBALIZE_LABEL(label)  __asm__(".globl " label);
   #endif
+  #if defined(__ia64__)
+    #define CL_GLOBALIZE_LABEL(label)  __asm__("\t.global " label);
+  #endif
   #ifndef CL_GLOBALIZE_LABEL
     #define CL_GLOBALIZE_LABEL(label)
   #endif
   #if defined(__convex__)
     #define CL_JUMP_TO(addr)  ASM_VOLATILE("jmp (%0)" : : "r" ((void*)(addr)))
   #endif
+  #if defined(__ia64__)
+    #define CL_JUMP_TO(addr)  ASM_VOLATILE("br %0" : : "b" ((void*)(addr)))
+  #endif
   #define CL_PROVIDE(module)  \
     extern "C" void cl_module__##module##__firstglobalfun () {}                \
     extern "C" void cl_module__##module##__ctorend (void);             \
index 0bb880ff704ffd54535fd7c17bf86d8c2c19c958..617f7f32b1350c2e2a189edc8e4db86bb9bd4666 100644 (file)
@@ -25,7 +25,7 @@ namespace cln {
 #if defined(__i386__) || defined(__mips__) || defined(__sparc__) || defined(__hppa__) || defined(__arm__) || defined(__rs6000__) || defined(__m88k__) || defined(__convex__)
   #define cl_word_alignment  4
 #endif
-#if defined(__alpha__) || defined(__mips64__) || defined(__sparc64__)
+#if defined(__alpha__) || defined(__mips64__) || defined(__sparc64__) || defined(__ia64__)
   #define cl_word_alignment  8
 #endif
 #if !defined(cl_word_alignment)
index 5f4837ef14dc2c115aa217feaa8214f406fd1192..71912081ed95d4053f343bfa8736f321109d15f6 100644 (file)
@@ -48,7 +48,7 @@
     #undef HAVE_LONGLONG
    #endif
   #endif
-  #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__mips64__) || (defined(__mips__) && defined(_ABIN32)) || defined(__sparc64__))
+  #if defined(HAVE_LONGLONG) && (defined(__alpha__) || defined(__mips64__) || defined(__sparc64__) || defined(__ia64__))
     // 64 bit registers in hardware
     #define HAVE_FAST_LONGLONG
   #endif
@@ -85,7 +85,7 @@
   #define signean_minus -1
 
 // Integer type used for counters.
-  #if (defined(HAVE_FAST_LONGLONG) && defined(__alpha__))
+  #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__)))
     #define intCsize long_bitsize
     typedef long           sintC;
     typedef unsigned long  uintC;
 // Numbers in the heap are stored as "digit" sequences.
 // A digit is an unsigned int with intDsize bits.
 // intDsize should be 8 or 16 or 32 or 64.
-  #if (defined(HAVE_FAST_LONGLONG) && defined(__alpha__))
+  #if (defined(HAVE_FAST_LONGLONG) && (defined(__alpha__) || defined(__ia64__)))
     #define intDsize 64
     #define intDDsize 128  // = 2*intDsize
     #define log2_intDsize  6  // = log2(intDsize)
index ccfe1f082f24d51b9ae743e178416fac8b9ec3ba..d146f2788f668db56b2db6c3f2754d45c67e207e 100644 (file)
@@ -3,8 +3,6 @@
 #ifndef _CL_LOW_H
 #define _CL_LOW_H
 
-#include "cln/types.h"
-
 namespace cln {
 
 // Determines the sign of a 16-bit number.
@@ -1297,7 +1295,6 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2)
       /* x32 besteht aus 1 16-Bit-Zähler (0,...,32).          */\
     )
   // Bits von x64 zählen: (Input x64, Output x64)
-#if HAVE_DD
   #define logcount_64()  \
     ( /* x64 besteht aus 64 1-Bit-Zählern (0,1).                             */\
       x64 = (x64 & 0x5555555555555555ULL) + ((x64 & 0xAAAAAAAAAAAAAAAAULL) >> 1),\
@@ -1313,23 +1310,6 @@ inline uint32 mulu32_unchecked (uint32 arg1, uint32 arg2)
       x64 = (x64 & 0x0000FFFFU) + (x64 >> 16)                                 \
       /* x64 besteht aus 1 16-Bit-Zähler (0,...,64).                         */\
     )
-#else
-  #define logcount_64()  \
-    ( /* x64 besteht aus 64 1-Bit-Zählern (0,1).                             */\
-      x64 = (x64 & 0x5555555555555555UL) + ((x64 & 0xAAAAAAAAAAAAAAAAUL) >> 1),\
-      /* x64 besteht aus 32 2-Bit-Zählern (0,1,2).                           */\
-      x64 = (x64 & 0x3333333333333333UL) + ((x64 & 0xCCCCCCCCCCCCCCCCUL) >> 2),\
-      /* x64 besteht aus 16 4-Bit-Zählern (0,1,2,3,4).                       */\
-      x64 = (uint32)(x64 + (x64 >> 32)),                                      \
-      /* x64 besteht aus 8 4-Bit-Zählern (0,...,8).                          */\
-      x64 = (x64 & 0x0F0F0F0FUL) + ((x64 & 0xF0F0F0F0UL) >> 4),                       \
-      /* x64 besteht aus 4 8-Bit-Zählern (0,...,16).                         */\
-      x64 = (x64 & 0x00FF00FFU) + ((x64 & 0xFF00FF00U) >> 8),                 \
-      /* x64 besteht aus 2 16-Bit-Zählern (0,...,32).                        */\
-      x64 = (x64 & 0x0000FFFFU) + (x64 >> 16)                                 \
-      /* x64 besteht aus 1 16-Bit-Zähler (0,...,64).                         */\
-    )
-#endif
 
 }  // namespace cln
 
index 387247c7c1e3f38f4f7f01cb922404fda9b43817..29787c0507ee71b431cdd0ed49d25ff5379ee628 100644 (file)
@@ -31,7 +31,7 @@
 // Declare functions that don't return.
 // nonreturning_function(extern,exit,(void)); == extern void exit (void);
   #ifdef __GNUC__
-    #if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 90))
+    #if (__GNUC__ >= 3) || ((__GNUC__ == 2) && (__GNUC_MINOR__ >= 9))
       #define nonreturning_function(storclass,funname,arguments)  \
         storclass void funname arguments __attribute__((__noreturn__))
     #else
@@ -111,13 +111,17 @@ namespace cln {
   #define NULL  0
 
 // Bit number n (0<=n<32 or 0<=n<64)
-#if HAVE_DD
-  #define bit(n)  (1LL<<(n))
-#else
-  #define bit(n)  (1L<<(n))
-#endif
+  #ifdef HAVE_FAST_LONGLONG
+    #define bit(n)  (1LL<<(n))
+  #else
+    #define bit(n)  (1L<<(n))
+  #endif
 // Bit number n (0<n<=32) mod 2^32
-  #define bitm(n)  (2L<<((n)-1))
+  #ifdef HAVE_FAST_LONGLONG
+    #define bitm(n)  (2LL<<((n)-1))
+  #else
+    #define bitm(n)  (2L<<((n)-1))
+  #endif
 // Test bit n in x, n constant, x a cl_uint:
   #if !(defined(__sparc__) || defined(__sparc64__))
     #define bit_test(x,n)  ((x) & bit(n))
@@ -134,17 +138,25 @@ namespace cln {
     #endif
   #endif
 // minus bit number n (0<=n<32 or 0<=n<64)
-#if HAVE_DD
-  #define minus_bit(n)  (-1LL<<(n))
-#else
-  #define minus_bit(n)  (-1L<<(n))
-#endif
+  #ifdef HAVE_FAST_LONGLONG
+    #define minus_bit(n)  (-1LL<<(n))
+  #else
+    #define minus_bit(n)  (-1L<<(n))
+  #endif
 // minus bit number n (0<n<=32) mod 2^32
-  #define minus_bitm(n)  (-2L<<((n)-1))
+  #ifdef HAVE_FAST_LONGLONG
+    #define minus_bitm(n)  (-2LL<<((n)-1))
+  #else
+    #define minus_bitm(n)  (-2L<<((n)-1))
+  #endif
 
 // Return 2^n, n a constant expression.
-// Same as bit(n), but undefined if n<0 or n>=long_bitsize.
-  #define bitc(n)  (1UL << (((n) >= 0 && (n) < long_bitsize) ? (n) : 0))
+// Same as bit(n), but undefined if n<0 or n>={long_}long_bitsize.
+  #ifdef HAVE_FAST_LONGLONG
+    #define bitc(n)  (1ULL << (((n) >= 0 && (n) < long_long_bitsize) ? (n) : 0))
+  #else
+    #define bitc(n)  (1UL << (((n) >= 0 && (n) < long_bitsize) ? (n) : 0))
+  #endif
 
 // floor(a,b) for a>=0, b>0 returns floor(a/b).
 // b should be a constant expression.
index 6aac6c4e890dc2d01ffeb985597ad97afae44b84..1a460c4fd010d8ff3275d87b5503eeb33f8f67d1 100644 (file)
   #include "cl_asm_i386.h"
 #endif
 
-#ifdef __mips__
+#if defined(__mips__) && !defined(__mips64__) && (intDsize==32)
   #include "cl_asm_mips.h"
 #endif
 
-#ifdef __hppa__
+#if defined(__hppa__) && (intDsize==32)
   #include "cl_asm_hppa.h"
 #endif
 
index d03ab82fcb1346cfb4c315aea91320f9aa57d523..689d5f6470a2778b08d0a03d5fa0b42e073f9b95 100644 (file)
@@ -23,11 +23,7 @@ uint32 random32 (random_state& randomstate)
 #ifdef HAVE_FAST_LONGLONG
        // Multiplikator a=6364136223846793005 = 0x5851F42D4C957F2D :
        var uint64 seed = highlow64(randomstate.seed.hi,randomstate.seed.lo);
-#if HAVE_DD
        var const uint64 a = 0x5851F42D4C957F2DULL;
-#else
-       var const uint64 a = 0x5851F42D4C957F2DUL;
-#endif
        var uint64 newseed;
        // multiplizieren, brauche nur letzte 64 Bit:
        mulu64(seed,a, , newseed =);
index 851cfac4a99c81f50432d845e1e44cd6c1d0edde..dd6b4239afc626d7f67742e30cf3d5fa2d66b366 100644 (file)
@@ -44,8 +44,13 @@ const cl_I mkf_extract (const cl_I& x, uintL p, uintL q)
       }
       // Lösche intDsize*ceiling(q/intDsize)-q Bits im ersten Digit:
       {var uintL q_D = q%intDsize;
+#ifdef HAVE_FAST_LONGLONG
        if (!(q_D==0))
-         { mspref(newMSDptr,0) &= (uintD)((1L<<q_D)-1); } // intDsize-q_D Bits löschen
+         mspref(newMSDptr,0) &= (uintD)((1LL<<q_D)-1); // erase intDsize-q_D bits
+#else
+       if (!(q_D==0))
+         mspref(newMSDptr,0) &= (uintD)((1L<<q_D)-1); // erase intDsize-q_D bits
+#endif
       }
       // Jetzt enthält die UDS newMSDptr/len/.. die extrahierten Bits.
       return UDS_to_I(newMSDptr,len);
index 119bd2252ca60980bd86bfd9b98084825814df37..9a57c277402029bf5fc7f6cc314ac48924755f52 100644 (file)
@@ -23,6 +23,12 @@ cl_private_thing cl_I_constructor_from_L (sint32 wert)
        // test enthält die Bits, die nicht in den Fixnum-Wert >= 0 reinpassen.
        if ((test == 0) || (test == (uint32)minus_bit(cl_value_len-1)))
                { return (cl_private_thing)(cl_combine(cl_FN_tag,wert)); }
+       #if (intDsize==64)
+         // trivially generate a Bignum of length one digit
+         var cl_heap_bignum* ptr = allocate_bignum(1);
+         arrayLSref(ptr->data,1,0) = wert;
+         return (cl_private_thing)(ptr);
+       #else
        // Bignum erzeugen:
        // (dessen Länge  bn_minlength <= n <= ceiling(32/intDsize)  erfüllt)
        if (bn_minlength == ceiling(32,intDsize)) {
@@ -101,6 +107,8 @@ cl_private_thing cl_I_constructor_from_L (sint32 wert)
                #endif
                #undef IF_LENGTH
        }
+       #endif
+       NOTREACHED
 }
 
 }  // namespace cln
index f64e263959f662f454f193fdd325ceb4e5c8f0a9..72508232fc5e23f9751245dea51bfc36c542a672 100644 (file)
@@ -131,41 +131,41 @@ namespace cln {
       { /*  359, 58, */  6-1, 36UL*36UL*36UL*36UL*36UL*36UL},
     #endif
     #if (intDsize==64)
-      { /*   64,  1, */ 63-1, 2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL*2UL},
-      { /*  848, 21, */ 40-1, 3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL*3UL},
-      { /*   32,  1, */ 31-1, 4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL*4UL},
-      { /*  634, 23, */ 27-1, 5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL*5UL},
-      { /*  718, 29, */ 24-1, 6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL*6UL},
-      { /*  114,  5, */ 22-1, 7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL*7UL},
-      { /*   64,  3, */ 21-1, 8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL*8UL},
-      { /*  424, 21, */ 20-1, 9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL*9UL},
-      { /*  289, 15, */ 19-1, 10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL*10UL},
-      { /* 1018, 55, */ 18-1, 11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL*11UL},
-      { /*  607, 34, */ 17-1, 12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL*12UL},
-      { /*  761, 44, */ 17-1, 13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL*13UL},
-      { /*  975, 58, */ 16-1, 14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL*14UL},
-      { /*  901, 55, */ 16-1, 15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL*15UL},
-      { /*   16,  1, */ 15-1, 16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL*16UL},
-      { /*  595, 38, */ 15-1, 17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL*17UL},
-      { /* 1013, 66, */ 15-1, 18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL*18UL},
-      { /*  226, 15, */ 15-1, 19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL*19UL},
-      { /*  696, 47, */ 14-1, 20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL*20UL},
-      { /*  102,  7, */ 14-1, 21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL*21UL},
-      { /*  775, 54, */ 14-1, 22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL*22UL},
-      { /*  382, 27, */ 14-1, 23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL*23UL},
-      { /* 1019, 73, */ 13-1, 24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL*24UL},
-      { /*  758, 55, */ 13-1, 25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL*25UL},
-      { /*  994, 73, */ 13-1, 26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL*26UL},
-      { /*  673, 50, */ 13-1, 27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL*27UL},
-      { /*  892, 67, */ 13-1, 28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL*28UL},
-      { /*  830, 63, */ 13-1, 29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL*29UL},
-      { /*  300, 23, */ 13-1, 30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL*30UL},
-      { /*  633, 49, */ 12-1, 31UL*31UL*31UL*31UL*31UL*31UL*31UL*31UL*31UL*31UL*31UL*31UL},
-      { /*   64,  5, */ 12-1, 32UL*32UL*32UL*32UL*32UL*32UL*32UL*32UL*32UL*32UL*32UL*32UL},
-      { /*  203, 16, */ 12-1, 33UL*33UL*33UL*33UL*33UL*33UL*33UL*33UL*33UL*33UL*33UL*33UL},
-      { /*  629, 50, */ 12-1, 34UL*34UL*34UL*34UL*34UL*34UL*34UL*34UL*34UL*34UL*34UL*34UL},
-      { /*  836, 67, */ 12-1, 35UL*35UL*35UL*35UL*35UL*35UL*35UL*35UL*35UL*35UL*35UL*35UL},
-      { /*  359, 29, */ 12-1, 36UL*36UL*36UL*36UL*36UL*36UL*36UL*36UL*36UL*36UL*36UL*36UL},
+      { /*   64,  1, */ 63-1, 2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL*2ULL},
+      { /*  848, 21, */ 40-1, 3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL*3ULL},
+      { /*   32,  1, */ 31-1, 4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL*4ULL},
+      { /*  634, 23, */ 27-1, 5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL*5ULL},
+      { /*  718, 29, */ 24-1, 6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL*6ULL},
+      { /*  114,  5, */ 22-1, 7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL*7ULL},
+      { /*   64,  3, */ 21-1, 8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL*8ULL},
+      { /*  424, 21, */ 20-1, 9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL*9ULL},
+      { /*  289, 15, */ 19-1, 10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL*10ULL},
+      { /* 1018, 55, */ 18-1, 11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL*11ULL},
+      { /*  607, 34, */ 17-1, 12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL*12ULL},
+      { /*  761, 44, */ 17-1, 13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL*13ULL},
+      { /*  975, 58, */ 16-1, 14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL*14ULL},
+      { /*  901, 55, */ 16-1, 15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL*15ULL},
+      { /*   16,  1, */ 15-1, 16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL*16ULL},
+      { /*  595, 38, */ 15-1, 17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL*17ULL},
+      { /* 1013, 66, */ 15-1, 18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL*18ULL},
+      { /*  226, 15, */ 15-1, 19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL*19ULL},
+      { /*  696, 47, */ 14-1, 20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL*20ULL},
+      { /*  102,  7, */ 14-1, 21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL*21ULL},
+      { /*  775, 54, */ 14-1, 22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL*22ULL},
+      { /*  382, 27, */ 14-1, 23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL*23ULL},
+      { /* 1019, 73, */ 13-1, 24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL*24ULL},
+      { /*  758, 55, */ 13-1, 25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL*25ULL},
+      { /*  994, 73, */ 13-1, 26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL*26ULL},
+      { /*  673, 50, */ 13-1, 27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL*27ULL},
+      { /*  892, 67, */ 13-1, 28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL*28ULL},
+      { /*  830, 63, */ 13-1, 29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL*29ULL},
+      { /*  300, 23, */ 13-1, 30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL*30ULL},
+      { /*  633, 49, */ 12-1, 31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL*31ULL},
+      { /*   64,  5, */ 12-1, 32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL*32ULL},
+      { /*  203, 16, */ 12-1, 33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL*33ULL},
+      { /*  629, 50, */ 12-1, 34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL*34ULL},
+      { /*  836, 67, */ 12-1, 35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL*35ULL},
+      { /*  359, 29, */ 12-1, 36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL*36ULL},
     #endif
     };