guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

powerpc problems at least partially fixed (more optimization issues).


From: Rob Browning
Subject: powerpc problems at least partially fixed (more optimization issues).
Date: Fri, 11 Apr 2003 12:33:15 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

Rob Browning <address@hidden> 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]