code: 9ferno

ref: 2d7cc7c32299e2b49e3be6d3f9c21f43c3ce7415
dir: /libkern/strchr-power.s/

View raw version
/*
 * BUG: it's slow
 */
	TEXT	strchr(SB), $0
	MOVBZ	c+7(FP), R4
	SUB	$1, R3
l1:
	MOVBZU	1(R3), R6
	CMP	R6, R4
	BEQ	eq
	CMP	R6, $0
	BNE	l1
nf:
	MOVW	$0, R3
eq:
	RETURN