This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Updated x86-64 memcpy and New x86-64 memset
- From: "H.J. Lu" <hjl at lucon dot org>
- To: Evandro Menezes <evandro at yahoo dot com>
- Cc: Ulrich Drepper <drepper at redhat dot com>, List GLIBC <libc-alpha at sourceware dot org>, harsha dot jagasia at amd dot com, michael dot meissner at amd dot com, christophe dot harle at amd dot com
- Date: Mon, 27 Aug 2007 10:22:47 -0700
- Subject: Re: Updated x86-64 memcpy and New x86-64 memset
- References: <816394.58881.qm@web38905.mail.mud.yahoo.com>
On Sat, Aug 25, 2007 at 11:36:45AM -0700, Evandro Menezes wrote:
> Ulrich,
>
> > You compare (in memcpy) what is larger:
> >
> > __x86_64_core_cache_size_half
> > _x86_64_data_cache_size_half
> >
> > The result is never going to change. Therefore this should be done in
> > the cacheinfo initialization. If one of the vars is never used
> > otherwise remove it (I haven't checked it).
>
> The way I wrote the initialization code, if a cache topology is absent its corresponding variable has a value of zero.
>
memcpy change is incorrect. I got
tst-chk2.c:(.text+0x52f): undefined reference to `__mempcpy_chk'
tst-chk2.c:(.text+0x7f0): undefined reference to `__mempcpy_chk'
tst-chk2.c:(.text+0x3a71): undefined reference to `__mempcpy_chk'
tst-chk2.c:(.text+0x3e0b): undefined reference to `__mempcpy_chk'
collect2: ld returned 1 exit status
H.J.