diff --git a/lib/libc/mips/string/strchr.S b/lib/libc/mips/string/strchr.S index 198366f87a69..19dae58415e2 100644 --- a/lib/libc/mips/string/strchr.S +++ b/lib/libc/mips/string/strchr.S @@ -44,7 +44,12 @@ __FBSDID("$FreeBSD$"); .abicalls #endif +/* + * char * + * strchr(const char *s, int c); + */ LEAF(strchr) + and a1, a1, 0xff 1: lbu a2, 0(a0) # get a byte PTR_ADDU a0, a0, 1 diff --git a/lib/libc/mips/string/strrchr.S b/lib/libc/mips/string/strrchr.S index 5a88a42c8e17..c0dcef049d6e 100644 --- a/lib/libc/mips/string/strrchr.S +++ b/lib/libc/mips/string/strrchr.S @@ -44,8 +44,13 @@ __FBSDID("$FreeBSD$"); .abicalls #endif +/* + * char * + * strrchr(const char *s, int c); + */ LEAF(strrchr) move v0, zero # default if not found + and a1, a1, 0xff 1: lbu a3, 0(a0) # get a byte PTR_ADDU a0, a0, 1