Reduce white space diffs between FreeBSD.
[dragonfly.git] / test / sysperf / memzero.S
1
2                 /*
3                  * memcpy.S
4                  *
5                  * $DragonFly: src/test/sysperf/memzero.S,v 1.1 2004/04/29 16:14:53 dillon Exp $
6                  */
7                 .text
8                 .globl  dozero1
9                 .globl  dozero2
10                 .globl  dozero3
11                 .globl  dozero4
12                 .globl  dozero5
13                 .globl  dozero6
14                 .globl  dozero7
15                 .globl  fpcleanup
16
17                 .p2align 4,0x90
18 dozero1:
19                 pushl   %esi
20                 pushl   %edi
21                 pushl   %ecx
22                 pushl   %ebx
23
24                 movl    4+16(%esp),%edi
25                 movl    8+16(%esp),%ecx
26                 shrl    $2,%ecx
27                 subl    %eax,%eax
28                 cld
29                 rep
30                 stosl
31                 popl    %ebx
32                 popl    %ecx
33                 popl    %edi
34                 popl    %esi
35                 ret
36
37                 .p2align 4,0x90
38 dozero2:
39                 pushl   %esi
40                 pushl   %edi
41                 pushl   %ecx
42                 pushl   %ebx
43
44                 movl    4+16(%esp),%edi
45                 movl    8+16(%esp),%ecx
46                 addl    %ecx,%esi
47                 addl    %ecx,%edi
48                 shrl    $2,%ecx
49                 subl    %eax,%eax
50                 std
51                 rep
52                 stosl
53                 popl    %ebx
54                 popl    %ecx
55                 popl    %edi
56                 popl    %esi
57                 ret
58
59                 .p2align 4,0x90
60 dozero3:
61                 pushl   %esi
62                 pushl   %edi
63                 pushl   %ecx
64                 pushl   %ebx
65
66                 movl    4+16(%esp),%edi
67                 movl    8+16(%esp),%ecx
68                 movl    $8,%edx
69                 subl    %eax,%eax
70                 .p2align 4,0x90
71 1:
72                 subl    %edx,%ecx
73                 movl    %eax,(%edi)
74                 movl    %eax,4(%edi)
75                 addl    %edx,%edi
76                 testl   %ecx,%ecx
77                 jnz     1b
78
79                 popl    %ebx
80                 popl    %ecx
81                 popl    %edi
82                 popl    %esi
83                 ret
84
85                 .p2align 4,0x90
86 dozero4:
87                 pushl   %esi
88                 pushl   %edi
89                 pushl   %ecx
90                 pushl   %ebx
91
92                 movl    4+16(%esp),%edi
93                 movl    8+16(%esp),%ecx
94                 subl    %eax,%eax
95                 .p2align 4,0x90
96 1:
97                 subl    $16,%ecx
98                 movnti  %eax,0(%edi)
99                 movnti  %eax,4(%edi)
100                 movnti  %eax,8(%edi)
101                 movnti  %eax,12(%edi)
102                 addl    $16,%edi
103                 testl   %ecx,%ecx
104                 jnz     1b
105
106                 popl    %ebx
107                 popl    %ecx
108                 popl    %edi
109                 popl    %esi
110                 ret
111
112                 .p2align 4,0x90
113 dozero5:
114                 pushl   %esi
115                 pushl   %edi
116                 pushl   %ecx
117                 pushl   %ebx
118
119                 movl    4+16(%esp),%edi
120                 movl    8+16(%esp),%ecx
121
122                 subl    $108,%esp
123                 fnsave  0(%esp)
124                 fninit
125                 fldz
126                 .p2align 4,0x90
127 1:
128                 subl    $64,%ecx
129                 movq    %mm0,(%edi)
130                 movq    %mm1,8(%edi)
131                 movq    %mm2,16(%edi)
132                 movq    %mm3,24(%edi)
133                 movq    %mm4,32(%edi)
134                 movq    %mm5,40(%edi)
135                 movq    %mm6,48(%edi)
136                 movq    %mm7,56(%edi)
137                 addl    $64,%edi
138                 testl   %ecx,%ecx
139                 jnz     1b
140
141                 frstor  0(%esp)
142                 addl    $108,%esp
143
144                 popl    %ebx
145                 popl    %ecx
146                 popl    %edi
147                 popl    %esi
148                 ret
149
150                 .p2align 4,0x90
151 dozero6:
152                 pushl   %esi
153                 pushl   %edi
154                 pushl   %ecx
155                 pushl   %ebx
156
157                 movl    4+16(%esp),%edi
158                 movl    8+16(%esp),%ecx
159                 movl    $16,%eax
160                 .p2align 4,0x90
161 1:
162                 subl    %eax,%ecx
163                 movq    %mm0,(%edi)
164                 movq    %mm1,8(%edi)
165                 addl    %eax,%edi
166                 testl   %ecx,%ecx
167                 jnz     1b
168
169                 popl    %ebx
170                 popl    %ecx
171                 popl    %edi
172                 popl    %esi
173                 ret
174
175                 .p2align 4,0x90
176 dozero7:
177                 pushl   %esi
178                 pushl   %edi
179                 pushl   %ecx
180                 pushl   %ebx
181
182                 movl    4+16(%esp),%edi
183                 movl    8+16(%esp),%ecx
184                 movl    $32,%eax
185                 .p2align 4,0x90
186 1:
187                 subl    %eax,%ecx
188                 movntdq %xmm0,(%edi)
189                 movntdq %xmm1,16(%edi)
190                 addl    %eax,%edi
191                 testl   %ecx,%ecx
192                 jnz     1b
193                 sfence
194
195                 popl    %ebx
196                 popl    %ecx
197                 popl    %edi
198                 popl    %esi
199                 ret
200
201                 .p2align 4,0x90
202 fpcleanup:
203                 fninit
204                 ret
205