This is the mail archive of the
mailing list for the glibc project.
Re: Gcc builtin functions used by glibc not available on mips
- From: mike stump <mrs at windriver dot com>
- To: hjl at lucon dot org, libc-alpha at sources dot redhat dot com
- Cc: echristo at redhat dot com, gcc at gcc dot gnu dot org
- Date: Thu, 7 Feb 2002 11:58:30 -0800 (PST)
- Subject: Re: Gcc builtin functions used by glibc not available on mips
> Date: Wed, 6 Feb 2002 22:25:54 -0800
> From: "H . J . Lu" <firstname.lastname@example.org>
> To: GNU C Library <email@example.com>
> Cc: firstname.lastname@example.org, email@example.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));
> for (cnt = 0;
> cnt < sizeof (bootstrap_map.l_info) / sizeof (bootstrap_map.l_info);
> bootstrap_map.l_info[cnt] = 0;
> used in ld.so bootstrap. The problem is even gcc 3.1 doesn't have a
> real __builtin_memset for mips.