more m68k breakage on m68k-linux
Richard Zidlicky
rz@linux-m68k.org
Tue Mar 2 09:14:00 GMT 2004
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
More information about the Gcc
mailing list