[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bignum branch

From: Andy Moreton
Subject: Re: bignum branch
Date: Fri, 03 Aug 2018 01:43:17 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.50 (windows-nt)

On Sun 22 Jul 2018, Andy Moreton wrote:

> On Sun 22 Jul 2018, Tom Tromey wrote:
>>>>>>> "Andy" == Andy Moreton <address@hidden> writes:
>> Andy> I think the following patch fixes the issues in CCL (compiler,
>> Andy> interpreter and disassembler). It truncates the compiled CCL code words
>> Andy> to 28 bits and then sign extends to ensure that the interpreter sees
>> Andy> signed values of constants (stored at the upper end of the code word).
>> Would you mind pushing this to the bignum branch?
>> If it's inconvenient, let me know and I will do it.
> I've done some more testing with the CCl program in the midi-kbd ELPA
> package, and that shows that the patch is not correct.
> I'll report back when I get it working on master and on the bignum
> branch. The problems I reported with markers make debugging awkward on
> the bignum branch.

After a lot more testing, I have a somewhat scruffy patch that works in
the following emacs builds on unpatched master, and on patched bignum branch:
 - cygwin 64bit (LP64 model)
 - mingw64 msys2 32bit
 - mingw64 msys2 64bit (LLP64 model)

The patch contains changes for:
 - fix CCL to ensure it uses 28biut codewords properly in bignum build
 - ensure make_number creates fixnums in LLP64 builds
 - fix bugnumcompare for LLP64 builds
 - fix arith_driver to handle markers correctly
 - fix arith_driver operations for LLP64 builds (more testing needed)
 - fix float_arith_driver to allow bignums
 - fix ash_lsh_impl to produce correct results in bignum build
 - fix NUMBERP to remove redundant BIGNUMP test (ensured by INTEGERP)

The patch has been tested with the attached ccl-tests.el ERT tests to
check that ash/lsh shifts behave properly, and that the CCL machinery
uses its 28bit codewords correctly in a bignum build.

Please check this works for you, and feel free to commit it to the
bignum branch.


Attachment: bignum-fixes-working.patch
Description: Bignum support fixes

Attachment: ccl-tests.el
Description: Tests for bignum support and CCL fixes

reply via email to

[Prev in Thread] Current Thread [Next in Thread]