Subject: Need tester
To: None <port-macppc@netbsd.org>
From: Juergen Hannken-Illjes <hannken@eis.cs.tu-bs.de>
List: port-macppc
Date: 03/14/2003 13:20:32
It looks like src/lib/libc/arch/powerpc/string/bzero.S still contains
an implicit assumption of a 32 byte cache line.  Using the appended
patch my PowerPC 403 based userland doesn't dump core any more.

Before toasting the macppc port could someone please check, if it still
works for macppc?

- patch src/lib/libc/arch/powerpc/string/bzero.S
- build and install libc (back up the old one first)
- see it run (or fail)

-- 
Juergen Hannken-Illjes - hannken@eis.cs.tu-bs.de - TU Braunschweig (Germany)

Index: src/lib/libc/arch/powerpc/string/bzero.S
===================================================================
RCS file: /cvsroot/src/lib/libc/arch/powerpc/string/bzero.S,v
retrieving revision 1.5
diff -u -2 -r1.5 bzero.S
--- bzero.S	2002/07/30 06:07:58	1.5
+++ bzero.S	2003/03/11 11:20:18
@@ -245,5 +245,7 @@
 		/* so no need to check for r_len = 0 */
 
-		rlwinm.	%r5, r_dst, 30, 29, 31
+		subi	%r6, %r9, 1		/* CL mask */
+		and.	%r5, r_dst, %r6
+		srwi	%r5, %r5, 2
 		srwi	%r6, %r9, 2
 		beq	cb_aligned_cb		/* already on CL boundary? */