remove some MPBSD stuff left lying around

This commit is contained in:
jasonmoxham 2011-01-11 10:56:44 +00:00
parent cd1620d9ef
commit 20f7bf9b20
8 changed files with 1 additions and 66 deletions

View File

@ -23,21 +23,6 @@ MA 02110-1301, USA. */
#include "gmp-impl.h" #include "gmp-impl.h"
#ifdef BERKELEY_MP
#include "mp.h"
#ifdef OPERATION_add
#define FUNCTION madd
#define VARIATION
#endif
#ifdef OPERATION_sub
#define FUNCTION msub
#define VARIATION -
#endif
#define ARGUMENTS mpz_srcptr u, mpz_srcptr v, mpz_ptr w
#else /* normal GMP */
#ifdef OPERATION_add #ifdef OPERATION_add
#define FUNCTION mpz_add #define FUNCTION mpz_add
#define VARIATION #define VARIATION
@ -48,8 +33,6 @@ MA 02110-1301, USA. */
#endif #endif
#define ARGUMENTS mpz_ptr w, mpz_srcptr u, mpz_srcptr v #define ARGUMENTS mpz_ptr w, mpz_srcptr u, mpz_srcptr v
#endif
#ifndef FUNCTION #ifndef FUNCTION
Error, need OPERATION_add or OPERATION_sub Error, need OPERATION_add or OPERATION_sub
#endif #endif

View File

@ -20,18 +20,11 @@ along with the GNU MP Library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
MA 02110-1301, USA. */ MA 02110-1301, USA. */
#ifdef BERKELEY_MP
#include "mp.h"
#endif
#include "mpir.h" #include "mpir.h"
#include "gmp-impl.h" #include "gmp-impl.h"
int int
#ifdef BERKELEY_MP
mcmp (mpz_srcptr u, mpz_srcptr v)
#else
mpz_cmp (mpz_srcptr u, mpz_srcptr v) mpz_cmp (mpz_srcptr u, mpz_srcptr v)
#endif
{ {
mp_size_t usize, vsize, dsize, asize; mp_size_t usize, vsize, dsize, asize;
mp_srcptr up, vp; mp_srcptr up, vp;

View File

@ -156,11 +156,8 @@ MA 02111-1307, USA. */
} }
void void
#ifndef BERKELEY_MP
mpz_gcd (mpz_ptr g, mpz_srcptr u, mpz_srcptr v) mpz_gcd (mpz_ptr g, mpz_srcptr u, mpz_srcptr v)
#else /* BERKELEY_MP */
gcd (mpz_srcptr u, mpz_srcptr v, mpz_ptr g)
#endif /* BERKELEY_MP */
GCD_BODY(mpn_gcd) GCD_BODY(mpn_gcd)
void void

View File

@ -23,17 +23,9 @@ MA 02110-1301, USA. */
#include <stdio.h> /* for NULL */ #include <stdio.h> /* for NULL */
#include "mpir.h" #include "mpir.h"
#include "gmp-impl.h" #include "gmp-impl.h"
#ifdef BERKELEY_MP
#include "mp.h"
#endif
void void
#ifndef BERKELEY_MP
mpz_mul (mpz_ptr w, mpz_srcptr u, mpz_srcptr v) mpz_mul (mpz_ptr w, mpz_srcptr u, mpz_srcptr v)
#else /* BERKELEY_MP */
mult (mpz_srcptr u, mpz_srcptr v, mpz_ptr w)
#endif /* BERKELEY_MP */
{ {
mp_size_t usize = u->_mp_size; mp_size_t usize = u->_mp_size;
mp_size_t vsize = v->_mp_size; mp_size_t vsize = v->_mp_size;

View File

@ -24,9 +24,6 @@ MA 02110-1301, USA. */
#include "mpir.h" #include "mpir.h"
#include "gmp-impl.h" #include "gmp-impl.h"
#include "longlong.h" #include "longlong.h"
#ifdef BERKELEY_MP
#include "mp.h"
#endif
/* Compute t = a mod m, a is defined by (ap,an), m is defined by (mp,mn), and /* Compute t = a mod m, a is defined by (ap,an), m is defined by (mp,mn), and
t is defined by (tp,mn). */ t is defined by (tp,mn). */
@ -119,11 +116,7 @@ phi (mp_limb_t t)
#undef REDUCE_EXPONENT #undef REDUCE_EXPONENT
void void
#ifndef BERKELEY_MP
mpz_powm (mpz_ptr r, mpz_srcptr b, mpz_srcptr e, mpz_srcptr m) mpz_powm (mpz_ptr r, mpz_srcptr b, mpz_srcptr e, mpz_srcptr m)
#else /* BERKELEY_MP */
pow (mpz_srcptr b, mpz_srcptr e, mpz_srcptr m, mpz_ptr r)
#endif /* BERKELEY_MP */
{ {
mp_ptr xp, tp, qp, gp, this_gp; mp_ptr xp, tp, qp, gp, this_gp;
mp_srcptr bp, ep, mp; mp_srcptr bp, ep, mp;

View File

@ -23,18 +23,9 @@ MA 02110-1301, USA. */
#include "gmp-impl.h" #include "gmp-impl.h"
#ifdef BERKELEY_MP
#include "mp.h"
#define FUNCTION move
#define ARGUMENTS mpz_srcptr u, mpz_ptr w
#else
#define FUNCTION mpz_set #define FUNCTION mpz_set
#define ARGUMENTS mpz_ptr w, mpz_srcptr u #define ARGUMENTS mpz_ptr w, mpz_srcptr u
#endif
void void
FUNCTION (ARGUMENTS) FUNCTION (ARGUMENTS)
{ {

View File

@ -24,16 +24,9 @@ MA 02110-1301, USA. */
#include <stdio.h> /* for NULL */ #include <stdio.h> /* for NULL */
#include "mpir.h" #include "mpir.h"
#include "gmp-impl.h" #include "gmp-impl.h"
#ifdef BERKELEY_MP
#include "mp.h"
#endif
void void
#ifndef BERKELEY_MP
mpz_sqrtrem (mpz_ptr root, mpz_ptr rem, mpz_srcptr op) mpz_sqrtrem (mpz_ptr root, mpz_ptr rem, mpz_srcptr op)
#else /* BERKELEY_MP */
msqrt (mpz_srcptr op, mpz_ptr root, mpz_ptr rem)
#endif /* BERKELEY_MP */
{ {
mp_size_t op_size, root_size, rem_size; mp_size_t op_size, root_size, rem_size;
mp_ptr root_ptr, op_ptr; mp_ptr root_ptr, op_ptr;

View File

@ -23,16 +23,9 @@ MA 02110-1301, USA. */
#include "mpir.h" #include "mpir.h"
#include "gmp-impl.h" #include "gmp-impl.h"
#include "longlong.h" #include "longlong.h"
#ifdef BERKELEY_MP
#include "mp.h"
#endif
void void
#ifndef BERKELEY_MP
mpz_tdiv_qr (mpz_ptr quot, mpz_ptr rem, mpz_srcptr num, mpz_srcptr den) mpz_tdiv_qr (mpz_ptr quot, mpz_ptr rem, mpz_srcptr num, mpz_srcptr den)
#else /* BERKELEY_MP */
mdiv (mpz_srcptr num, mpz_srcptr den, mpz_ptr quot, mpz_ptr rem)
#endif /* BERKELEY_MP */
{ {
mp_size_t ql; mp_size_t ql;
mp_size_t ns, ds, nl, dl; mp_size_t ns, ds, nl, dl;