[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: guile 1.8 and x86_64
From: |
Marius Vollmer |
Subject: |
Re: guile 1.8 and x86_64 |
Date: |
09 May 2006 00:52:10 +0300 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 |
Andy Wingo <address@hidden> 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
- Re: guile 1.8 and x86_64, Miroslav Lichvar, 2006/05/05
- Re: guile 1.8 and x86_64, Miroslav Lichvar, 2006/05/06
- Re: guile 1.8 and x86_64, Marius Vollmer, 2006/05/07
- Re: guile 1.8 and x86_64, Andy Wingo, 2006/05/08
- Re: guile 1.8 and x86_64,
Marius Vollmer <=
- Re: guile 1.8 and x86_64, Neil Jerram, 2006/05/09
- Re: guile 1.8 and x86_64, Andy Wingo, 2006/05/09
- Default stack limit, Marius Vollmer, 2006/05/09
- Re: Default stack limit, Andy Wingo, 2006/05/10
- Re: Default stack limit, Kevin Ryde, 2006/05/10