From: Maxim Kuvyrkov <maxim@kugelworks.com>
To: Steve Ellcey <sellcey@mips.com>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>, <libc-ports@sourceware.org>
Subject: Re: [patch, mips, memmove] Remove memmove's use of memcpy on MIPS
Date: Sat, 26 Jan 2013 02:09:00 -0000 [thread overview]
Message-ID: <19B90A0A-12E1-496F-809B-88DF446BEEE3@kugelworks.com> (raw)
In-Reply-To: <1359149324.11963.183.camel@ubuntu-sellcey>
On 26/01/2013, at 10:28 AM, Steve Ellcey wrote:
> On Fri, 2013-01-25 at 20:16 +0000, Joseph S. Myers wrote:
>> On Fri, 25 Jan 2013, Steve Ellcey wrote:
>>
>>> Rather then use a slower safer prefetch for memcpy, which would also fix
>>> this problem, I would like to remove the setting of MEMCPY_OK_FOR_FWD_MEMMOVE
>>> in memmove.c.
>>
>> Removing the MIPS memmove.c is OK. There's no point in having the file
>> when it doesn't define MEMCPY_OK_FOR_FWD_MEMMOVE
>
> I am hoping to improve memcpy at some point so that it will be safe to
> use memcpy in memmove again. Given that, do you think I should still
> just remove the MIPS memmove.c and recreate it later when needed or
> would it make sense to keep it so I can just set the macro when it is
> safe to do so.
If you want to keep memmove at top speed you could add a memmove-safe instance of memcpy.S and then use that one in memmove. I.e. (roughly),
sysdeps/mips/memmove.c:
#define MEMCPY memcpy_for_memmove
#define MEMCPY_OK_FOR_FWD_MEMMOVE 1
#include <string/memmove.c> // Adjust string/memmove.c to use "MEMCPY" instead of "memcpy".
sysdeps/mips/memcpy_for_memmove.S:
#define MEMCPY memcpy_for_memmove
#define HIDDEN .hidden // Don't export this copy of memcpy.
#define PREFETCH ... // Define safe prefetch.
#include "memcpy.S"
--
Maxim Kuvyrkov
KugelWorks
prev parent reply other threads:[~2013-01-26 2:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-25 18:17 Steve Ellcey
2013-01-25 18:55 ` Chris Metcalf
2013-01-25 19:29 ` Steve Ellcey
2013-01-25 20:16 ` Joseph S. Myers
2013-01-25 21:29 ` Steve Ellcey
2013-01-25 23:15 ` Joseph S. Myers
2013-01-26 2:09 ` Maxim Kuvyrkov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19B90A0A-12E1-496F-809B-88DF446BEEE3@kugelworks.com \
--to=maxim@kugelworks.com \
--cc=joseph@codesourcery.com \
--cc=libc-ports@sourceware.org \
--cc=sellcey@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).