[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bignum branch
From: |
Eli Zaretskii |
Subject: |
Re: bignum branch |
Date: |
Fri, 03 Aug 2018 12:47:54 +0300 |
> From: Andy Moreton <address@hidden>
> Date: Fri, 03 Aug 2018 10:01:59 +0100
>
> > I believe your changes also cover the 32-bit MinGW build with wide ints.
>
> I expect so, but the build fails for 32bit MinGW builds on bignum branch
> with gettimeofday problems. I have a feeling that this has already been
> fixed on the master branch some time ago.
Could be, but can you show the error messages?
> > Can you tell what is the following hunk about?
> >
> >> @@ -3414,7 +3473,7 @@ Markers are converted to integers. */)
> >> else
> >> {
> >> eassume (FIXNUMP (number));
> >> - if (XINT (number) > MOST_POSITIVE_FIXNUM)
> >> + if (XINT (number) > MOST_NEGATIVE_FIXNUM)
> >> XSETINT (number, XINT (number) - 1);
> >> else
> >> {
>
> The updated Fadd1 checks if the old value is MOST_POSITIVE_FIXNUM before
> incrementing, as that would need a bignum result.
>
> This hunk in Fsub1 should check if the old value is MOST_NEGATIVE_FIXNUM
> before decrementing, as that would need a bignum result.
So the previous code in Fsub1 had a bug?
> > Also, this:
> >
> >> +(defun ccl-fixnum (code)
> >> + "Convert a CCL code word to a fixnum value."
> >> + (- (logxor (logand code #x0fffffff) #x08000000) #x08000000))
>
> The CCL compiled codewords are 28bits, but the CCL implementation
> assumes that the codewords are sign-extended, so that data constants in
> the upper part of the codeword are signed. This function truncates a
> codeword to 28bits, and then sign extends the result to a fixnum.
>
> This ensures that the CCL compiler output is the same on master and
> bignum branches.
Yes, I know. I was asking for a comment to that effect, so that
others won't wonder what this is about.
- Re: bignum branch, Andy Moreton, 2018/08/02
- Re: bignum branch, Eli Zaretskii, 2018/08/03
- Re: bignum branch, Andy Moreton, 2018/08/03
- Re: bignum branch,
Eli Zaretskii <=
- Re: bignum branch, Andy Moreton, 2018/08/03
- Re: bignum branch, Eli Zaretskii, 2018/08/03
- Re: bignum branch, Andy Moreton, 2018/08/03
- Re: bignum branch, Eli Zaretskii, 2018/08/03
- Re: bignum branch, Andy Moreton, 2018/08/03
- Re: bignum branch, Eli Zaretskii, 2018/08/04
- Re: bignum branch, Andy Moreton, 2018/08/04
- Re: bignum branch, Eli Zaretskii, 2018/08/04
- Re: bignum branch, Tom Tromey, 2018/08/03
- Re: bignum branch, Paul Eggert, 2018/08/03