adding bignum support for 64-bit machines

using gcc 128-bit register extensions to hold the result of
multpliying two 64-bit integers.
This commit is contained in:
Alex Shinn 2009-11-01 18:53:32 +09:00
parent 91efc04852
commit 445f8e9fa4

View file

@ -5,8 +5,15 @@
#ifndef SEXP_BIGNUM_H
#define SEXP_BIGNUM_H
#if (SEXP_64_BIT)
typedef unsigned int uint128_t __attribute__((mode(TI)));
typedef int sint128_t __attribute__((mode(TI)));
typedef uint128_t sexp_luint_t;
typedef sint128_t sexp_lsint_t;
#else
typedef unsigned long long sexp_luint_t;
typedef long long sexp_lsint_t;
#endif
sexp_sint_t sexp_bignum_compare (sexp a, sexp b);
sexp sexp_compare (sexp ctx, sexp a, sexp b);