Index: head/lib/libc/mips/string/strchr.S =================================================================== --- head/lib/libc/mips/string/strchr.S +++ head/lib/libc/mips/string/strchr.S @@ -44,7 +44,12 @@ .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 Index: head/lib/libc/mips/string/strrchr.S =================================================================== --- head/lib/libc/mips/string/strrchr.S +++ head/lib/libc/mips/string/strrchr.S @@ -44,8 +44,13 @@ .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