clarify the purpose of this project
[nyanglibc.git] / string / basename.s
blob584e94a994023a8225d42f9798e5f9e0e63a485d
1 .text
2 .p2align 4,,15
3 .globl __basename
4 .hidden __basename
5 .type __basename, @function
6 __basename:
7 pushq %rbx
8 movl $47, %esi
9 movq %rdi, %rbx
10 call strrchr
11 leaq 1(%rax), %rdx
12 testq %rax, %rax
13 movq %rbx, %rax
14 popq %rbx
15 cmovne %rdx, %rax
16 ret
17 .size __basename, .-__basename
18 .weak basename
19 .hidden basename
20 .set basename,__basename
21 .hidden strrchr