OLD | NEW |
1 // | 1 // |
2 // gettsc.inl | 2 // gettsc.inl |
3 // | 3 // |
4 // gives access to the Pentium's (secret) cycle counter | 4 // gives access to the Pentium's (secret) cycle counter |
5 // | 5 // |
6 // This software was written by Leonard Janke (janke@unixg.ubc.ca) | 6 // This software was written by Leonard Janke (janke@unixg.ubc.ca) |
7 // in 1996-7 and is entered, by him, into the public domain. | 7 // in 1996-7 and is entered, by him, into the public domain. |
8 | 8 |
9 #if defined(__WATCOMC__) | 9 #if defined(__WATCOMC__) |
10 void GetTSC(unsigned long&); | 10 void GetTSC(unsigned long&); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 GetTSC(e1); | 53 GetTSC(e1); |
54 GetTSC(s2); | 54 GetTSC(s2); |
55 des_encrypt3(&data[0],key1,key2,key3); | 55 des_encrypt3(&data[0],key1,key2,key3); |
56 des_encrypt3(&data[0],key1,key2,key3); | 56 des_encrypt3(&data[0],key1,key2,key3); |
57 des_encrypt3(&data[0],key1,key2,key3); | 57 des_encrypt3(&data[0],key1,key2,key3); |
58 des_encrypt3(&data[0],key1,key2,key3); | 58 des_encrypt3(&data[0],key1,key2,key3); |
59 GetTSC(e2); | 59 GetTSC(e2); |
60 des_encrypt3(&data[0],key1,key2,key3); | 60 des_encrypt3(&data[0],key1,key2,key3); |
61 } | 61 } |
62 | 62 |
63 » » printf("des %d %d (%d)\n", | 63 » » printf("des3 %d %d (%d)\n", |
64 e1-s1,e2-s2,((e2-s2)-(e1-s1))); | 64 e1-s1,e2-s2,((e2-s2)-(e1-s1))); |
65 } | 65 } |
66 } | 66 } |
67 | 67 |
OLD | NEW |