This is the mail archive of the gcc-patches@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]

Re: fix strlensi in i386.md


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

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