This is the mail archive of the libc-alpha@sources.redhat.com 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]

Re: Gcc builtin functions used by glibc not available on mips


> Date: Wed, 6 Feb 2002 22:25:54 -0800
> From: "H . J . Lu" <hjl@lucon.org>
> To: GNU C Library <libc-alpha@sources.redhat.com>
> Cc: gcc@gcc.gnu.org, echristo@redhat.com

>   /* Partly clean the `bootstrap_map' structure up.  Don't use
>      `memset' since it might not be built in or inlined and we cannot
>      make function calls at this point.  Use '__builtin_memset' if we
>      know it is available.  */

Hum, if you cannot tolerate a function call, I tend to think that the
whole #if should go away.  gcc might generate one for obscure reasons.

Also, your test for __builtin_memset doesn't seem to take into
consideration wether or not a call was generated.  I'm not sure that
the test is right.  If you want to be sure that no call is generated,
then I think you need a test that the assembly file doesn't contain
the word memset or bzero.  If it does, then assume that that the call
was not inlined.

> #if __GNUC_PREREQ (2, 96) 
>   __builtin_memset (bootstrap_map.l_info, '\0', sizeof (bootstrap_map.l_info));
> #else
>   for (cnt = 0;
>        cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info[0]);
>        ++cnt)
>     bootstrap_map.l_info[cnt] = 0;
> #endif

> used in ld.so bootstrap. The problem is even gcc 3.1 doesn't have a
> real __builtin_memset for mips.


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