5 public static long test_call (long a
, long b
) {
9 public static int test_shift_1 ()
33 public static int test_shift_2 ()
36 long c
= (long)0x800000ff00000000;
37 long d
= (long)0x8ef0abcd00000000;
42 Console
.WriteLine (t
.ToString ("X"));
43 if (t
!= (long)0xf800000ff0000000)
50 Console
.WriteLine (t
.ToString ("X"));
51 if (t
!= (long)0xffffffffff8ef0ab)
54 if ((t
<< 40) != (long)0x8ef0ab0000000000)
63 public static int test_shift_3 ()
66 ulong c
= 0x800000ff00000000;
67 ulong d
= 0x8ef0abcd00000000;
71 Console
.WriteLine (t
.ToString ("X"));
72 if (t
!= 0x0800000ff0000000)
79 Console
.WriteLine (t
.ToString ("X"));
83 if ((t
<< 40) != 0x8ef0ab0000000000)
90 public static int test_alu ()
125 public static int test_branch ()
127 long a
= 5, b
= 5, t
;
129 if (a
== b
) t
= 1; else t
= 0;
130 if (t
!= 1) return 1;
132 if (a
!= b
) t
= 0; else t
= 1;
133 if (t
!= 1) return 1;
135 if (a
>= b
) t
= 1; else t
= 0;
136 if (t
!= 1) return 1;
138 if (a
> b
) t
= 0; else t
= 1;
139 if (t
!= 1) return 1;
141 if (a
<= b
) t
= 1; else t
= 0;
142 if (t
!= 1) return 1;
144 if (a
< b
) t
= 0; else t
= 1;
145 if (t
!= 1) return 1;
150 public static int Main() {
154 if (test_shift_1 () != 0)
157 if (test_shift_2 () != 0)
160 if (test_shift_3 () != 0)
164 if (test_call (3, 5) != 8)
168 if (test_branch () != 0)
172 if (test_alu () != 0)