From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: Richard Henderson <rth@twiddle.net>,
Andrew Morton <akpm@osdl.org>,
Marcelo Tosatti <marcelo@conectiva.com.br>,
Linus Torvalds <torvalds@osdl.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [ALPHA] Fix unaligned stxncpy again
Date: Fri, 9 Apr 2004 23:35:11 +0400 [thread overview]
Message-ID: <20040409233511.B727@den.park.msu.ru> (raw)
In-Reply-To: <20040409103244.GA1904@gondor.apana.org.au>; from herbert@gondor.apana.org.au on Fri, Apr 09, 2004 at 08:32:44PM +1000
On Fri, Apr 09, 2004 at 08:32:44PM +1000, Herbert Xu wrote:
> The current stxncpy on alpha is still broken when it comes to single
> word, unaligned, src misalignment > dest misalignment copies.
>
> I've attached a program which demonstrates this problem.
Ugh, indeed. It fails when there is a zero byte before the data.
Thanks.
> So here is the patch to revert the unaligned case to use the same code
> as glibc.
Here is simpler equivalent of that and ev6 fix.
Ivan.
--- linux.orig/arch/alpha/lib/ev6-stxncpy.S Sun Apr 4 07:37:42 2004
+++ linux/arch/alpha/lib/ev6-stxncpy.S Fri Apr 9 22:13:40 2004
@@ -365,7 +365,7 @@ $unaligned:
andnot t2, t6, t12 # E : dest mask for a single word copy
or t8, t10, t5 # E : test for end-of-count too
- cmpbge zero, t2, t3 # E :
+ cmpbge zero, t12, t3 # E :
cmoveq a2, t5, t8 # E : Latency=2, extra map slot
nop # E : keep with cmoveq
andnot t8, t3, t8 # E : (stall)
--- linux.orig/arch/alpha/lib/stxncpy.S Sun Apr 4 07:38:22 2004
+++ linux/arch/alpha/lib/stxncpy.S Fri Apr 9 22:14:24 2004
@@ -317,7 +317,7 @@ $unaligned:
cmpbge zero, t1, t8 # .. e1 : is there a zero?
andnot t2, t6, t12 # e0 : dest mask for a single word copy
or t8, t10, t5 # .. e1 : test for end-of-count too
- cmpbge zero, t2, t3 # e0 :
+ cmpbge zero, t12, t3 # e0 :
cmoveq a2, t5, t8 # .. e1 :
andnot t8, t3, t8 # e0 :
beq t8, $u_head # .. e1 (zdb)
next prev parent reply other threads:[~2004-04-09 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-09 10:32 Herbert Xu
2004-04-09 19:35 ` Ivan Kokshaysky [this message]
2004-04-09 23:50 ` Herbert Xu
2004-04-10 17:46 ` Ivan Kokshaysky
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=20040409233511.B727@den.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=akpm@osdl.org \
--cc=herbert@gondor.apana.org.au \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
--cc=rth@twiddle.net \
--cc=torvalds@osdl.org \
/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
all inboxes | Powered by JetHome®