Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/arch/sparc64/string The mask for 8-byte alignment i...
details: https://anonhg.NetBSD.org/src/rev/8e561e267465
branches: trunk
changeset: 524951:8e561e267465
user: eeh <eeh%NetBSD.org@localhost>
date: Tue Apr 02 22:07:55 2002 +0000
description:
The mask for 8-byte alignment is 0x7 not 0xf.
diffstat:
lib/libc/arch/sparc64/string/strlen.S | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (55 lines):
diff -r ee6ff4e883d9 -r 8e561e267465 lib/libc/arch/sparc64/string/strlen.S
--- a/lib/libc/arch/sparc64/string/strlen.S Tue Apr 02 20:48:01 2002 +0000
+++ b/lib/libc/arch/sparc64/string/strlen.S Tue Apr 02 22:07:55 2002 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: strlen.S,v 1.3 2002/04/01 15:59:26 eeh Exp $ */
+/* $NetBSD: strlen.S,v 1.4 2002/04/02 22:07:55 eeh Exp $ */
/*
- * Copyright 2001 Wasabi Systems, Inc.
+ * Copyright 2002 Wasabi Systems, Inc.
* All rights reserved.
*
* Written by Eduardo Horvath for Wasabi Systems, Inc.
@@ -39,7 +39,7 @@
#include <machine/asm.h>
#if defined(LIBC_SCCS) && !defined(lint)
- RCSID("$NetBSD: strlen.S,v 1.3 2002/04/01 15:59:26 eeh Exp $")
+ RCSID("$NetBSD: strlen.S,v 1.4 2002/04/02 22:07:55 eeh Exp $")
#endif /* LIBC_SCCS and not lint */
/* The algorithm here uses the following techniques:
@@ -65,7 +65,7 @@
/*
* Calculate address for and load the first xword.
*/
- andn %o0, 0xf, %o1
+ andn %o0, 0x7, %o1
ldx [%o1], %g1
/*
@@ -78,7 +78,7 @@
or %o2, %lo(0x7f7f7f7f), %o2
sllx %o3, 32, %o5
- andcc %o0, 0xf, %g5 ! Hoisted from below to fill a slot
+ andcc %o0, 0x7, %g5 ! Hoisted from below to fill a slot
sllx %o2, 32, %o4
or %o3, %o5, %o3
@@ -92,11 +92,11 @@
/*
* Mask off the leading bits:
*
- * if (ptr & 0xf)
- * mask = -1 << (64 - ((ptr & 0xf) << 3));
+ * if (ptr & 0x7)
+ * mask = -1 << (64 - ((ptr & 0x7) << 3));
*/
-! andcc %o0, 0xf, %g5 ! Hoisted above
+! andcc %o0, 0x7, %g5 ! Hoisted above
bz,pt %icc, 0f
Home |
Main Index |
Thread Index |
Old Index