This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Gcc builtin functions used by glibc not available on mips
- From: Geoff Keating <geoffk at geoffk dot org>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: drepper at redhat dot com, GNU C Library <libc-alpha at sources dot redhat dot com>, gcc at gcc dot gnu dot org, echristo at redhat dot com
- Date: 07 Feb 2002 03:13:35 -0800
- Subject: Re: Gcc builtin functions used by glibc not available on mips
- References: <20020206222554.A5621@lucon.org>
"H . J . Lu" <hjl@lucon.org> writes:
> In glibc, there are codes
>
> /* 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. */
> #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
GCC does not promise that __builtin_memset will be inlined. Whether
it calls memset() can depend on details such as which CPU was selected
to tune for (eg. Pentium III vs. Pentium 4).
--
- Geoffrey Keating <geoffk@geoffk.org> <geoffk@redhat.com>