X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Fmini%2Filtests.il;h=30419d9178a1397dfea214d7105bf364b2f8363a;hb=30cddad5fb4c3d290906a6e6c33ecd8b07d8b48c;hp=ddd09350921a0b1b0f6e093e58c27d16492b3b10;hpb=6761073b2af21aed6d6bd5c58145b85ff4c6d6d7;p=mono.git diff --git a/mono/mini/iltests.il b/mono/mini/iltests.il index ddd09350921..30419d9178a 100644 --- a/mono/mini/iltests.il +++ b/mono/mini/iltests.il @@ -219,7 +219,6 @@ // this only happens with the managed pointer, not an unmanaged one. .method static public int32 test_0_foo () il managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .locals init ( int32& buf @@ -237,7 +236,6 @@ } .method static public int32 test_0_localloc () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .locals init (native int, native int, native int, native int, int32) ldc.i4 6 @@ -642,7 +640,6 @@ COND: ldloc.0 } .method static public int32 test_11_switch_with_nonempty_stack () il managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 ldc.i4.5 @@ -755,7 +752,6 @@ COND: ldloc.0 } .method public static int32 test_0_conv_ovf_u_un () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 ldc.i4 1234 @@ -858,7 +854,6 @@ COND: ldloc.0 } .method public static int32 test_0_lconv_ovf_u_un () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 ldc.i4 1234 @@ -891,7 +886,6 @@ COND: ldloc.0 } .method public static int32 test_0_lconv_to_ovf_u8_un () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 ldc.i4 1234 @@ -908,7 +902,6 @@ COND: ldloc.0 } .method public static int32 test_2_lconv_to_ovf_i4_un () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 .locals init (int32 res) @@ -1131,7 +1124,6 @@ COND: ldloc.0 } .method public static int32 test_7_conv_ovf_u8_un () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 2 .locals init (unsigned int64) @@ -1218,7 +1210,6 @@ COND: ldloc.0 } // end of class xxx .method public static int32 test_0_newobj_vtype () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 6 .locals init ( valuetype Tests/xxx V_0 @@ -1256,8 +1247,7 @@ COND: ldloc.0 } .method public static int32 test_1_filters () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. - // .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 ) // ...!BITCODE.. + .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 08 21 42 49 54 43 4F 44 45 00 00 ) // ...!BITCODE.. .maxstack 16 .locals init ( int32 res @@ -1305,7 +1295,6 @@ COND: ldloc.0 } .method public static int32 test_5_cpobj () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 8 .locals init ( valuetype Tests/TheStruct v_0, @@ -1362,7 +1351,6 @@ COND: ldloc.0 } .method public static int32 test_1_cpobj_reference () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 8 .locals init ( object v_0, @@ -1383,7 +1371,6 @@ COND: ldloc.0 } .method public static int32 test_1_initobj_reference () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 8 .locals init ( object v_0 @@ -1823,7 +1810,6 @@ HAS_VALUE: ldc.i4.1 //Bug 372410 .method static public int32 test_0_array_address_type_check () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .maxstack 16 .locals init (object[] V_0, object[,] V_1) @@ -2499,7 +2485,6 @@ OK_2: .method public static int32 test_2_leave_multiple_blocks_from_end () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .locals init (int32 V_0) .try { @@ -2530,7 +2515,6 @@ END: .method public static int32 test_3_leave_multiple_blocks_from_hole () { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .locals init (int32 V_0) .try { @@ -2629,7 +2613,6 @@ END: } .method public static default int32 test_0_typespec_modopt () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. ldtoken class Tests modopt (Tests) pop ldc.i4.0 @@ -2645,7 +2628,6 @@ END: } .method public static default int32 test_1_sizeof_gshared () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. call int32 Tests::SizeOfT() ldc.i4.1 ceq @@ -2707,7 +2689,6 @@ END: .method public static default int32 test_0_llvm_regress_171 () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. .locals init ( int32 i ) @@ -2730,7 +2711,6 @@ END: .method public static default int32 test_4_ldfld_stfld_static () cil managed { - .custom instance void [TestDriver]CategoryAttribute::.ctor(string) = ( 01 00 0C 21 49 4E 54 45 52 50 52 45 54 45 52 00 00 ) // ...!INTERPRETER. ldnull ldc.i4 2 stfld int32 Tests::static_a @@ -2840,4 +2820,275 @@ END: pop ret } + + .method public static int32 test_2_fault () cil managed + { + .maxstack 16 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + .try + { + .try + { + IL_0002: newobj instance void [mscorlib]System.Exception::.ctor() + IL_0007: throw + leave.s IL_0018 + } // end .try + fault + { + IL_0009: ldloc.0 + IL_000a: ldc.i4.1 + IL_000b: add + IL_000c: stloc.0 + endfinally + } // end handler + IL_000f: leave.s IL_0018 + + } // end .try + catch [mscorlib]System.Object + { + IL_0011: pop + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: leave.s IL_0018 + + } // end handler + IL_0018: ldloc.0 + ret + } + + .method public static int32 test_0_fault_no_exception () cil managed + { + .maxstack 16 + .locals init (int32 V_0) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + .try + { + .try + { + leave.s IL_0018 + } // end .try + fault + { + IL_0009: ldloc.0 + IL_000a: ldc.i4.1 + IL_000b: add + IL_000c: stloc.0 + endfinally + } // end handler + IL_000f: leave.s IL_0018 + + } // end .try + catch [mscorlib]System.Object + { + IL_0011: pop + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 + IL_0016: leave.s IL_0018 + + } // end handler + IL_0018: ldloc.0 + ret + } + + .field private static int32 byte_val + .field private static int32 short_val + + .method static int32 widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d) cil managed noinlining + { + .maxstack 4 + ldsfld int32 Tests::byte_val + starg.s 0 + ldarg.0 + ldc.i4 128 //0x80 + beq L_0 + + ldc.i4.1 + ret +L_0: + ldsfld int32 Tests::byte_val + starg.s 1 + ldarg.1 + ldc.i4 -128 //-0x80 + beq L_1 + + ldc.i4.2 + ret + +L_1: + ldsfld int32 Tests::short_val + starg.s 2 + ldarg.2 + ldc.i4 -32768 //-0x8000 + beq L_2 + + ldc.i4.3 + ret + +L_2: + ldsfld int32 Tests::short_val + starg.s 3 + ldarg.3 + ldc.i4 32768 //0x8000 + beq L_3 + + ldc.i4.4 + ret + +L_3: + ldc.i4.0 + ret + } + + .method public static int32 test_0_implicit_widen_of_argument_stores () cil managed + { + .maxstack 5 + /* + This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening. + The values are picked so storing them have different values depending on the sign'ness of the local variable. + */ + ldc.i4 0x180 + stsfld int32 Tests::byte_val + ldc.i4 0x18000 + stsfld int32 Tests::short_val + + ldc.i4.0 + ldc.i4.0 + ldc.i4.0 + ldc.i4.0 + call int32 Tests::widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d) + ret + } + + .method public static int32 test_0_implicit_widen_of_local_stores () cil managed + { + .maxstack 4 + .locals init ( + unsigned int8 V_0, + int8 V_1, + int16 V_2, + unsigned int16 V_3) + + /* + This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening. + The values are picked so storing them have different values depending on the sign'ness of the local variable. + */ + ldc.i4 0x180 + stsfld int32 Tests::byte_val + ldc.i4 0x18000 + stsfld int32 Tests::short_val + + ldsfld int32 Tests::byte_val + stloc.0 + ldloc.0 + ldc.i4 128 //0x80 + beq L_0 + + ldc.i4.1 + ret +L_0: + ldsfld int32 Tests::byte_val + stloc.1 + ldloc.1 + ldc.i4 -128 //-0x80 + beq L_1 + + ldc.i4.2 + ret +L_1: + ldsfld int32 Tests::short_val + stloc.2 + ldloc.2 + ldc.i4 -32768 //-0x8000 + beq L_2 + + ldc.i4.3 + ret +L_2: + ldsfld int32 Tests::short_val + stloc.3 + ldloc.3 + ldc.i4 32768 //0x8000 + beq L_3 + + ldc.i4.4 + ret +L_3: + ldc.i4.0 + ret + } + + .method public static bool llvm_regress_59436 () { + // Code size 41 (0x29) + .maxstack 3 + .locals init (float64 V_0, + float64 V_1, + valuetype [mscorlib]System.Decimal V_2) + IL_0000: ldc.r8 1 + IL_0009: stloc.0 + IL_000a: ldc.r8 2 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: newobj instance void [mscorlib]System.Decimal::.ctor(float64) + IL_001a: ldloca.s V_2 + IL_001c: ldloc.1 + IL_001d: call instance void [mscorlib]System.Decimal::.ctor(float64) + IL_0022: ldloc.2 + IL_0023: call bool [mscorlib]System.Decimal::op_LessThanOrEqual(valuetype [mscorlib]System.Decimal, + valuetype [mscorlib]System.Decimal) + IL_0028: ret + } + + .method private hidebysig static void fail_inline() cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: ldc.i4.s 16 + IL_0002: conv.u + IL_0003: ldc.i4.1 + IL_0004: mul.ovf.un + IL_0005: localloc + IL_0007: pop + IL_0008: ret + } + + .method private hidebysig static int32 + always_inline(int32 op) cil managed aggressiveinlining + { + // Code size 24 (0x18) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0009 + + IL_0003: ldarg.0 + IL_0004: ldc.i4.2 + IL_0005: beq.s IL_000b + + IL_0007: br.s IL_000d + + IL_0009: ldc.i4.0 + IL_000a: ret + + IL_000b: ldc.i4.3 + IL_000c: ret + + IL_000d: call void Tests::fail_inline() + IL_0012: newobj instance void [mscorlib]System.Exception::.ctor() + IL_0017: throw + } + + .method public hidebysig static int32 test_3_regress_59608() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.2 + IL_0001: call int32 Tests::always_inline(int32) + IL_000c: ret + } + }