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)
489 .method static public int32 test_0_tail_calls () il managed {
492 valuetype Tests/TailCallStruct arg
496 stfld int32 Tests/TailCallStruct::a
499 stfld int32 Tests/TailCallStruct::b
501 call valuetype Tests/TailCallStruct Tests::tail2 (valuetype Tests/TailCallStruct)
504 ldfld int32 Tests/TailCallStruct::a
506 ldfld int32 Tests/TailCallStruct::b
513 .method static public int32 tail3 (int32 i, int32 j) il managed {
520 .method static public int32 tail4 (int32 i, int32 j) il managed {
525 // Test arg0 allocated to a register
535 // Test switched up argument variables as the actual arguments
539 call int32 Tests::tail3 (int32, int32)
543 .method static public int32 test_24_tail_calls2 () il managed {
556 call int32 Tests::tail4 (int32, int32)
560 .method public static int32 test_5_jmp () cil managed {
561 jmp int32 Tests::jmp2 ()
566 .method public static int32 jmp2 () cil managed {
571 .method static public int32 test_11_switch_with_nonempty_stack () il managed {
586 .method public static int32 test_5_endfinally_with_nonempty_stack () il managed {
600 .method public static int32 test_0_conv_ovf_i8_neg () il managed {
615 .method public static int32 test_1234_conv_u4 () il managed {
624 .method public static int32 test_0_get_type_from_handle_on_bblock_boundary () cil managed
631 ldtoken [mscorlib]System.String
634 ldtoken [mscorlib]System.Object
636 call class [mscorlib]'System.Type' class [mscorlib]'System.Type'::'GetTypeFromHandle'(valuetype [mscorlib]'System.RuntimeTypeHandle')
637 callvirt instance string class [mscorlib]System.Type::get_FullName ()
638 ldstr "System.String"
639 callvirt instance bool class [mscorlib]System.Object::Equals(object)
645 .method public static int32 test_0_bug59580 ()
647 ldc.r4 float32(0x7FC00000)
648 ldc.r4 float32(0x7FC00000)
659 .method public static int32 test_1_bug60056 () {
660 .locals init (int32 m5)
678 .method public static int32 test_1_conv_u8_cfold () {
682 ldc.i8 0x00000000ffffffff
688 .method public static int32 test_1_array_type_mismatch_ldelema () {
689 .locals init (int32 r)
705 } catch [mscorlib]System.ArrayTypeMismatchException {
716 .method public static int32 test_1_conv_ovf_i8_with_i4 () {
725 .method public static int32 test_0_initlocals_float_ptr () {
732 newarr [mscorlib]System.Single
740 ldelema [mscorlib]System.Single
750 .method public static int32 test_7_conv_ovf_u8_un () {
752 .locals init (unsigned int64)
762 .method public static int32 test_1_bug_74591 () {
777 .class nested public auto ansi Integer
778 extends [mscorlib]System.Object {
782 .method public hidebysig specialname rtspecialname
783 instance default void .ctor (unsigned int64 i, bool n) cil managed
787 call instance void class [mscorlib]System.Object::.ctor()
790 stfld bool Tests/Integer::n
795 .method public static int32 test_1_bug_74726 () {
804 newobj instance void class Tests/Integer::.ctor(unsigned int64, bool)
805 ldfld bool Tests/Integer::n
811 .class nested private auto ansi sealed xxx
812 extends [mscorlib]System.ValueType
814 .field public object a
816 .method public hidebysig specialname rtspecialname
817 instance default void .ctor () cil managed
822 } // end of class xxx
824 .method public static int32 test_0_newobj_vtype () {
827 valuetype Tests/xxx V_0
830 newobj instance void valuetype Tests/xxx::.ctor ()
833 ldfld object Tests/xxx::a
842 .method public static int32 test_1_filters () {
850 ldstr "OnErrorSub test Exception"
851 newobj instance void class [mscorlib]System.Exception::.ctor(string)
861 // Should not be called
883 .class nested private auto ansi sealed beforefieldinit TheStruct
884 extends [mscorlib]System.ValueType {
885 .field public int32 a
886 .field public int32 b
889 .method public static int32 test_5_cpobj () {
892 valuetype Tests/TheStruct v_0,
893 valuetype Tests/TheStruct v_1
898 stfld int32 Tests/TheStruct::a
902 stfld int32 Tests/TheStruct::b
906 cpobj Tests/TheStruct
909 ldfld int32 Tests/TheStruct::a
911 ldfld int32 Tests/TheStruct::b
917 .method public static int32 test_5_ldobj_stloc_optimization () {
920 valuetype Tests/TheStruct v_0,
921 valuetype Tests/TheStruct v_1
926 stfld int32 Tests/TheStruct::a
930 stfld int32 Tests/TheStruct::b
933 ldobj valuetype Tests/TheStruct
937 ldfld int32 Tests/TheStruct::a
939 ldfld int32 Tests/TheStruct::b
945 .method public static int32 test_1_cpobj_reference () {
952 newobj instance void object::.ctor()
965 .method public static int32 test_1_initobj_reference () {
971 newobj instance void object::.ctor()
983 .method public static int32 test_1_ldobj_reference () {
989 newobj instance void object::.ctor()
999 .method public static int32 test_5_vtype_on_bb_boundary () {
1002 valuetype Tests/TheStruct v_0,
1003 valuetype Tests/TheStruct v_1
1008 stfld int32 Tests/TheStruct::a
1012 stfld int32 Tests/TheStruct::b
1019 ldfld int32 Tests/TheStruct::a
1021 ldfld int32 Tests/TheStruct::b
1026 .method public static int32 test_3_larray_get_set () {
1031 newobj instance void int32[0...]::.ctor(int32)
1036 call instance void int32[0...]::Set(int32, int32)
1040 call instance void int32[0...]::Set(int32, int32)
1044 call instance int32 int32[0...]::Get(int32)
1047 call instance int32 int32[0...]::Get(int32)
1052 .method public static void regalloc_regress_78314_helper (object o) cil managed
1057 .method public static int32 test_1_regalloc_regress_78314 () cil managed
1059 // Code size 68 (0x44)
1061 .locals init (int32 V_0, bool V_1)
1064 IL_0002: br.s IL_003b
1067 IL_001e: ldc.i4.s 10
1070 IL_0022: ldc.i4.s 10
1074 IL_0028: box [mscorlib]System.Boolean
1075 IL_0032: call void Tests::regalloc_regress_78314_helper(object)
1082 IL_003f: blt.s IL_0004
1091 .method public static void try_block_end_remove_if_useless () cil managed {
1109 .try T_START to T1_END finally handler F1_START to F1_END
1112 .method public static int32 test_0_try_block_end_remove_if_useless () cil managed {
1113 call void class Tests::try_block_end_remove_if_useless ()
1118 .method private static int32 test_0_regress_78629_switch_next_ins_target () cil managed