2 .assembly extern TestDriver {}
3 .assembly extern mscorlib {}
5 .class public auto ansi sealed beforefieldinit Tests {
7 .method static public int32 Main(string[] args) il managed {
11 call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
13 call int32 [TestDriver]TestDriver::RunTests(class [mscorlib]System.Type, string[])
17 // make sure the register allocator works when the return value of
19 .method static public int32 test_0_div_regalloc () il managed {
33 .method static public int32 test_1_ceq_to_i4 () il managed {
47 .method static public int32 test_3_shl_regvars () il managed {
94 .method static public int32 test_1_fceq_to_i4 () il managed {
114 // This should be manually checked. Basically under -O=linears,
115 // you should not see tons of register spilling.
117 .method static public int32 test_1_bytedreg_free () il managed {
153 // This should be manually checked. Basically under -O=linears,
154 // you should not see tons of register spilling.
156 .method static public int32 test_0_bytesreg1_free () il managed {
195 .method static public int32 test_1_shift_regvar () il managed {
216 // this only happens with the managed pointer, not an unmanaged one.
217 .method static public int32 test_0_foo () il managed {
234 .method static public int32 test_0_localloc () cil managed {
235 .locals init (native int, native int, native int, native int, int32)
260 // Check zero initialized
309 // Try allocations bigger than one page
335 .method private static void do_localloc () cil managed {
340 IL_0001: ldc.i4 131072
347 // Check that localloc can't be inlined
348 .method static public int32 test_0_localloc_inline () cil managed {
358 START: call void class Tests::do_localloc()
371 .method static public int32 test_3_copy_used_bug () il managed {
397 // demonstrate that the copy_used_var is not a fix for the above bug
398 .method static public int32 test_3_copy_used_indir_bug () il managed {
425 .method static public void do_nothing (int32 a) il managed {
429 // demonstrate the block_split failure: needs -O=inline
430 // mini -O=inline --compile Tests:test_0_split_block_bug iltests.exe
431 .method static public int32 test_0_split_block_bug () il managed {
441 call void class Tests::do_nothing (int32)
449 .method public void inline_do_nothing () il managed {
452 .method static public int32 test_1_checkthis_inlining () il managed {
454 call instance void class Tests::inline_do_nothing ()
459 .class nested private auto ansi sealed beforefieldinit TailCallStruct
460 extends [mscorlib]System.ValueType {
461 .field public int32 a
462 .field public int32 b
465 .method static valuetype Tests/TailCallStruct tail1 (valuetype Tests/TailCallStruct arg) {
468 ldfld int32 Tests/TailCallStruct::a
471 stfld int32 Tests/TailCallStruct::a
474 ldfld int32 Tests/TailCallStruct::a
477 stfld int32 Tests/TailCallStruct::a
482 .method static valuetype Tests/TailCallStruct tail2 (valuetype Tests/TailCallStruct arg) {
485 call valuetype Tests/TailCallStruct Tests::tail1 (valuetype Tests/TailCallStruct)
491 // Tail calls are not supported on PowerPC.
493 .method static public int32 test_0_tail_calls () il managed {
496 valuetype Tests/TailCallStruct arg
500 stfld int32 Tests/TailCallStruct::a
503 stfld int32 Tests/TailCallStruct::b
505 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
508 ldfld int32 Tests/TailCallStruct::a
510 ldfld int32 Tests/TailCallStruct::b
517 .method static public int32 tail3 (int32 i, int32 j) il managed {
524 .method static public int32 tail4 (int32 i, int32 j) il managed {
529 // Test arg0 allocated to a register
539 // Test switched up argument variables as the actual arguments
543 call int32 Tests::tail3 (int32, int32)
547 .method static public int32 test_24_tail_calls2 () il managed {
560 call int32 Tests::tail4 (int32, int32)
565 .method public static int32 test_5_jmp () cil managed {
566 jmp int32 Tests::jmp2 ()
571 .method public static int32 jmp2 () cil managed {
576 .method static public int32 test_11_switch_with_nonempty_stack () il managed {
591 .method public static int32 test_5_endfinally_with_nonempty_stack () il managed {
605 .method public static int32 test_0_conv_ovf_i8_neg () il managed {
620 .method public static int32 test_1234_conv_u4 () cil managed {
629 .method public static int32 test_0_conv_ovf_i_un () cil managed {
648 sizeof [mscorlib]System.IntPtr
655 } catch [mscorlib]System.OverflowException {
667 .method public static int32 test_0_conv_ovf_u_un () cil managed {
682 .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed {
684 .locals init (int32 res)
701 } catch [mscorlib]System.OverflowException {
709 ldc.i8 0xffffffff80000000
715 } catch [mscorlib]System.OverflowException {
725 .method public static int32 test_1_lconv_to_ovf_i_un () cil managed {
727 .locals init (int32 res)
739 .method public static int32 test_32_lconv_to_u8 () cil managed
750 .method public static int32 test_32_lconv_to_i8 () cil managed
761 .method public static int32 test_15_lconv_to_u () cil managed
769 .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed
776 ldtoken [mscorlib]System.String
779 ldtoken [mscorlib]System.Object
781 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
782 callvirt instance string class [mscorlib]System.Type::get_FullName ()
783 ldstr "System.String"
784 callvirt instance bool class [mscorlib]System.Object::Equals(object)
790 .method public static int32 test_0_bug59580 ()
792 ldc.r4 float32(0x7FC00000)
793 ldc.r4 float32(0x7FC00000)
804 .method public static int32 test_1_bug60056 () {
805 .locals init (int32 m5)
823 .method public static int32 test_1_conv_u8_cfold () {
827 ldc.i8 0x00000000ffffffff
833 .method public static int32 test_1_array_type_mismatch_ldelema () {
834 .locals init (int32 r)
850 } catch [mscorlib]System.ArrayTypeMismatchException {
861 .method public static int32 test_1_conv_ovf_i8_with_i4 () {
870 .method public static int32 test_0_initlocals_float_ptr () {
877 newarr [mscorlib]System.Single
885 ldelema [mscorlib]System.Single
895 .method public static int32 test_7_conv_ovf_u8_un () {
897 .locals init (unsigned int64)
907 .method public static int32 test_1_bug_74591 () {
922 .class nested public auto ansi Integer
923 extends [mscorlib]System.Object {
927 .method public hidebysig specialname rtspecialname
928 instance default void .ctor (unsigned int64 i, bool n) cil managed
932 call instance void class [mscorlib]System.Object::.ctor()
935 stfld bool Tests/Integer::n
940 .method public static int32 test_1_bug_74726 () {
949 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
950 ldfld bool Tests/Integer::n
956 .class nested private auto ansi sealed xxx
957 extends [mscorlib]System.ValueType
959 .field public object a
961 .method public hidebysig specialname rtspecialname
962 instance default void .ctor () cil managed
967 } // end of class xxx
969 .method public static int32 test_0_newobj_vtype () {
972 valuetype Tests/xxx V_0
975 newobj instance void valuetype Tests/xxx::.ctor ()
978 ldfld object Tests/xxx::a
987 .method public static int32 test_1_filters () {
995 ldstr "OnErrorSub test Exception"
996 newobj instance void class [mscorlib]System.Exception::.ctor(string)
1006 // Should not be called
1028 .class nested private auto ansi sealed beforefieldinit TheStruct
1029 extends [mscorlib]System.ValueType {
1030 .field public int32 a
1031 .field public int32 b
1034 .method public static int32 test_5_cpobj () {
1037 valuetype Tests/TheStruct v_0,
1038 valuetype Tests/TheStruct v_1
1043 stfld int32 Tests/TheStruct::a
1047 stfld int32 Tests/TheStruct::b
1051 cpobj Tests/TheStruct
1054 ldfld int32 Tests/TheStruct::a
1056 ldfld int32 Tests/TheStruct::b
1062 .method public static int32 test_5_ldobj_stloc_optimization () {
1065 valuetype Tests/TheStruct v_0,
1066 valuetype Tests/TheStruct v_1
1071 stfld int32 Tests/TheStruct::a
1075 stfld int32 Tests/TheStruct::b
1078 ldobj valuetype Tests/TheStruct
1082 ldfld int32 Tests/TheStruct::a
1084 ldfld int32 Tests/TheStruct::b
1090 .method public static int32 test_1_cpobj_reference () {
1097 newobj instance void object::.ctor()
1110 .method public static int32 test_1_initobj_reference () {
1116 newobj instance void object::.ctor()
1128 .method public static int32 test_1_ldobj_reference () {
1134 newobj instance void object::.ctor()
1144 .method public static int32 test_5_vtype_on_bb_boundary () {
1147 valuetype Tests/TheStruct v_0,
1148 valuetype Tests/TheStruct v_1
1153 stfld int32 Tests/TheStruct::a
1157 stfld int32 Tests/TheStruct::b
1164 ldfld int32 Tests/TheStruct::a
1166 ldfld int32 Tests/TheStruct::b
1171 .method public static int32 test_5_different_in_stacks () cil managed {
1195 .method public static int32 test_3_larray_get_set () {
1200 newobj instance void int32[0...]::.ctor(int32)
1205 call instance void int32[0...]::Set(int32, int32)
1209 call instance void int32[0...]::Set(int32, int32)
1213 call instance int32 int32[0...]::Get(int32)
1216 call instance int32 int32[0...]::Get(int32)
1221 .method public static int32 test_0_pop_side_effects () {
1230 catch [mscorlib]System.ArithmeticException {
1242 .method public static void regalloc_regress_78314_helper (object o) cil managed
1247 .method public static int32 test_1_regalloc_regress_78314 () cil managed
1249 // Code size 68 (0x44)
1251 .locals init (int32 V_0, bool V_1)
1254 IL_0002: br.s IL_003b
1257 IL_001e: ldc.i4.s 10
1260 IL_0022: ldc.i4.s 10
1264 IL_0028: box [mscorlib]System.Boolean
1265 IL_0032: call void Tests::regalloc_regress_78314_helper(object)
1272 IL_003f: blt.s IL_0004
1281 .method public static void try_block_end_remove_if_useless () cil managed {
1299 .try T_START to T1_END finally handler F1_START to F1_END
1302 .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1303 call void class Tests::try_block_end_remove_if_useless ()
1308 .method private static int32 test_0_regress_78629_switch_next_ins_target () cil managed
1318 // This belongs to basic-float.cs, but its hard to tell mcs/csc to
1319 // generate the non .un version of the opcodes
1320 .method private static hidebysig
1321 default int32 test_4_float_branch_nan () cil managed
1323 // Method begins at RVA 0x27a4
1324 // Code size 74 (0x4a)
1330 IL_0000: ldc.r8 (00 00 00 00 00 00 f8 ff)
1338 IL_0018: bge.s IL_001a
1350 IL_0022: ble.s IL_002e
1361 IL_0036: blt.s IL_0038
1372 IL_0040: bgt.s IL_0042
1383 } // end of method Tests::test_5_float_branch_nan
1385 .method private static hidebysig
1386 default void regress_80622_inner (object x) cil managed
1388 .locals (unsigned int8 i)
1389 // Method begins at RVA 0x2050
1390 // Code size 14 (0xe)
1393 IL_1001: unbox unsigned int8
1394 IL_1006: ldobj unsigned int8
1395 IL_000b: conv.ovf.i4.un
1401 .method private static hidebysig
1402 default int32 test_0_regress_80622 () cil managed
1406 IL_0005: box unsigned int8
1407 IL_000a: call void class Tests::regress_80622_inner (object)
1412 .method private static default int32 test_0_regresss_80190 () cil managed
1415 .locals init (int32 V_0,
1419 IL_0002: ldloca.s V_0
1430 .class interface nested public auto ansi abstract IFaceWithStaticMethod
1432 .method public static specialname
1433 default void foo () cil managed noinlining
1440 .class nested public auto ansi AClass extends [mscorlib]System.Object implements Tests/IFaceWithStaticMethod
1442 .method public hidebysig specialname rtspecialname
1443 instance default void .ctor () cil managed
1451 // Test that static methods in interfaces are ignored during vtable construction
1452 .method private static default int32 test_0_ifaces_with_static_methods () cil managed
1456 newobj instance void class Tests/AClass::.ctor()
1462 .method private static hidebysig default int32 Foo<T> (!!T n) cil managed {
1473 .method static public int32 test_0_nullable_box_brtrue () cil managed {
1475 .locals init (valuetype [mscorlib]System.Nullable`1<int32> V_0)
1478 call int32 class Tests::Foo<valuetype [mscorlib]System.Nullable`1<int32>> (!!0)