2009-03-11 Zoltan Varga <vargaz@gmail.com>
[mono-debugger.git] / mono / benchmark / regvar.cs
blob4f5e0a3559b14ed6ddf01beed8e6867f655b69ae
1 //
2 // We get stuff like:
3 // 48: 8b c3 mov eax,ebx
4 // 4a: 8b cf mov ecx,edi
5 // 4c: 0b c1 or eax,ecx
6 // 4e: 8b d8 mov ebx,eax
7 //
9 using System;
10 class T {
11 static void Main () {
12 int i = Environment.TickCount;
13 new T ().X ();
14 Console.WriteLine (Environment.TickCount - i);
17 void X () {
18 int a = 0, b = 0, c = 0, d = 0;
19 for (int i = 0; i < 50000000; i ++) {
22 a |= b;
23 b |= c;
24 c |= d;
25 b |= d;
27 a ^= b;
28 b ^= c;
29 c ^= d;
30 b ^= d;
32 a &= b;
33 b &= c;
34 c &= d;
35 b &= d;
37 a += b;
38 b += c;
39 c += d;
40 b += d;