From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: guile 1.8 and x86_64 Date: 09 May 2006 00:52:10 +0300 Message-ID: <87k68wjib9.fsf@minimini.mvo.home> References: <3E76C952D0DE7C18F2E3A89F@cadabra-sw.stanford.edu> <87acatj19q.fsf@laas.fr> <87hd5111mz.fsf@ossau.uklinux.net> <8656DB86D246C1D9ACD84549@tribes2.stanford.edu> <87zmirvoew.fsf@ossau.uklinux.net> <20060505140534.GA13293@bordell.redhat.usu> <20060506111221.GA16844@bordell.redhat.usu> <87slnljzgj.fsf@minimini.mvo.home> <1147084130.23680.94.camel@localhost.localdomain> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1147125149 12412 80.91.229.2 (8 May 2006 21:52:29 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 May 2006 21:52:29 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon May 08 23:52:27 2006 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FdDeO-0003cD-4N for guile-devel@m.gmane.org; Mon, 08 May 2006 23:52:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdDeN-0005yk-P6 for guile-devel@m.gmane.org; Mon, 08 May 2006 17:52:19 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FdDeL-0005yV-Di for guile-devel@gnu.org; Mon, 08 May 2006 17:52:17 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FdDeJ-0005yI-6q for guile-devel@gnu.org; Mon, 08 May 2006 17:52:17 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FdDeI-0005yE-Uk for guile-devel@gnu.org; Mon, 08 May 2006 17:52:14 -0400 Original-Received: from [213.243.153.35] (helo=smtp2.pp.htv.fi) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FdDfD-000551-64 for guile-devel@gnu.org; Mon, 08 May 2006 17:53:11 -0400 Original-Received: from zagadka.ping.de (cs181072157.pp.htv.fi [82.181.72.157]) by smtp2.pp.htv.fi (Postfix) with SMTP id 720A4296B99 for ; Tue, 9 May 2006 00:52:11 +0300 (EEST) Original-Received: (qmail 29152 invoked by uid 1000); 9 May 2006 00:52:10 +0300 Original-To: Andy Wingo In-Reply-To: <1147084130.23680.94.camel@localhost.localdomain> Original-Lines: 30 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:5913 Archived-At: Andy Wingo 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