[PATCH 6/6] Compile sched_getaffinity.c with -fno-builtin-memset
Joseph Myers
joseph@codesourcery.com
Fri Aug 14 16:11:00 GMT 2015
On Fri, 14 Aug 2015, H.J. Lu wrote:
> > We're declaring (essentially, though a load of macros):
> >
> > extern __typeof (memset) memset __asm__ ("__GI_memset") __attribute__ ((visibility ("hidden")));
> >
> > GCC is using the __asm__ information to compile calls to __builtin_memset
> > to use the assembler name __GI_memset - that is, in that regard our
> > declaration is being taken as applying to the libcall. If it's not also
> > using the visibility information to know that those are calls within the
> > library and don't need to set up %ebx, that's a clear inconsistency; all
> > pieces of information from an explicit declaration of a built-in function
> > should be treated the same unless there is a clear reason not to do so.
> >
>
> Should I open a GCC bug?
If you wish (and have verified that %ebx is being unnecessarily set up).
It's a missed optimization rather than an actual bug.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list