Author: stian Branch: improve-rbigint Changeset: r56332:c2fc7b58dbe8 Date: 2012-06-25 08:22 +0200 http://bitbucket.org/pypy/pypy/changeset/c2fc7b58dbe8/
Log: Fix translation of targetpypystandalone when SHIFT != 31 It translate, in jit mode on 64bit now :) diff --git a/pypy/module/sys/system.py b/pypy/module/sys/system.py --- a/pypy/module/sys/system.py +++ b/pypy/module/sys/system.py @@ -47,8 +47,8 @@ return space.call_function(w_float_info, space.newtuple(info_w)) def get_long_info(space): - assert rbigint.SHIFT == 31 - bits_per_digit = rbigint.SHIFT + #assert rbigint.SHIFT == 31 + bits_per_digit = 31 #rbigint.SHIFT sizeof_digit = rffi.sizeof(rffi.ULONG) info_w = [ space.wrap(bits_per_digit), diff --git a/pypy/rlib/rbigint.py b/pypy/rlib/rbigint.py --- a/pypy/rlib/rbigint.py +++ b/pypy/rlib/rbigint.py @@ -564,7 +564,7 @@ size_b -= 1 else: - # XXX: Not working with int128! + # XXX: Not working with int128! Yet # Left-to-right 5-ary exponentiation (HAC Algorithm 14.82) # This is only useful in the case where c != None. # z still holds 1L @@ -582,8 +582,8 @@ # j = (m+) % SHIFT = (m+) - (i * SHIFT) # (computed without doing "i * SHIFT", which might overflow) j = size_b % 5 - if j != 0: - j = 5 - j + """if j != 0: + j = 5 - j""" if not we_are_translated(): assert j == (size_b*SHIFT+4)//5*5 - size_b*SHIFT # @@ -611,7 +611,7 @@ z = _help_mult(z, table[index], c) # assert j == -5 - + if negativeOutput and z.sign != 0: z = z.sub(c) return z _______________________________________________ pypy-commit mailing list pypy-commit@python.org http://mail.python.org/mailman/listinfo/pypy-commit