Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/common/lib/libc/arch/mips/string Make these 64-bit clean.
details: https://anonhg.NetBSD.org/src/rev/a4f27f000b7e
branches: trunk
changeset: 760266:a4f27f000b7e
user: matt <matt%NetBSD.org@localhost>
date: Sun Jan 02 02:58:52 2011 +0000
description:
Make these 64-bit clean.
diffstat:
common/lib/libc/arch/mips/string/strchr.S | 8 ++++----
common/lib/libc/arch/mips/string/strrchr.S | 8 ++++----
2 files changed, 8 insertions(+), 8 deletions(-)
diffs (64 lines):
diff -r 38af57334884 -r a4f27f000b7e common/lib/libc/arch/mips/string/strchr.S
--- a/common/lib/libc/arch/mips/string/strchr.S Sun Jan 02 02:31:32 2011 +0000
+++ b/common/lib/libc/arch/mips/string/strchr.S Sun Jan 02 02:58:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $ */
+/* $NetBSD: strchr.S,v 1.3 2011/01/02 02:58:52 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
ASMSTR("from: @(#)index.s 8.1 (Berkeley) 6/4/93")
- ASMSTR("$NetBSD: strchr.S,v 1.2 2009/07/17 19:37:57 dsl Exp $")
+ ASMSTR("$NetBSD: strchr.S,v 1.3 2011/01/02 02:58:52 matt Exp $")
#endif /* LIBC_SCCS and not lint */
#ifdef __ABICALLS__
@@ -47,13 +47,13 @@
XLEAF(index)
1:
lbu a2, 0(a0) # get a byte
- addu a0, a0, 1
+ PTR_ADDU a0, 1
beq a2, a1, fnd
bne a2, zero, 1b
notfnd:
move v0, zero
j ra
fnd:
- subu v0, a0, 1
+ PTR_SUBU v0, a0, 1
j ra
END(strchr)
diff -r 38af57334884 -r a4f27f000b7e common/lib/libc/arch/mips/string/strrchr.S
--- a/common/lib/libc/arch/mips/string/strrchr.S Sun Jan 02 02:31:32 2011 +0000
+++ b/common/lib/libc/arch/mips/string/strrchr.S Sun Jan 02 02:58:52 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: strrchr.S,v 1.1 2009/07/16 21:25:36 dsl Exp $ */
+/* $NetBSD: strrchr.S,v 1.2 2011/01/02 02:58:52 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -36,7 +36,7 @@
#if defined(LIBC_SCCS) && !defined(lint)
ASMSTR("from: @(#)rindex.s 8.1 (Berkeley) 6/4/93")
- ASMSTR("$NetBSD: strrchr.S,v 1.1 2009/07/16 21:25:36 dsl Exp $")
+ ASMSTR("$NetBSD: strrchr.S,v 1.2 2011/01/02 02:58:52 matt Exp $")
#endif /* LIBC_SCCS and not lint */
#ifdef __ABICALLS__
@@ -48,9 +48,9 @@
move v0, zero # default if not found
1:
lbu a3, 0(a0) # get a byte
- addu a0, a0, 1
+ PTR_ADDU a0, a0, 1
bne a3, a1, 2f
- subu v0, a0, 1 # save address of last match
+ PTR_SUBU v0, a0, 1 # save address of last match
2:
bne a3, zero, 1b # continue if not end
j ra
Home |
Main Index |
Thread Index |
Old Index