This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: more m68k breakage on m68k-linux
- From: Richard Zidlicky <rz at linux-m68k dot org>
- To: Bernardo Innocenti <bernie at develer dot com>
- Cc: peter at baradas dot org, Matthias Klose <doko at cs dot tu-berlin dot de>,gcc at gcc dot gnu dot org, Gunther Nikl <gni at gecko dot de>,Andreas Schwab <schwab at suse dot de>
- Date: Tue, 2 Mar 2004 09:53:05 +0100
- Subject: Re: more m68k breakage on m68k-linux
- References: <4009E670.5090600@develer.com> <16394.22429.131429.162236@gargle.gargle.HOWL> <m31xpxs6wx.fsf@whitebox.m5r.de> <20040301200553.GA4188@linux-m68k.org> <20040301215409.GA18138@linux-m68k.org> <4043D2EB.1050602@develer.com>
On Tue, Mar 02, 2004 at 01:18:51AM +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 :)
> >This looks highly bogus to me: You create a new "hard" register but
> >dont init it anywhere (FIXED_REGISTERS,...). You change ARG_POINTER_REGNUM
> >from 14 to 24 claiming in the comment that it is not a hard register..
> >well it is still < FIRST_PSEOUDO_REGISTER so it is a hard register.
>
> All registers >= FIRST_PSEUDO_REGISTER are free for use in
> RTL expressions as temporaries before the register allocator
> pass moves them to a hard register.
>
> 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.
Richard