unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Raeburn <raeburn@raeburn.org>
Cc: rms@gnu.org, emacs-devel@gnu.org
Subject: Re: 64-bit lossage
Date: Wed, 24 Jul 2002 09:34:23 -0400	[thread overview]
Message-ID: <tx13cu91c80.fsf@raeburn.org> (raw)
In-Reply-To: <rzqptxe85b2.fsf@albion.dl.ac.uk> (Dave Love's message of "23 Jul 2002 23:09:37 +0100")

Dave Love <d.love@dl.ac.uk> writes:
>> I'll try to get some builds done on them more often, but I'll note one
>> thing right off -- the m/alpha.h file breaks the USE_LISP_UNION_TYPE
>> code because it unconditionally redefines some of the macros for
>> picking apart an integer used as a Lisp_Object.
>
> Yes.  Why is that a problem in practice?  (Also, lisp.h doesn't always
> undef such things before re-defining them, with possible warning
> storms as a consequence.)

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.  In the current representation the bit patterns
are the same for non-negative integers, but if we ever want to be able
to change the representation -- not necessarily switching to Guile,
but perhaps moving the tag bits to the low bits that are always zero
in a properly aligned struct pointer -- we still need to fix all those
cases.

A necessary early step in the Guile work I want to do is to get the
ability to make such changes.  Even if we never switch to Guile, I
believe that ability is important to have.

From what I've seen so far, on all the platforms where the Lisp object
manipulation macros were redefined, there are probably better ways to
do it.  And sometimes the reason for the redefinition is just bogus;
for example, MARKBIT was redefined on the alpha because of some
problem with an #if test that as far as I can see, doesn't exist now.
Generally the macros duplicate values that lisp.h or config.h would've
selected anyways.

I could work on these changes without changing m/alpha.h; I just
couldn't work on them on the Alpha.

As far as Joe Random downloading and building Emacs, it's not directly
causing any problem at all, aside from those redefinition warnings.

>> I'd say the macros in lisp.h need revising to better support 64-bit
>> architectures;
>
> As far as I know, they currently work, but there are probably more
> serious 64-bit problems elsewhere unless someone has re-done what
> eggert and I both started on.
>
> Adding long long support (per TODO) seems most useful in that area.

On most (all?) of the 64-bit configurations I've worked on, "long" is
64 bits; "long long" is mostly interesting only if "long" isn't as big
as a pointer, or we really really want to store more information than
a pointer.  If we hit a platform where only "long long" is pointer
sized, yes, we'll need to use it.  But if the lisp-union code compiles
without complaint, I bet "long long" can be made to work quite easily.

Ken

P.S.  I'm running an Emacs binary right now that was built to use a
union for a Lisp_Object, compiled for x86.  Most of what I'm doing is
interactive, but I haven't noticed any performance issues.  I did one
timing test with "make autoloads", and out of about four minutes of
CPU time, the "union" version was slower by about five seconds.
That's probably doing lots of searching in the regexp code;
byte-compiling might be a better test case to look for worst-case
results, but I haven't tried it yet.

  reply	other threads:[~2002-07-24 13:34 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 [this message]
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
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=tx13cu91c80.fsf@raeburn.org \
    --to=raeburn@raeburn.org \
    --cc=emacs-devel@gnu.org \
    --cc=rms@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).