fix strlensi in i386.md

Jan Hubicka hubicka@atrey.karlin.mff.cuni.cz
Sun Mar 5 04:58:00 GMT 2000


> On Fri, Mar 03, 2000 at 10:25:46PM +0100, Philipp Thomas wrote:
> > 
> > eoschar and align were accessed befor being initialized. Here's what I think
> > is the correct fix:
> > 
> > 
> > Fri Mar 03 22:21:40 2000  Philipp Thomas <pthomas@suse.de>
> > 
> > 	* config/i386/i386.md(strlensi): Initialize variables before
> >         accessing them.
> 
> This is necessary, but not sufficient.  builtins.c can't cope with the
> strlensi expander using FAIL, and the strlensi expander doesn't have
> enough information to generate a normal call.
> 
> I tried to teach builtins.c to cope with the expander failing, but
> that causes problems elsewhere.  The trouble is that by the time we
> get to calling gen_strlensi, we've already done a bunch of setup,
> including insn generation, and that has to be backed out.  I don't
> know how to do that properly.

Firstly, I am sorry for such breakage my patch caused. It worked for me for
some purpose.
Easiest way how to fix this problem is to restore old behaviour and inline
strlen always. I will take a look at builtins.c and try to fix the problem
correctly there. until monday.

By removing the if with FAIL you will get correctly expanded strlen, so this
can fix the propblem temporarily.

Honza


More information about the Gcc-patches mailing list