Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Side by Side Diff: fusl/src/string/x86_64/memset.s

Issue 1573973002: Add a "fork" of musl as //fusl. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/string/x86_64/memmove.s ('k') | fusl/src/temp/__randname.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 .global memset
2 .type memset,@function
3 memset:
4 movzbq %sil,%rax
5 mov $0x101010101010101,%r8
6 imul %r8,%rax
7
8 cmp $126,%rdx
9 ja 2f
10
11 test %edx,%edx
12 jz 1f
13
14 mov %sil,(%rdi)
15 mov %sil,-1(%rdi,%rdx)
16 cmp $2,%edx
17 jbe 1f
18
19 mov %ax,1(%rdi)
20 mov %ax,(-1-2)(%rdi,%rdx)
21 cmp $6,%edx
22 jbe 1f
23
24 mov %eax,(1+2)(%rdi)
25 mov %eax,(-1-2-4)(%rdi,%rdx)
26 cmp $14,%edx
27 jbe 1f
28
29 mov %rax,(1+2+4)(%rdi)
30 mov %rax,(-1-2-4-8)(%rdi,%rdx)
31 cmp $30,%edx
32 jbe 1f
33
34 mov %rax,(1+2+4+8)(%rdi)
35 mov %rax,(1+2+4+8+8)(%rdi)
36 mov %rax,(-1-2-4-8-16)(%rdi,%rdx)
37 mov %rax,(-1-2-4-8-8)(%rdi,%rdx)
38 cmp $62,%edx
39 jbe 1f
40
41 mov %rax,(1+2+4+8+16)(%rdi)
42 mov %rax,(1+2+4+8+16+8)(%rdi)
43 mov %rax,(1+2+4+8+16+16)(%rdi)
44 mov %rax,(1+2+4+8+16+24)(%rdi)
45 mov %rax,(-1-2-4-8-16-32)(%rdi,%rdx)
46 mov %rax,(-1-2-4-8-16-24)(%rdi,%rdx)
47 mov %rax,(-1-2-4-8-16-16)(%rdi,%rdx)
48 mov %rax,(-1-2-4-8-16-8)(%rdi,%rdx)
49
50 1: mov %rdi,%rax
51 ret
52
53 2: test $15,%edi
54 mov %rdi,%r8
55 mov %rax,-8(%rdi,%rdx)
56 mov %rdx,%rcx
57 jnz 2f
58
59 1: shr $3,%rcx
60 rep
61 stosq
62 mov %r8,%rax
63 ret
64
65 2: xor %edx,%edx
66 sub %edi,%edx
67 and $15,%edx
68 mov %rax,(%rdi)
69 mov %rax,8(%rdi)
70 sub %rdx,%rcx
71 add %rdx,%rdi
72 jmp 1b
OLDNEW
« no previous file with comments | « fusl/src/string/x86_64/memmove.s ('k') | fusl/src/temp/__randname.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698