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]
Other format: [Raw text]

Re: [PATCH,i386] fix PR 11001


On 10/4/07, Nathan Froyd <froydnj@codesourcery.com> wrote:

> - we don't run the heuristic if we cannot use rep prefixes and default
>   to libcalls if we cannot find another strategy (loops or unrolled
>   loops) for the size of block we are setting/copying--for situations
>   where rep prefixes cannot be used.  I am unsure of what you were
>   suggesting here--I read your first paragraph as saying that
>   TARGET_INLINE_ALL_STRINGOPS* be respected whereas the second paragraph
>   seems to say that it's ok to punt and choose libcalls if we can't do
>   rep-based copying.

Sorry for not being clear here. TARGET_INLINE_ALL_STRINGOPS* should be
respected, and libcalls should not be generated in this case. For
example, we use -minline-all-stringops to build crtfastmath.o. For
some targets, we don't  want to link against libc to use memset
routine.

> Bootstrapped and tested on x86_64-unknown-linux-gnu.  Modified ChangeLog
> entry below; entries for testcases not included.

>         PR 11001
>         gcc/
>         * config/i386/i386.md (strmov): Check for esi and edi usage.
>         * config/i386/i386.c (decide_alg): Check whether we can use a
>         rep prefix and adjust algorithm choice accordingly.
>         (ix86_expand_strlen): Check for eax, ecx, and edi usage.

The patch is OK  with above change, but please wait a day or two for
possilbe comments from Jan, as he is the original author of stringops
code.

Thanks,
Uros.


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