123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- #include "_glibc_inc.h"
- .text
- ENTRY (strspn)
- movq %rdi, %rdx
-
- movq %rdi, %r8
- subq $256, %rsp
- movl $32, %ecx
- movq %rsp, %rdi
- xorl %eax, %eax
- cld
- rep
- stosq
- movq %rsi, %rax
-
- .p2align 3,,6
- L(2):
- movb (%rax), %cl
- testb %cl, %cl
- jz L(1)
- movb %cl, (%rsp,%rcx)
- movb 1(%rax), %cl
- testb %cl, %cl
- jz L(1)
- movb %cl, (%rsp,%rcx)
- movb 2(%rax), %cl
- testb %cl, %cl
- jz L(1)
- movb %cl, (%rsp,%rcx)
- movb 3(%rax), %cl
- addq $4, %rax
- movb %cl, (%rsp,%rcx)
- testb %cl, %cl
- jnz L(2)
- L(1): leaq -4(%rdx), %rax
-
-
-
-
-
-
- .p2align 3,,8
- L(3):
- addq $4, %rax
- movb (%rax), %cl
- testb %cl, (%rsp,%rcx)
- jz L(4)
- movb 1(%rax), %cl
- testb %cl, (%rsp,%rcx)
- jz L(5)
- movb 2(%rax), %cl
- testb %cl, (%rsp,%rcx)
- jz L(6)
- movb 3(%rax), %cl
- testb %cl, (%rsp,%rcx)
- jnz L(3)
- incq %rax
- L(6): incq %rax
- L(5): incq %rax
- L(4): addq $256, %rsp
- subq %rdx, %rax
- ret
- END (strspn)
- libc_hidden_def(strspn)
|