From d33541009f3f9ed6edef9b0a3183dd552f83672b Mon Sep 17 00:00:00 2001 From: akr Date: Sun, 24 Nov 2013 04:51:33 +0000 Subject: [PATCH] * include/ruby/defines.h: Don't use int128_t for Bignum. It's not always faster. * bignum.c: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ bignum.c | 4 +--- include/ruby/defines.h | 8 +------- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index d928c94420..e6fda5caa7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Nov 24 13:49:08 2013 Tanaka Akira + + * include/ruby/defines.h: Don't use int128_t for Bignum. + It's not always faster. + + * bignum.c: Ditto. + Sun Nov 24 10:18:15 2013 Aman Gupta * NEWS: Add details about new debugging features and APIs. diff --git a/bignum.c b/bignum.c index bced660134..3f8821a3f4 100644 --- a/bignum.c +++ b/bignum.c @@ -36,9 +36,7 @@ VALUE rb_cBignum; const char ruby_digitmap[] = "0123456789abcdefghijklmnopqrstuvwxyz"; #ifndef SIZEOF_BDIGIT_DBL -# if defined(HAVE_INT64_T) && defined(HAVE_INT128_T) -# define SIZEOF_BDIGIT_DBL SIZEOF_INT128_T -# elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG +# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG # define SIZEOF_BDIGIT_DBL SIZEOF_LONG_LONG # else # define SIZEOF_BDIGIT_DBL SIZEOF_LONG diff --git a/include/ruby/defines.h b/include/ruby/defines.h index 3327e69123..1c07ac07e8 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -144,13 +144,7 @@ void xfree(void*); #endif #ifndef BDIGIT -# if defined(HAVE_INT64_T) && defined(HAVE_INT128_T) -# define BDIGIT uint64_t -# define SIZEOF_BDIGITS SIZEOF_INT64_T -# define BDIGIT_DBL uint128_t -# define BDIGIT_DBL_SIGNED int128_t -# define PRI_BDIGIT_PREFIX PRI_64_PREFIX -# elif SIZEOF_INT*2 <= SIZEOF_LONG_LONG +# if SIZEOF_INT*2 <= SIZEOF_LONG_LONG # define BDIGIT unsigned int # define SIZEOF_BDIGITS SIZEOF_INT # define BDIGIT_DBL unsigned LONG_LONG