Message ID | 20160608210059.GA6694@intel.com |
---|---|
State | New |
Headers | show |
On 06/08/2016 11:00 PM, H.J. Lu wrote: > +/* X86-64 doesn't use memory copy functions. */ > +/* X86-64 doesn't use memory copy functions. */ Does this mean “any generic memory copying functions”? Thanks, Florian
On Thu, Jun 9, 2016 at 5:53 AM, Florian Weimer <fweimer@redhat.com> wrote: > On 06/08/2016 11:00 PM, H.J. Lu wrote: >> >> +/* X86-64 doesn't use memory copy functions. */ > > >> +/* X86-64 doesn't use memory copy functions. */ > > > Does this mean “any generic memory copying functions”? It means that x86-64 doesn't use string/wordcopy.c nor sysdeps/generic/memcopy.h.
There's no reason for the header, since sysdeps/generic/memcopy.h is just a header. In an x86_64 build, nothing should #include it and so that's fine. The files outside string/ that #include <memcopy.h> do so for no reason at all and those lines should just be removed from all of them. wordcopy.c is probably unused on several architectures. One approach would be to just drop it from routines in string/Makefile and add it via sysdep_routines for machines that actually need it. That doesn't seem quite right because generic string/foo.c uses it, but every architecture having a dummy file seems icky.
diff --git a/sysdeps/x86_64/memcopy.h b/sysdeps/x86_64/memcopy.h new file mode 100644 index 0000000..590b6cb --- /dev/null +++ b/sysdeps/x86_64/memcopy.h @@ -0,0 +1 @@ +/* X86-64 doesn't use memory copy functions. */ diff --git a/sysdeps/x86_64/wordcopy.c b/sysdeps/x86_64/wordcopy.c new file mode 100644 index 0000000..590b6cb --- /dev/null +++ b/sysdeps/x86_64/wordcopy.c @@ -0,0 +1 @@ +/* X86-64 doesn't use memory copy functions. */