unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Marius Vollmer <mvo@zagadka.de>
Cc: guile-devel@gnu.org
Subject: Re: guile 1.8 and x86_64
Date: 09 May 2006 00:52:10 +0300	[thread overview]
Message-ID: <87k68wjib9.fsf@minimini.mvo.home> (raw)
In-Reply-To: <1147084130.23680.94.camel@localhost.localdomain>

Andy Wingo <wingo@pobox.com> writes:

> Hi,
> 
> On Mon, 2006-05-08 at 00:29 +0300, Marius Vollmer wrote:
> > 137c137
> > < #define CELL_P(x)  (SCM_ITAG3 (x) == scm_tc3_cons)
> > ---
> > > #define CELL_P(x)  ((SCM_UNPACK(x) & (sizeof(scm_t_cell)-1)) == scm_tc3_cons)
> 
> I don't really understand how the region can give you unaligned
> pointers, but I do confirm that this patch allows me to build guile.

Excellent!

Here is what is going on: the CELL_P predicate is used during the
conservative scanning of the GC to decide whether a random word can
possibly be a non-immediate SCM value.  Non-immediate values are the
ones that point into the heap.  The type tag for such a non-immediate
value is "lower three bits zero".  On 32-bit architectures, a cell is
8 bytes, which means that a non-immediate value is always aligned to a
cell.  On 64-bit machines, a cell is 16 bytes, and that means that a
word with "lower three bits zero" can still be invalid because it
points into the middle of a cell.

(We have similar check already for double-cells, which are 16 bytes on
32-bit machines.)

-- 
GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3  331E FAF8 226A D5D4 E405


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2006-05-08 21:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-07 19:40 guile 1.8 and x86_64 Quanah Gibson-Mount
2006-04-10  8:14 ` Ludovic Courtès
2006-04-10 22:55   ` Neil Jerram
2006-04-10 23:03     ` Quanah Gibson-Mount
2006-04-11 20:37       ` Neil Jerram
2006-04-11 20:52         ` Quanah Gibson-Mount
2006-05-05 14:05         ` Miroslav Lichvar
2006-05-06 11:12           ` Miroslav Lichvar
2006-05-07 21:29             ` Marius Vollmer
2006-05-08 10:28               ` Andy Wingo
2006-05-08 21:52                 ` Marius Vollmer [this message]
2006-05-09  6:49                   ` Neil Jerram
2006-05-09 13:23                     ` Andy Wingo
2006-05-09 22:31                       ` Default stack limit Marius Vollmer
2006-05-10 14:31                         ` Andy Wingo
2006-05-10 23:58                           ` Kevin Ryde

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/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k68wjib9.fsf@minimini.mvo.home \
    --to=mvo@zagadka.de \
    --cc=guile-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.
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).