aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_strlen.S
blob: 27d9663eb861ab40df83399744f664415fce4aaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.text
.globl	u_strlen

u_strlen:
	movq	%rdi, %rcx

u_loop:
	cmpb	$0x0, (%rcx)
	je		u_ret
	inc		%rcx
	jmp		u_loop

u_ret:
	sub		%rdi, %rcx
	movq	%rcx, %rax
	retq