[Top][All Lists]

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

Re: 64-bit lossage

From: Ken Raeburn
Subject: Re: 64-bit lossage
Date: Tue, 30 Jul 2002 10:56:28 -0400
User-agent: Gnus/5.090006 (Oort Gnus v0.06) Emacs/21.1.50 (i686-pc-linux-gnu)

Dave Love <address@hidden> writes:
> Ken Raeburn <address@hidden> writes:
>> I don't think I've got access to an Irix64 system to test with;
> For what it's worth, any remotely-recent system can run 64-bit (r4000
> up, probably with Irix 5.2 up, but I can't remember for sure that for
> back).

At work, we've got R5000s running 32-bit kernels, and I don't control

>> Per-machine definitions of macros dependent on low-level details of
>> the lisp implementation.  It's cleaner if the lisp implementation is
>> based on information about the architecture, and not partially
>> rewritten for some architectures.
> The machine and system files are a horrible mess in general, and that
> often leads to real problems.

Yes, some of the OS stuff does look pretty messy, but simple
architecture issues can be cleaned up.

>> The macros as they stand in lisp.h do appear to be fairly clean for
>> 64-bit support.  They assume that "long" will be 64 bits when pointers
>> are, and that "_LP64" is defined in that case, but switching to "long
>> long" if "long" isn't big enough should actually be quite easy.
> Good but it wasn't trivial when we last tried.

There shouldn't be any cases of mixing int and EMACS_INT values that
could inadvertently create broken lisp objects, and the pure numeric
manipulation should be fine.

Conversions between pointers and integers in Emacs all seem to assume
that EMACS_INT is the same size as a pointer, and that would need
fixing, mostly outside of lisp.h.  Probably an Emacs version of C99's
intptr_t would do the trick.

>> It wasn't trying to fix one problem.  The patches I had in progress
>> made the problem disappear for me;
> Not for me, for what it's worth.  Only disabling use of mmap did.

Interesting.  I'd like to look into that further.  Should I try out
the unicode branch?

>> I'm using the Lisp union type to ensure we've got reasonable type
>> handling, that we're not confusing Lisp objects and actual integer
>> values we want to use.
> I don't think that needs to be done specifically on Alpha, though.

Only if I want to test things on 64-bit platforms.

>> Generally the macros duplicate values that lisp.h or config.h would've
>> selected anyways.
> I know there's lots of that sort of thing in the build system overall,
> but we were forbidden to clean it up in the past.

Oh?  I don't want to go traipsing around in areas we're not supposed
to mess with...

>> On most (all?) of the 64-bit configurations I've worked on, "long" is
>> 64 bits;
> Of course.  The idea was to be able to use long long on 32-bit
> systems.

Ah.  To get the full range of pointer values, and larger integers?

Having just heard from someone who wants to edit a 300M file on a
32-bit platform, I may look a little more closely at this, but it's
not a priority.

If we used something more like the Guile object representation -- tag
bits at the bottom instead of the top, and more of the type info in
the pointed-to structure -- we might be able to get 31-bit integers
and 32-bit word pointers.  Since structure pointers are -- or can be
made to be -- aligned on 4- or 8-byte boundaries, we can produce the
pointers by masking off those bits, without interfering with the upper
bits of the pointer at all.  I think XEmacs does this too.


reply via email to

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