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: gcc-patches at gcc dot gnu dot org, Jan Hubicka <jh at suse dot cz>
- Subject: Re: fix strlensi in i386.md
- From: Zack Weinberg <zack at wolery dot cumb dot org>
- Date: Fri, 3 Mar 2000 21:29:46 -0800
- Cc: pthomas at suse dot de
- References: <20000303222546.A16711@Jeffreys.suse.de>
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.
To work around, I suggest inserting 'return 0;' at the beginning of
expand_builtin_strlen, which will turn off the damn thing entirely.
zw