scc

A fork of https://git.simple-cc.org/scc/ for Qute

git clone https://git.8pit.net/scc.git

 1	.file 	"strchr.s"
 2
 3	.text
 4	.globl	strchr,_strchr
 5_strchr:
 6strchr:
 7	movq	%rdi,%r8
 8
 9	movb	$0,%al
10	movq	$-1,%rcx
11	cld
12	repne
13	scasb
14
15	leaq	0(%rdi),%rcx
16	subq	%r8,%rcx
17
18	cmp     %rdi,%rsi       /* set ZF to 0 */
19
20	movq	%r8,%rdi
21	movb	%sil,%al
22	repne
23	scasb
24	je 	found
25
26none:
27	xor	%rax,%rax
28	ret
29
30found:
31	leaq	-1(%rdi),%rax
32	ret