9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] bug in powerpc libc powerpc memccpy.s
@ 2003-07-03 20:56 Tad Hunt
  0 siblings, 0 replies; only message in thread
From: Tad Hunt @ 2003-07-03 20:56 UTC (permalink / raw)
  To: 9fans


There is only one required change, Line 22 needs to change from
the MOVW to the ADD.  As implemented, memccpy() returns the wrong
pointer into the wrong string.  The other changes are whitespace
related.  Oh yeah, and the Z on the store doesn't really make sense
to me, so I got rid of it.  The store with or without the Z results
in the same instruction.

-Tad

diff local/sys/src/libc/power/memccpy.s dist/sys/src/libc/power/memccpy.s
3c3
< 	MOVW	R3, s1+0(FP)
---
> MOVW R3, s1+0(FP)
7d6
<
11d9
<
17c15
< 	MOVBU	R6, 1(R3)
---
> 	MOVBZU	R6, 1(R3)
24c22
< 	ADD	$1, R3
---
> 	MOVW	R4, R3


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-03 20:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 20:56 [9fans] bug in powerpc libc powerpc memccpy.s Tad Hunt

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 NNTP newsgroup(s).