I collected the zip file, and tried a build using visual studio.
Attached is the mpir.h file I collected from your repository
Notice the last line in this file is:
  GMP_ERROR_INVALID_ARGUMENT = 8

For which my compiler complains:
3>F:\math\mpir-master\mpir.h(314): error C4430: missing type specifier - int 
assumed. Note: C++ does not support default-int

Possible paste accident?

From: mpir-devel@googlegroups.com [mailto:mpir-devel@googlegroups.com] On 
Behalf Of Bill Hart
Sent: Thursday, March 20, 2014 1:58 PM
To: mpir-devel
Subject: [mpir-devel] Tuning help needed

Hi all,

I have finally finished with all the new tuning code for the new release.

If you'd like to help with tuning that would be great.

It's just "make tune" in the tune directory, using the latest from our git repo 
(https://github.com/wbhart/mpir  -- if you don't have git, there is a "Download 
Zip" option on the right hand side of that page). Just send me the result. Also 
tell me what config.guess returns so I know what machine you have.

We need tuning values for as many diverse architectures as possible.

Bill.
--
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
mpir-devel+unsubscr...@googlegroups.com<mailto:mpir-devel+unsubscr...@googlegroups.com>.
To post to this group, send email to 
mpir-devel@googlegroups.com<mailto:mpir-devel@googlegroups.com>.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel.
For more options, visit https://groups.google.com/d/optout.
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.

Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Software Foundation, Inc.

This file is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.

This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this file; see the file COPYING.LIB.  If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */

/* You have to define the following before including this file:

   UWtype -- An unsigned type, default type for operations (typically a "word")
   UHWtype -- An unsigned type, at least half the size of UWtype.
   UDWtype -- An unsigned type, at least twice as large a UWtype
   W_TYPE_SIZE -- size in bits of UWtype

   SItype, USItype -- Signed and unsigned 32 bit types.
   DItype, UDItype -- Signed and unsigned 64 bit types.

   On a 32 bit machine UWtype should typically be USItype;
   on a 64 bit machine, UWtype should typically be UDItype.
*/

#define __BITS4 (W_TYPE_SIZE / 4)
#define __ll_B ((UWtype) 1 << (W_TYPE_SIZE / 2))
#define __ll_lowpart(t) ((UWtype) (t) & (__ll_B - 1))
#define __ll_highpart(t) ((UWtype) (t) >> (W_TYPE_SIZE / 2))

/* This is used to make sure no undesirable sharing between different libraries
   that use this file takes place.  */
#ifndef __MPN
#define __MPN(x) __##x
#endif

#ifndef _PROTO
#if (__STDC__-0) || defined (__cplusplus) || defined( _MSC_VER )
#define _PROTO(x) x
#else
#define _PROTO(x) ()
#endif
#endif

/* Define auxiliary asm macros.

   1) umul_ppmm(high_prod, low_prod, multipler, multiplicand) multiplies two
   UWtype integers MULTIPLER and MULTIPLICAND, and generates a two UWtype
   word product in HIGH_PROD and LOW_PROD.

   3) udiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
   denominator) divides a UDWtype, composed by the UWtype integers
   HIGH_NUMERATOR and LOW_NUMERATOR, by DENOMINATOR and places the quotient
   in QUOTIENT and the remainder in REMAINDER.  HIGH_NUMERATOR must be less
   than DENOMINATOR for correct operation.  If, in addition, the most
   significant bit of DENOMINATOR must be 1, then the pre-processor symbol
   UDIV_NEEDS_NORMALIZATION is defined to 1.

   4) sdiv_qrnnd(quotient, remainder, high_numerator, low_numerator,
   denominator).  Like udiv_qrnnd but the numbers are signed.  The quotient
   is rounded towards 0.

   5) count_leading_zeros(count, x) counts the number of zero-bits from the
   msb to the first non-zero bit in the UWtype X.  This is the number of
   steps X needs to be shifted left to set the msb.  Undefined for X == 0,
   unless the symbol COUNT_LEADING_ZEROS_0 is defined to some value.

   6) count_trailing_zeros(count, x) like count_leading_zeros, but counts
   from the least significant end.

   7) add_ssaaaa(high_sum, low_sum, high_addend_1, low_addend_1,
   high_addend_2, low_addend_2) adds two UWtype integers, composed by
   HIGH_ADDEND_1 and LOW_ADDEND_1, and HIGH_ADDEND_2 and LOW_ADDEND_2
   respectively.  The result is placed in HIGH_SUM and LOW_SUM.  Overflow
   (i.e. carry out) is not stored anywhere, and is lost.

   8) sub_ddmmss(high_difference, low_difference, high_minuend, low_minuend,
   high_subtrahend, low_subtrahend) subtracts two two-word UWtype integers,
   composed by HIGH_MINUEND_1 and LOW_MINUEND_1, and HIGH_SUBTRAHEND_2 and
   LOW_SUBTRAHEND_2 respectively.  The result is placed in HIGH_DIFFERENCE
   and LOW_DIFFERENCE.  Overflow (i.e. carry out) is not stored anywhere,
   and is lost.

   If any of these macros are left undefined for a particular CPU,
   C macros are used.


   Notes:

   For add_ssaaaa the two high and two low addends can both commute, but
   unfortunately gcc only supports one "%" commutative in each asm block.
   This has always been so but is only documented in recent versions
   (eg. pre-release 3.3).  Having two or more "%"s can cause an internal
   compiler error in certain rare circumstances.

   Apparently it was only the last "%" that was ever actually respected, so
   the code has been updated to leave just that.  Clearly there's a free
   choice whether high or low should get it, if there's a reason to favour
   one over the other.  Also obviously when the constraints on the two
   operands are identical there's no benefit to the reloader in any "%" at
   all.

   */

/* The CPUs come in alphabetical order below.

   Please add support for more CPUs here, or improve the current support
   for the CPUs below!  */


/* count_leading_zeros_gcc_clz is count_leading_zeros implemented with gcc
   3.4 __builtin_clzl or __builtin_clzll, according to our limb size.
   Similarly count_trailing_zeros_gcc_ctz using __builtin_ctzl or
   __builtin_ctzll.

   These builtins are only used when we check what code comes out, on some
   chips they're merely libgcc calls, where we will instead want an inline
   in that case (either asm or generic C).

   These builtins are better than an asm block of the same insn, since an
   asm block doesn't give gcc any information about scheduling or resource
   usage.  We keep an asm block for use on prior versions of gcc though.

   For reference, __builtin_ffs existed in gcc prior to __builtin_clz, but
   it's not used (for count_leading_zeros) because it generally gives extra
   code to ensure the result is 0 when the input is 0, which we don't need
   or want.  */

#ifdef _LONG_LONG_LIMB
#define count_leading_zeros_gcc_clz(count,x)    \
  do {                                          \
    ASSERT ((x) != 0);                          \
    (count) = __builtin_clzll (x);              \
  } while (0)
#else
#define count_leading_zeros_gcc_clz(count,x)    \
  do {                                          \
    ASSERT ((x) != 0);                          \
    (count) = __builtin_clzl (x);               \
  } while (0)
#endif

#ifdef _LONG_LONG_LIMB
#define count_trailing_zeros_gcc_ctz(count,x)   \
  do {                                          \
    ASSERT ((x) != 0);                          \
    (count) = __builtin_ctzll (x);              \
  } while (0)
#else
#define count_trailing_zeros_gcc_ctz(count,x)   \
  do {                                          \
    ASSERT ((x) != 0);                          \
    (count) = __builtin_ctzl (x);               \
  } while (0)
#endif
   ? mpq_sgn (Q) : _mpq_cmp_ui (Q,NUI,DUI))
/* longlong.h -- definitions for mixed size 32/64 bit arithmetic.

Copyright 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003,
2004, 2005 Free Software Foundation, Inc.

Copyright 2013 William Hart

This file is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at your
option) any later version.

This file is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public
License for more details.

You should have received a copy of the GNU Lesser General Public License
along with this file; see the file COPYING.LIB.  If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */

#if defined(__ICL)

#define add_ssaaaa(sh, sl, ah, al, bh, bl) \
  __asm__ ("addq %5,%q1\n\tadcq %3,%q0"                                 \
           : "=r" (sh), "=&r" (sl)                                      \
           : "0"  ((UDItype)(ah)), "rme" ((UDItype)(bh)),               \
             "%1" ((UDItype)(al)), "rme" ((UDItype)(bl)))
#define sub_ddmmss(sh, sl, ah, al, bh, bl) \
  __asm__ ("subq %5,%q1\n\tsbbq %3,%q0"                                 \
           : "=r" (sh), "=&r" (sl)                                      \
           : "0" ((UDItype)(ah)), "rme" ((UDItype)(bh)),                \
             "1" ((UDItype)(al)), "rme" ((UDItype)(bl)))
#define umul_ppmm(w1, w0, u, v) \
  __asm__ ("mulq %3"                                                    \
           : "=a" (w0), "=d" (w1)                                       \
           : "%0" ((UDItype)(u)), "rm" ((UDItype)(v)))
#define udiv_qrnnd(q, r, n1, n0, dx) /* d renamed to dx avoiding "=d" */\
  __asm__ ("divq %4"                 /* stringification in K&R C */     \
           : "=a" (q), "=d" (r)                                         \
           : "0" ((UDItype)(n0)), "1" ((UDItype)(n1)), "rm" ((UDItype)(dx)))
#define add_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
  __asm__ ("addq %8,%q2\n\tadcq %6,%q1\n\tadcq %4,%q0"     \
       : "=r" (sh), "=r" (sm), "=&r" (sl)                  \
       : "0"  ((UDItype)(ah)), "rme" ((UDItype)(bh)),  \
         "1"  ((UDItype)(am)), "rme" ((UDItype)(bm)),  \
         "2"  ((UDItype)(al)), "rme" ((UDItype)(bl)))  
#define sub_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
  __asm__ ("subq %8,%q2\n\tsbbq %6,%q1\n\tsbbq %4,%q0"     \
       : "=r" (sh), "=r" (sm), "=&r" (sl)                  \
       : "0"  ((UDItype)(ah)), "rme" ((UDItype)(bh)),  \
         "1"  ((UDItype)(am)), "rme" ((UDItype)(bm)),  \
         "2"  ((UDItype)(al)), "rme" ((UDItype)(bl)))  

/* bsrq destination must be a 64-bit register, hence UDItype for __cbtmp. */
#define count_leading_zeros(count, x)                                   \
  do {                                                                  \
    UDItype __cbtmp;                                                    \
    ASSERT ((x) != 0);                                                  \
    __asm__ ("bsrq %1,%0" : "=r" (__cbtmp) : "rm" ((UDItype)(x)));      \
    (count) = __cbtmp ^ 63;                                             \
  } while (0)
/* bsfq destination must be a 64-bit register, "%q0" forces this in case
   count is only an int. */
#define count_trailing_zeros(count, x)                                  \
  do {                                                                  \
    ASSERT ((x) != 0);                                                  \
    __asm__ ("bsfq %1,%q0" : "=r" (count) : "rm" ((UDItype)(x)));       \
  } while (0)

#endif

#if !defined(BSWAP_LIMB) && defined (__GNUC__) 
#define BSWAP_LIMB(dst, src)                                            \
  do {                                                                  \
    __asm__ ("bswap %q0" : "=r" (dst) : "0" (src));                     \
  } while (0)
#endif

#if defined( _MSC_VER )
#include <intrin.h>

#if !defined( COUNT_LEADING_ZEROS_NEED_CLZ_TAB )
#  define COUNT_LEADING_ZEROS_NEED_CLZ_TAB
#endif

#if defined( _WIN64 )

#if !defined(count_leading_zeros)
#   pragma intrinsic(_BitScanReverse64)
#   define count_leading_zeros(c,x)         \
    do  { unsigned long _z;                 \
          ASSERT ((x) != 0);            \
          _BitScanReverse64(&_z, (x));  \
          c = 63 - _z;                  \
        } while (0)
#endif

#if !defined(count_trailing_zeros)
#   pragma intrinsic(_BitScanForward64)
#   define count_trailing_zeros(c,x)    \
    do  {  unsigned long _z;                    \
           ASSERT ((x) != 0);           \
           _BitScanForward64(&_z, (x)); \
                   c = _z;                                              \
         } while (0)
#endif

#if !defined(umul_ppmm)
#    pragma intrinsic(_umul128)
#    define umul_ppmm(xh, xl, m0, m1)       \
     do  {                                  \
           xl = _umul128( (m0), (m1), &xh); \
         } while (0)
#endif

#if !defined( BSWAP_LIMB )
#  pragma intrinsic(_byteswap_uint64)
#    define BSWAP_LIMB
#    define BSWAP_LIMB(dst, src)  dst = _byteswap_uint64(src)
#endif

#endif    /* _WIN64 */

#if 0   /* trial re-definition of C versions */
#define add_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
   do { \
      UWtype _cy; \
      (sl) = (al) + (bl); \
          _cy = (sl) < (bl) ? 1 : 0; \
          (sm) = (am) + (bm) + _cy; \
          _cy  = (sm) < (bm) ? 1 : (sm) > (bm) ? 0 : _cy; \
          (sh) = (ah) + (bh) + _cy; \
   } while (0)

#define sub_333(sh, sm, sl, ah, am, al, bh, bm, bl)  \
   do { \
      UWtype _bw; \
      (sl) = (al) - (bl); \
          _bw = (sl) > (al) ? 1 : 0; \
          (sm) = (am) - (bm) - _bw; \
          _bw = (sm) > (am) ? 1 : (sm) < (am) ? 0 : _bw; \
          (sh) = (ah) - (bh) - _bw; \
   } while (0)
#endif

#endif      /* _MSC_VER */
  GMP_ERROR_INVALID_ARGUMENT = 8

Reply via email to