This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug string/20736] powerpc: string2.h strcmp macro gratuitously adds __builtin_


https://sourceware.org/bugzilla/show_bug.cgi?id=20736

--- Comment #5 from Aaron Sawdey <acsawdey at gcc dot gnu.org> ---
Tulio,
  Yes this is specific to powerpc because I am adding gcc builtin expansion of
strncmp/strcmp. When I did the same thing for memcmp I was able to test the
builtin expansion vs the base case by turning it off with -fno-builtin-memcmp.

Ultimately it doesn't matter if this changes and it sounds like it won't. "The
code looks nicer" carries little weight vs performance numbers as you say.

The thing that I will want do do (but not via this BZ) is to get some of this
macro expansion trickery out of the way because gcc's expansion can generate a
whole lot better code especially when gcc knows the alignment of the string
pointers due to analysis. But this can be done via
_HAVE_STRING_ARCH_strcmp/strncmp in sysdeps/powerpc/bits/string.h.

I think this answers the question and this bug can be closed.

Thanks,
    Aaron

-- 
You are receiving this mail because:
You are on the CC list for the bug.

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