You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demos/x86_prof.c
+21-18Lines changed: 21 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -50,20 +50,20 @@ void init_timer(void)
50
50
{
51
51
ulong64c1, c2, t1, t2, t3;
52
52
unsigned longy1;
53
-
53
+
54
54
c1=c2= (ulong64)-1;
55
55
for (y1=0; y1<TIMES*100; y1++) {
56
56
t_start();
57
57
t1=t_read();
58
58
t3=t_read();
59
59
t2=t_read() -t1;
60
-
60
+
61
61
c1= (c1>t1) ? t1 : c1;
62
62
c2= (c2>t2) ? t2 : c2;
63
63
}
64
64
skew=c2-c1;
65
65
printf("Clock Skew: %lu\n", (unsigned long)skew);
66
-
}
66
+
}
67
67
68
68
voidreg_algs(void)
69
69
{
@@ -135,6 +135,9 @@ void reg_algs(void)
135
135
#ifdefRIPEMD128
136
136
register_hash (&rmd128_desc);
137
137
#endif
138
+
#ifdefRIPEMD160
139
+
register_hash (&rmd160_desc);
140
+
#endif
138
141
139
142
}
140
143
@@ -166,7 +169,7 @@ int time_keysched(void)
166
169
167
170
#undef DO1
168
171
}
169
-
172
+
170
173
return0;
171
174
}
172
175
@@ -196,13 +199,13 @@ int time_cipher(void)
196
199
DO2;
197
200
t2=t_read();
198
201
t2-=t1;
199
-
202
+
200
203
c1= (t1>c1 ? c1 : t1);
201
204
c2= (t2>c2 ? c2 : t2);
202
205
}
203
206
a1=c2-c1-skew;
204
-
205
-
207
+
208
+
206
209
func=cipher_descriptor[x].ecb_decrypt;
207
210
c1=c2= (ulong64)-1;
208
211
for (y1=0; y1<TIMES; y1++) {
@@ -212,19 +215,19 @@ int time_cipher(void)
212
215
DO2;
213
216
t2=t_read();
214
217
t2-=t1;
215
-
218
+
216
219
c1= (t1>c1 ? c1 : t1);
217
220
c2= (t2>c2 ? c2 : t2);
218
221
}
219
222
a2=c2-c1-skew;
220
-
223
+
221
224
printf
222
225
("%-20s: Encrypt at %7.3f, Decrypt at %7.3f\n", cipher_descriptor[x].name, a1/(double)cipher_descriptor[x].block_length, a2/(double)cipher_descriptor[x].block_length);
0 commit comments