This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 3/3] Add i386 memset and memcpy assembly functions
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: OndÅej BÃlka <neleai at seznam dot cz>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Wed, 26 Aug 2015 07:49:51 -0700
- Subject: Re: [PATCH 3/3] Add i386 memset and memcpy assembly functions
- Authentication-results: sourceware.org; auth=none
- References: <20150826134631 dot GC19484 at gmail dot com> <20150826142924 dot GC13215 at domone>
On Wed, Aug 26, 2015 at 7:29 AM, OndÅej BÃlka <firstname.lastname@example.org> wrote:
> On Wed, Aug 26, 2015 at 06:46:31AM -0700, H.J. Lu wrote:
>> Add i386 memset and memcpy assembly functions with REP MOVSB/STOSB
>> instructions. They will be used to implement i386 multi-arch memcpy.
>> OK for master?
> No, as rep stosb has terrible performance on most of machines, on ivy
> bridge its around six times slower than rep stosq. I wouldn't be
I added them for i386 memcpy family multiarch functions. We have
memcpy for i586 and i686:
But we don't have it for i486. I add them so that I can implement
i386 memset and memcpy family multiarch functions for i486,
i586 and i686 targets. i386 memset and memcpy are used only
1. Building glibc for i486 with --disable-multi-arch. Or
2. Processor doesn't support i686 nor SSE2.
I believe these are a very rare cases.