From: Ken Raeburn <raeburn@raeburn.org>
Cc: emacs-devel@gnu.org
Subject: Re: 64-bit lossage
Date: Tue, 30 Jul 2002 10:56:28 -0400 [thread overview]
Message-ID: <tx1ptx52rj7.fsf@raeburn.org> (raw)
In-Reply-To: <rzqd6t65f5s.fsf@albion.dl.ac.uk> (Dave Love's message of "29 Jul 2002 23:43:11 +0100")
Dave Love <d.love@dl.ac.uk> writes:
> Ken Raeburn <raeburn@raeburn.org> 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
them.
>> 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.
Ken
next prev parent reply other threads:[~2002-07-30 14:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-01 16:18 64-bit lossage Dave Love
2002-07-02 19:45 ` Richard Stallman
2002-07-03 18:49 ` Andreas Schwab
2002-07-17 11:25 ` Dave Love
2002-07-17 19:47 ` Andreas Schwab
2002-07-22 16:08 ` Dave Love
2002-07-22 18:52 ` Ken Raeburn
2002-07-17 11:24 ` Dave Love
2002-07-17 12:43 ` Stefan Monnier
2002-07-18 14:55 ` Richard Stallman
2002-07-18 22:23 ` Ken Raeburn
2002-07-19 20:56 ` Richard Stallman
2002-07-20 21:58 ` Ken Raeburn
2002-07-23 22:09 ` Dave Love
2002-07-24 13:34 ` Ken Raeburn
2002-07-29 22:35 ` Dave Love
2002-07-21 11:35 ` Ken Raeburn
2002-07-21 14:05 ` Ken Raeburn
2002-07-23 22:14 ` Dave Love
2002-07-23 22:12 ` Dave Love
2002-07-26 7:02 ` Ken Raeburn
2002-07-29 22:43 ` Dave Love
2002-07-30 14:56 ` Ken Raeburn [this message]
2002-07-31 5:55 ` Richard Stallman
2002-08-01 17:19 ` Ken Raeburn
2002-08-01 21:19 ` Paul Eggert
2002-08-01 23:37 ` Ken Raeburn
2002-08-01 23:50 ` Paul Eggert
2002-08-03 7:48 ` Ken Raeburn
2002-08-02 22:13 ` Richard Stallman
2002-08-03 0:03 ` Paul Eggert
2002-08-04 23:24 ` Richard Stallman
2002-08-09 7:07 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=tx1ptx52rj7.fsf@raeburn.org \
--to=raeburn@raeburn.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).