[LispM-Hackers] hello

John Morrison jm@mak.com
Wed Mar 6 19:29:01 2002


Hi;

*Somebody* is going to make the fix, right?  How are we going to handle
this?  I am perfectly content to cede responsibility for vast (alright,
so they aren't really that vast) tracts of functionality so that we can
make progress and I can try to get this to work on the bare iron.

-jm

Dave Richards wrote:
> 
> Yep.  fixnums are two's complement and bignums are sign magnitude, according
> to SSDN2.
> 
> > -----Original Message-----
> > From: lispm-hackers-admin@lists.unlambda.com
> > [mailto:lispm-hackers-admin@lists.unlambda.com]On Behalf Of Tim Moore
> > Sent: Wednesday, March 06, 2002 1:15 PM
> > To: lispm-hackers@lists.unlambda.com
> > Subject: [LispM-Hackers] hello
> >
> >
> > 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
> >
> >
> >
> >
> > http://lists.unlambda.com/mailman/listinfo/lispm-hackers
> 
> http://lists.unlambda.com/mailman/listinfo/lispm-hackers

-- 
==== John Morrison
==== MAK Technologies Inc.
==== 185 Alewife Brook Parkway, Cambridge, MA 02138
==== http://www.mak.com/
==== vox:617-876-8085 x115
==== fax:617-876-9208
==== jm@mak.com