From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Rob Browning Newsgroups: gmane.lisp.guile.devel Subject: powerpc problems at least partially fixed (more optimization issues). Date: Fri, 11 Apr 2003 12:33:15 -0500 Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Message-ID: <87d6jtx7l0.fsf_-_@raven.i.defaultvalue.org> References: <87adeykqcc.fsf@raven.i.defaultvalue.org> <873ckqnhk4.fsf@zagadka.ping.de> <87istlbt9c.fsf@raven.i.defaultvalue.org> <87of3dmo7y.fsf@zagadka.ping.de> <87fzopxal5.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1050082479 1851 80.91.224.249 (11 Apr 2003 17:34:39 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 11 Apr 2003 17:34:39 +0000 (UTC) Cc: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Fri Apr 11 19:34:37 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1942Q9-0000Tg-00 for ; Fri, 11 Apr 2003 19:34:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1942PA-0000XD-09 for guile-devel@m.gmane.org; Fri, 11 Apr 2003 13:33:37 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 1942Or-0000Wv-00 for guile-devel@gnu.org; Fri, 11 Apr 2003 13:33:17 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 1942Oq-0000WS-00 for guile-devel@gnu.org; Fri, 11 Apr 2003 13:33:17 -0400 Original-Received: from dsl093-098-016.wdc1.dsl.speakeasy.net ([66.93.98.16] helo=defaultvalue.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 1942Oq-0000WL-00 for guile-devel@gnu.org; Fri, 11 Apr 2003 13:33:16 -0400 Original-Received: from raven.i.defaultvalue.org (raven.i.defaultvalue.org [192.168.1.7]) by defaultvalue.org (Postfix) with ESMTP id 2A253A3C6; Fri, 11 Apr 2003 12:33:15 -0500 (CDT) Original-Received: by raven.i.defaultvalue.org (Postfix, from userid 1000) id 230102150F5; Fri, 11 Apr 2003 12:33:15 -0500 (CDT) Original-To: Marius Vollmer In-Reply-To: <87fzopxal5.fsf@raven.i.defaultvalue.org> (Rob Browning's message of "Fri, 11 Apr 2003 11:28:22 -0500") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Developers list for Guile, the GNU extensibility library List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: main.gmane.org gmane.lisp.guile.devel:2155 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:2155 Rob Browning writes: > What's really strange is here's what I get on powerpc with 1.6.3 right > now: > > (display (and 1 2 3 4 5)) (newline) > 4 > > I'm quite confused. Found it. In eval.c this construct: while (SCM_NNULLP (t.arg1 = SCM_CDR (t.arg1))) is apparently not OK. If you rewrite the code to separate the assignment and the test, assigning before the guard and at the end of the loop body, we get the expected result: (display (and 1 2 3 4 5)) (newline) 5 There's an identical construct just after nontoplevel_begin which causes a segfault which you have to fix before you can even test the above. At the moment I don't know if this is a legitimate optimzation interacting badly with our macros/fancy-bit-twiddling, or if it's a bug in gcc, but either way, I'm going to change the code in 1.6 and HEAD. Also I want to amend my comment about the "winds abort problem" before. In throw.c I suggested this as a possible fix (if we still need one): /* If the wind list is malformed, bail. */ if (!SCM_CONSP (winds)) abort (); /* this was added to fix a segfault on ia64 */ scm_remember_upto_here_1 (winds); but if there's any way gcc can know that abort never returns, I wonder if the following might be safer: /* If the wind list is malformed, bail. */ /* "remembers" added to fix a segfault on ia64 */ if (!SCM_CONSP (winds)) { scm_remember_upto_here_1 (winds); abort (); } scm_remember_upto_here_1 (winds); -- Rob Browning rlb @defaultvalue.org, @linuxdevel.com, and @debian.org Previously @cs.utexas.edu GPG starting 2002-11-03 = 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel