This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: memset() Optimization on x86-32 bit
- From: Ian Lance Taylor <ian at airs dot com>
- To: Kevin McBride <kevin at planetsaphire dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 28 Aug 2005 11:13:15 -0700
- Subject: Re: memset() Optimization on x86-32 bit
- References: <430FE4C1.7010005@planetsaphire.com>
Kevin McBride <kevin@planetsaphire.com> writes:
> If you look closely, you can see that %edi can be automatically loaded
> directly without problems, and that (%eax) can be directly loaded into
> (%esp). Is this behavior intentional (for bugs I don't know about in
> earlier processors) or could this optimization be fixed to use less
> instructions?
>From the code you presented, I expect this optimization can be fixed.
But it's difficult to work with an incomplete program fragment.
Please open a PR at http://gcc.gnu.org/bugzilla/ with the complete
preprocessed source code for a file showing the problem. Thanks.
Ian