Plan 9 from Bell Labs’s /sys/src/ape/lib/ap/riscv64/unused/strcmp.s

Copyright © 2021 Plan 9 Foundation
Distributed under the MIT License.
Download the Plan 9 distribution.


TEXT	strcmp(SB), $0
	MOV	s2+XLEN(FP), R9

l1:
	MOVBU	(R9), R10
	MOVBU	(R8), R11
	ADD	$1, R8
	BEQ	R10, end
	ADD	$1, R9
	BEQ	R10, R11, l1

	SLTU	R11, R10, R8
	BNE	R8, ret
	MOV	$-1, R8
	RET

end:
	SLTU	R11, R10, R8
ret:
	RET

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@plan9.bell-labs.com.