scc

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

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

 1	.file "strcmp.s"
 2
 3	.text
 4	.globl	strcmp,_strcmp
 5_strcmp:
 6strcmp:
 7	movq	%rdi,%r8
 8	movb	$0,%al
 9	movq	$-1,%rcx
10	cld
11	repne
12	scasb
13
14	leaq	0(%rdi),%rcx
15	subq	%r8,%rcx
16	movq	%r8,%rdi
17
18	xor	%rax,%rax	/* set ZF to 1 */
19
20	movq	%rdi,%r8
21	movq	%rsi,%rdi
22	movq	%r8,%rsi
23	rep
24	cmpsb
25	je	equa
26	jb	less
27	ja	grea
28
29grea:
30	movq	$1,%rax
31	ret
32
33less:
34	movq	$-1,%rax
35	ret
36
37equa:
38	movq	$0,%rax
39	ret