This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: more m68k breakage on m68k-linux


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]