This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix strlensi in i386.md
- To: Zack Weinberg <zack at wolery dot cumb dot org>
- Subject: Re: fix strlensi in i386.md
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Sun, 5 Mar 2000 13:58:50 +0100
- Cc: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>, pthomas at suse dot de
- References: <20000303222546.A16711@Jeffreys.suse.de> <20000303212945.C10851@wolery.cumb.org>
> 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