Module Name: src Committed By: matt Date: Sun Jan 2 02:58:52 UTC 2011
Modified Files: src/common/lib/libc/arch/mips/string: strchr.S strrchr.S Log Message: Make these 64-bit clean. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/common/lib/libc/arch/mips/string/strchr.S cvs rdiff -u -r1.1 -r1.2 src/common/lib/libc/arch/mips/string/strrchr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/lib/libc/arch/mips/string/strchr.S diff -u src/common/lib/libc/arch/mips/string/strchr.S:1.2 src/common/lib/libc/arch/mips/string/strchr.S:1.3 --- src/common/lib/libc/arch/mips/string/strchr.S:1.2 Fri Jul 17 19:37:57 2009 +++ src/common/lib/libc/arch/mips/string/strchr.S Sun Jan 2 02:58:52 2011 @@ -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) Index: src/common/lib/libc/arch/mips/string/strrchr.S diff -u src/common/lib/libc/arch/mips/string/strrchr.S:1.1 src/common/lib/libc/arch/mips/string/strrchr.S:1.2 --- src/common/lib/libc/arch/mips/string/strrchr.S:1.1 Thu Jul 16 21:25:36 2009 +++ src/common/lib/libc/arch/mips/string/strrchr.S Sun Jan 2 02:58:52 2011 @@ -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