From: Richard Zidlicky <rz@linux-m68k.org>
To: Bernardo Innocenti <bernie@develer.com>
Cc: peter@baradas.org, Matthias Klose <doko@cs.tu-berlin.de>,
gcc@gcc.gnu.org, Gunther Nikl <gni@gecko.de>,
Andreas Schwab <schwab@suse.de>
Subject: Re: more m68k breakage on m68k-linux
Date: Wed, 03 Mar 2004 13:27:00 -0000 [thread overview]
Message-ID: <20040303131513.GC1640@linux-m68k.org> (raw)
In-Reply-To: <404595B0.4090005@develer.com>
On Wed, Mar 03, 2004 at 09:22:08AM +0100, Bernardo Innocenti wrote:
> Richard Zidlicky wrote:
>
> >>>Note the typo "FIRST_PSEOUDO_REGISTER".. made it somewhat hard to
> >>>find the change.
> >>
> >>Oops! That's very unfortunate. I've fixed it in the ChangeLog.
> >
> >thanks.. I should have used agrep or something :)
>
> What's that? Is it perhaps an heuristic version of grep?
> I'd badly need something like that! :-)
http://laurikari.net/tre/
I have just installed it a few days ago so not many experiences
yet.
agrep -2 FIRST_PSEUDO_REGISTER ChangeLog*
> >>If I didn't increment FIRST_PSEUDO_REGISTER, register 25 would
> >>be used both as the argptr and as a placeholder for some
> >>temporary register, with very interesting consequences :-)
> >
> >hm.. the problem I see is that the register allocator is initialised
> >with random garbage. Eg FIXED_REGISTERS is 24 elts big, thus
> >initial_fixed_regs[] is also only 24 elts and in init_reg_sets() we
> >copy a random 25th elt into fixed_regs[] and risk segfault.
> >I am pretty sure more it results in more damage later on.
>
> That's a nice catch, and it would explain all the strange
> bootstrap failures we've seen, but... I can't see this bug
> in current mainline code:
>
> void
> init_reg_sets (void)
> {
> int i, j;
>
> /* First copy the register information from the initial int form into
> the regsets. */
>
> for (i = 0; i < N_REG_CLASSES; i++)
> {
> CLEAR_HARD_REG_SET (reg_class_contents[i]);
>
> /* Note that we hard-code 32 here, not HOST_BITS_PER_INT. */
> for (j = 0; j < FIRST_PSEUDO_REGISTER; j++)
> if (int_reg_class_contents[i][j / 32]
> & ((unsigned) 1 << (j % 32)))
> SET_HARD_REG_BIT (reg_class_contents[i], j);
> }
>
> memcpy (fixed_regs, initial_fixed_regs, sizeof fixed_regs);
sizeof fixed_regs != sizeof initial_fixed_regs
<rant>
I vote for rewriting gcc in Lisp, Ocaml or Prolog. It does already
have two garbage collectors and implements a large superset of every
Lisp interpreter out there. It can only get faster if implemented
in a higher level PL. Many Lisp dialects (and not only those) offer
far superior HW independence and portability compared to C and we
do still spend too much time hunting bugs that would be outright
impossible in a higher level language.
</rant>
Richard
next prev parent reply other threads:[~2004-03-03 13:27 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-18 1:50 Bernardo Innocenti
2004-01-18 4:52 ` Bernardo Innocenti
2004-01-18 9:59 ` Matthias Klose
2004-01-18 10:07 ` Bernardo Innocenti
2004-01-20 9:15 ` Andreas Schwab
2004-01-20 10:36 ` Bernardo Innocenti
2004-03-01 20:15 ` Richard Zidlicky
2004-03-01 22:05 ` Richard Zidlicky
2004-03-02 0:18 ` Bernardo Innocenti
2004-03-02 9:14 ` Richard Zidlicky
2004-03-02 10:42 ` Gunther Nikl
2004-03-02 18:19 ` Richard Henderson
2004-03-02 19:33 ` Roman Zippel
2004-03-02 21:32 ` Richard Henderson
2004-03-02 22:26 ` Richard Zidlicky
2004-03-03 8:53 ` Bernardo Innocenti
2004-03-03 10:13 ` Roman Zippel
2004-03-03 11:03 ` Andreas Schwab
2004-03-03 22:38 ` Bernardo Innocenti
2004-03-04 0:35 ` Richard Henderson
2004-03-04 7:25 ` Gunther Nikl
2004-03-04 18:45 ` Richard Zidlicky
2004-03-04 22:46 ` Andreas Schwab
2004-03-04 10:58 ` Gunther Nikl
2004-03-04 13:27 ` Bernardo Innocenti
2004-03-04 13:45 ` Roman Zippel
2004-03-04 15:32 ` Gunther Nikl
2004-03-07 15:05 ` Bernardo Innocenti
2004-03-08 16:31 ` Gunther Nikl
2004-03-08 21:38 ` Bernardo Innocenti
2004-03-09 8:40 ` Gunther Nikl
2004-03-09 22:35 ` Bernardo Innocenti
[not found] ` <20040308181401.0DB3498C8A@baradas.org>
2004-03-08 21:45 ` You ucLinux patches break RTEMS building Bernardo Innocenti
2004-03-03 8:22 ` more m68k breakage on m68k-linux Bernardo Innocenti
2004-03-03 13:27 ` Richard Zidlicky [this message]
2004-03-01 22:30 ` Andreas Schwab
2004-03-02 0:07 ` Bernardo Innocenti
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040303131513.GC1640@linux-m68k.org \
--to=rz@linux-m68k.org \
--cc=bernie@develer.com \
--cc=doko@cs.tu-berlin.de \
--cc=gcc@gcc.gnu.org \
--cc=gni@gecko.de \
--cc=peter@baradas.org \
--cc=schwab@suse.de \
/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).