[kaffe] Bug: Kaffe doesn't work with GMP on x86_64
Alan Eliasen
eliasen at mindspring.com
Wed Dec 7 01:32:40 PST 2005
Alan Eliasen wrote:
> When run with:
> kaffe -Xnative-big-math BigIntTest
> it produces:
>
> Fits in long
> 4294967292
> 18446744073709551612
>
> Which is incorrect. The BigInteger has the wrong value.
FYI, here are the binary and hexadecimal conversions for the above.
These are done using my programming language/calculating tool "Frink" (
http://futureboy.us/frinkdocs/ ) which is the program I'm trying to use
with Kaffe.
4294967292 -> base2
11111111111111111111111111111100
4294967292 -> base16
fffffffc
18446744073709551612 -> base2
1111111111111111111111111111111111111111111111111111111111111100
18446744073709551612 -> base16
fffffffffffffffc
It appears that maybe something's going wrong in the upper 32 bits?
That is, they're defaulting to 1 instead of 0? Or sign bits not getting
handled correctly or extended improperly? The BigInteger is getting
constructed from a long in the test program.
--
Alan Eliasen | "It's amazing how much mature wisdom
eliasen at mindspring.com | resembles being too tired."
http://futureboy.homeip.net/ | -- Robert Heinlein
--
Alan Eliasen | "It's amazing how much mature wisdom
eliasen at mindspring.com | resembles being too tired."
http://futureboy.homeip.net/ | -- Robert Heinlein
More information about the kaffe
mailing list