* bignum.c (bigsub_int): Use bdigit_roomof.

(bigadd_int): Ditto.
  (bigand_int): Ditto.
  (bigor_int): Ditto.
  (bigxor_int): Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41529 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2013-06-21 10:09:34 +00:00
Родитель 372272c245
Коммит 6e19e1b876
2 изменённых файлов: 13 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,11 @@
Fri Jun 21 18:56:58 2013 Tanaka Akira <akr@fsij.org>
* bignum.c (bigsub_int): Use bdigit_roomof.
(bigadd_int): Ditto.
(bigand_int): Ditto.
(bigor_int): Ditto.
(bigxor_int): Ditto.
Fri Jun 21 17:56:25 2013 Koichi Sasada <ko1@atdot.net>
* benchmark/gc/gcbench.rb: fix summary of benchmark result notaton.

Просмотреть файл

@ -2975,7 +2975,7 @@ bigsub_int(VALUE x, long y0)
i = 1;
#else
num = 0;
for (i=0; i<(int)(sizeof(y)/SIZEOF_BDIGITS); i++) {
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
num += (BDIGIT_DBL_SIGNED)xds[i] - BIGLO(y);
zds[i] = BIGLO(num);
num = BIGDN(num);
@ -3026,7 +3026,7 @@ bigadd_int(VALUE x, long y)
i = 1;
#else
num = 0;
for (i=0; i<(int)(sizeof(y)/SIZEOF_BDIGITS); i++) {
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
num += (BDIGIT_DBL)xds[i] + BIGLO(y);
zds[i] = BIGLO(num);
num = BIGDN(num);
@ -4439,7 +4439,7 @@ bigand_int(VALUE x, long y)
{
BDIGIT_DBL num = y;
for (i=0; i<(int)(sizeof(y)/SIZEOF_BDIGITS); i++) {
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
zds[i] = xds[i] & BIGLO(num);
num = BIGDN(num);
}
@ -4535,7 +4535,7 @@ bigor_int(VALUE x, long y)
{
BDIGIT_DBL num = y;
for (i=0; i<(int)(sizeof(y)/SIZEOF_BDIGITS); i++) {
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
zds[i] = xds[i] | BIGLO(num);
num = BIGDN(num);
}
@ -4631,7 +4631,7 @@ bigxor_int(VALUE x, long y)
{
BDIGIT_DBL num = y;
for (i=0; i<(int)(sizeof(y)/SIZEOF_BDIGITS); i++) {
for (i=0; i<bdigit_roomof(SIZEOF_LONG); i++) {
zds[i] = xds[i] ^ BIGLO(num);
num = BIGDN(num);
}