From 445f8e9fa43502d403a11e57944c7388d815731c Mon Sep 17 00:00:00 2001 From: Alex Shinn Date: Sun, 1 Nov 2009 18:53:32 +0900 Subject: [PATCH] adding bignum support for 64-bit machines using gcc 128-bit register extensions to hold the result of multpliying two 64-bit integers. --- include/chibi/bignum.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/chibi/bignum.h b/include/chibi/bignum.h index 3d889d82..8a160c52 100644 --- a/include/chibi/bignum.h +++ b/include/chibi/bignum.h @@ -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);