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

u_strlen:
	mov		%rdi, %rcx

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

u_ret:
	sub		%rdi, %rcx
	mov		%rcx, %rax
	ret