[LispM-Hackers] hello
Tim Moore
moore@bricoworks.com
Wed Mar 6 12:16:01 2002
I just came across this project and can't ever resist a good hack. I have
a lot of coals in the Lisp fires and can't commit to really diving into
this project, but I do have a lot of Lisp system/compiler experience and
would love to help out on a low level, perhaps implementing some macro
instructions.
So, here's a question about what I suspect is a bug. In memobj.cc we
have:
e3s32 memFix::value(void) const
{
e3Word me = readMe();
e3u8 sign_bit = me.selectBitsPPSS(24, 1);
e3u32 magnitude = me.selectBitsPPSS(0, 24);
e3s32 signed_magnitude = magnitude;
if (sign_bit)
{
signed_magnitude *= -1; // Probably should just set sign bit.
}
return(signed_magnitude);
}
But a fixnum is in two's complement, right? I suspect this should be
something like:
e3s32 val = me.getBits();
return (val << 7) >> 7;
Comments?
Tim