diff options
Diffstat (limited to 'tests/src/JIT/Methodical')
24 files changed, 334 insertions, 344 deletions
diff --git a/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il b/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il index 59fcba5669..b9979be66e 100644 --- a/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il +++ b/tests/src/JIT/Methodical/Boxing/boxunbox/tailcall.il @@ -2,13 +2,10 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib { } +.assembly extern System.Console { auto } +.assembly extern mscorlib { auto } + .assembly 'tailcall' { } .namespace JitTest { diff --git a/tests/src/JIT/Methodical/Boxing/misc/concurgc.il b/tests/src/JIT/Methodical/Boxing/misc/concurgc.il index 5d8d5be386..a9317bd225 100644 --- a/tests/src/JIT/Methodical/Boxing/misc/concurgc.il +++ b/tests/src/JIT/Methodical/Boxing/misc/concurgc.il @@ -2,15 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib -{ -} +.assembly extern System.Console { auto } +.assembly extern System.Threading.Thread { auto } +.assembly extern mscorlib { auto } + .assembly 'concur'// as "concur" { } @@ -57,7 +53,7 @@ ldc.i4.0 volatile. stsfld bool Test.App::signal - IL_001a: ldloc.2 + IL_001a: ldloc.2 IL_001b: call instance void [System.Threading.Thread]System.Threading.Thread::Start() IL_0020: ldc.r8 11. IL_0029: stloc.s V_5 @@ -147,7 +143,7 @@ IL_00d2: ret } // end of method 'App::Main' - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { .maxstack 8 diff --git a/tests/src/JIT/Methodical/ldtoken/types.il b/tests/src/JIT/Methodical/ldtoken/types.il index 4df5e24340..c3e320f466 100644 --- a/tests/src/JIT/Methodical/ldtoken/types.il +++ b/tests/src/JIT/Methodical/ldtoken/types.il @@ -2,19 +2,18 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib { } + +.assembly extern System.Runtime.Extensions { auto } +.assembly extern System.Console { auto } +.assembly extern mscorlib { auto } + .assembly types { } .namespace JitTest { .class private auto ansi beforefieldinit Test extends [mscorlib]System.Object { - .method private hidebysig static void + .method private hidebysig static void test_token(object boxed_vt, valuetype [mscorlib]System.RuntimeTypeHandle vt) cil managed { @@ -25,7 +24,7 @@ call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle( valuetype [mscorlib]System.RuntimeTypeHandle) beq.s IL_EXIT - + ldstr "Test failed on " ldarg.1 call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle( @@ -34,7 +33,7 @@ call string [mscorlib]System.String::Concat(string, string) call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 101 - call void [system.runtime.extensions]System.Environment::Exit(int32) + call void [System.Runtime.Extensions]System.Environment::Exit(int32) IL_EXIT: ret } @@ -57,17 +56,17 @@ box [mscorlib]System.Int16 ldtoken [mscorlib]System.Int16 call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4.1 box [mscorlib]System.UInt16 ldtoken [mscorlib]System.UInt16 call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4.1 box [mscorlib]System.Int32 ldtoken [mscorlib]System.Int32 call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4.1 box [mscorlib]System.UInt32 ldtoken [mscorlib]System.UInt32 @@ -77,22 +76,22 @@ box [mscorlib]System.Int64 ldtoken [mscorlib]System.Int64 call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i8 1 box [mscorlib]System.UInt64 ldtoken [mscorlib]System.UInt64 call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.r8 1 box [mscorlib]System.Single ldtoken [mscorlib]System.Single call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.r4 1 box [mscorlib]System.Double ldtoken [mscorlib]System.Double call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4.1 box [mscorlib]System.IntPtr ldtoken [mscorlib]System.IntPtr @@ -102,7 +101,7 @@ box [mscorlib]System.UIntPtr ldtoken [mscorlib]System.UIntPtr call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4.1 box [mscorlib]System.Boolean ldtoken [mscorlib]System.Boolean @@ -112,11 +111,11 @@ box [mscorlib]System.Char ldtoken [mscorlib]System.Char call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldstr "moo" ldtoken [mscorlib]System.String call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + newobj instance void [mscorlib]System.Object::.ctor() ldtoken [mscorlib]System.Object call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) @@ -125,78 +124,78 @@ newarr int8 ldtoken int8[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr uint8 ldtoken uint8[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr int16 ldtoken int16[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr uint16 ldtoken uint16[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr int32 ldtoken int32[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr uint32 ldtoken uint32[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr int64 ldtoken int64[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr uint64 ldtoken uint64[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr native int ldtoken native int[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr valuetype [mscorlib]System.UIntPtr ldtoken valuetype [mscorlib]System.UIntPtr[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr bool ldtoken bool[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr char ldtoken char[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr object ldtoken object[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldc.i4 10 newarr string ldtoken string[] call void JitTest.Test::test_token(object, valuetype [mscorlib]System.RuntimeTypeHandle) - + ldstr "Passed" call void [System.Console]System.Console::WriteLine(string) ldc.i4.s 100 ret } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 diff --git a/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il b/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il index 7bd47a0a1e..005c7a6ed6 100644 --- a/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il +++ b/tests/src/JIT/Methodical/nonvirtualcall/tailcall.il @@ -2,22 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} - - - - +.assembly extern System.Console { auto } // Metadata version: v2.0.50509 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 2:0:0:0 -} +.assembly extern mscorlib { auto } + .assembly tailcall { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) diff --git a/tests/src/JIT/Methodical/switch/switch1.il b/tests/src/JIT/Methodical/switch/switch1.il index ed3f5e4fc3..1d1956e127 100644 --- a/tests/src/JIT/Methodical/switch/switch1.il +++ b/tests/src/JIT/Methodical/switch/switch1.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + //simple switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch1' -{ - - +{ + + } .module 'switch1.exe' @@ -24,13 +27,13 @@ IL_0002: ldloc.0 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0014, IL_0027) IL_0012: br.s IL_0033 IL_0014: ldc.i4.s 100 - IL_0016: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0016: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_001b: ldstr "Test passed" IL_0020: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0025: br.s IL_003f @@ -44,7 +47,7 @@ IL_003d: br.s IL_003f IL_003f: ret - } + } .method public hidebysig static void Main() il managed { @@ -52,10 +55,10 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } + - -} +} diff --git a/tests/src/JIT/Methodical/switch/switch10.il b/tests/src/JIT/Methodical/switch/switch10.il index 5827b03ab5..41f41888a3 100644 --- a/tests/src/JIT/Methodical/switch/switch10.il +++ b/tests/src/JIT/Methodical/switch/switch10.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // check inlining +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch10' { - - + + } .module 'switch10.exe' @@ -15,7 +18,7 @@ .class public auto ansi Test extends ['mscorlib']System.Object { - .method private hidebysig static int32 + .method private hidebysig static int32 Square(int32 i) il managed { .maxstack 2 @@ -28,7 +31,7 @@ IL_0006: ldloc.0 IL_0007: ret - } + } .method private hidebysig static void DoSwitch(int32 'value') il managed { @@ -57,17 +60,17 @@ IL_0018: bne.un.s IL_002d IL_001a: ldc.i4.s 100 - IL_001c: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_001c: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0021: ldstr "Test passed" IL_0026: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_002b: br.s IL_003d IL_002d: ldc.i4.1 - IL_002e: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_002e: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0033: ldstr "Test failed" IL_0038: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_003d: ret - } + } .method public hidebysig static void Main() il managed { @@ -75,10 +78,10 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } + - -} +} diff --git a/tests/src/JIT/Methodical/switch/switch11.il b/tests/src/JIT/Methodical/switch/switch11.il index b2375b0f4f..02827e35b2 100644 --- a/tests/src/JIT/Methodical/switch/switch11.il +++ b/tests/src/JIT/Methodical/switch/switch11.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // non-empty stack before switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch11' { - - + + } .module 'switch11.exe' @@ -25,13 +28,13 @@ IL_0002: br.s IL_0004 IL_0004: ldc.i4.s 100 - IL_0006: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0006: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_000b: ldstr "Test passed" IL_0010: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0015: pop - call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch2.il b/tests/src/JIT/Methodical/switch/switch2.il index f02a1f00a1..c38d925c7a 100644 --- a/tests/src/JIT/Methodical/switch/switch2.il +++ b/tests/src/JIT/Methodical/switch/switch2.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // add and subtract integers +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch2' { - - + + } .module 'switch2.exe' @@ -30,7 +33,7 @@ IL_0006: ldloc.3 IL_0007: ldc.i4.1 IL_0008: sub - IL_0009: switch ( + IL_0009: switch ( IL_0018, IL_0033) IL_0016: br.s IL_004d @@ -44,7 +47,7 @@ IL_001e: bne.un.s IL_0031 IL_0020: ldc.i4.s 100 - IL_0022: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0022: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0027: ldstr "Test passed" IL_002c: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0031: br.s IL_005f @@ -58,19 +61,19 @@ IL_0039: bne.un.s IL_004b IL_003b: ldc.i4.1 - IL_003c: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_003c: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0041: ldstr "Test failed" IL_0046: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_004b: br.s IL_005f IL_004d: ldc.i4.1 - IL_004e: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_004e: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0053: ldstr "Test failed" IL_0058: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_005d: br.s IL_005f IL_005f: ret - } + } .method public hidebysig static void Main() il managed { @@ -78,9 +81,9 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } - } + } diff --git a/tests/src/JIT/Methodical/switch/switch3.il b/tests/src/JIT/Methodical/switch/switch3.il index 95f233f09b..0e4696fd02 100644 --- a/tests/src/JIT/Methodical/switch/switch3.il +++ b/tests/src/JIT/Methodical/switch/switch3.il @@ -2,13 +2,15 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + // checking fallthrough in switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch3' { - - + + } .module 'switch3.exe' @@ -25,7 +27,7 @@ IL_0002: ldloc.0 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0014, IL_0016) IL_0012: br.s IL_0029 @@ -33,19 +35,19 @@ IL_0014: br.s IL_0016 IL_0016: ldc.i4.s 100 - IL_0018: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0018: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_001d: ldstr "Test passed" IL_0022: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0027: br.s IL_003b IL_0029: ldc.i4.1 - IL_002a: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_002a: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_002f: ldstr "Test failed" IL_0034: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0039: br.s IL_003b IL_003b: ret - } + } .method public hidebysig static void Main() il managed { @@ -53,10 +55,10 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } - -} + +} diff --git a/tests/src/JIT/Methodical/switch/switch4.il b/tests/src/JIT/Methodical/switch/switch4.il index 047be6d214..51c848069c 100644 --- a/tests/src/JIT/Methodical/switch/switch4.il +++ b/tests/src/JIT/Methodical/switch/switch4.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // loop in switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch4' { - - + + } .module 'switch4.exe' @@ -56,17 +59,17 @@ IL_002e: bne.un.s IL_0043 IL_0030: ldc.i4.s 100 - IL_0032: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0032: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0037: ldstr "Test passed" IL_003c: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0041: br.s IL_0053 IL_0043: ldc.i4.1 - IL_0044: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0044: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0049: ldstr "Test failed" IL_004e: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0053: ret - } + } .method public hidebysig static void Main() il managed { @@ -74,9 +77,9 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch5.il b/tests/src/JIT/Methodical/switch/switch5.il index 040e2da6f8..806d2d8ab8 100644 --- a/tests/src/JIT/Methodical/switch/switch5.il +++ b/tests/src/JIT/Methodical/switch/switch5.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // Stack implementation +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch5' { - - + + } .module 'switch5.exe' @@ -17,7 +20,7 @@ { .field public int32[] Stack .field public int32 top - .method public hidebysig instance void + .method public hidebysig instance void DoSwitch(int32 'value') il managed { .maxstack 2 @@ -28,7 +31,7 @@ IL_0002: ldloc.1 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0014, IL_001d) IL_0012: br.s IL_0026 @@ -56,21 +59,21 @@ IL_003c: brtrue.s IL_0051 IL_003e: ldc.i4.s 100 - IL_0040: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0040: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0045: ldstr "Test passed" IL_004a: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_004f: br.s IL_0061 IL_0051: ldc.i4.1 - IL_0052: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0052: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0057: ldstr "Test failed" IL_005c: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0061: br.s IL_0063 IL_0063: ret - } + } - .method public hidebysig instance void + .method public hidebysig instance void push(int32 i) il managed { .maxstack 4 @@ -89,7 +92,7 @@ IL_0017: ldarg.1 IL_0018: stelem.i4 IL_0019: ret - } + } .method public hidebysig instance int32 'pop'() il managed @@ -114,9 +117,9 @@ IL_001b: ldloc.0 IL_001c: ret - } + } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { .maxstack 8 @@ -130,9 +133,9 @@ IL_0013: ldarg.0 IL_0014: call instance void ['mscorlib']System.Object::.ctor() IL_0019: ret - } + } -} +} .class public auto ansi Test extends ['mscorlib']System.Object @@ -156,9 +159,9 @@ IL_001b: ldloc.0 IL_001c: ldc.i4.3 IL_001d: call instance void TestStack::DoSwitch(int32) - IL_0022: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0022: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch6.il b/tests/src/JIT/Methodical/switch/switch6.il index 882d24a1d1..2e9e8479ad 100644 --- a/tests/src/JIT/Methodical/switch/switch6.il +++ b/tests/src/JIT/Methodical/switch/switch6.il @@ -1,18 +1,17 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // try -- catch in switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } +.assembly extern System.Console { auto } -.assembly extern legacy library mscorlib {} -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} .assembly 'switch6' { - - + + } .module 'switch6.exe' @@ -48,8 +47,8 @@ IL_0014: stloc.1 IL_0015: leave.s IL_0028 - } - catch ['mscorlib']System.Exception + } + catch ['mscorlib']System.Exception { IL_0017: stloc.2 IL_0018: ldstr "Exception {0} caught" @@ -60,7 +59,7 @@ IL_0025: stloc.1 IL_0026: leave.s IL_0028 - } + } IL_0028: br.s IL_002c IL_002a: br.s IL_002c @@ -70,17 +69,17 @@ IL_002f: bne.un.s IL_0044 IL_0031: ldc.i4.s 100 - IL_0033: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0033: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0038: ldstr "Test passed" IL_003d: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0042: br.s IL_0054 IL_0044: ldc.i4.1 - IL_0045: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0045: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_004a: ldstr "Test failed" IL_004f: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0054: ret - } + } .method public hidebysig static void Main() il managed { @@ -88,9 +87,9 @@ .maxstack 8 IL_0000: ldc.i4.1 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch7.il b/tests/src/JIT/Methodical/switch/switch7.il index 174376050d..c187cc9733 100644 --- a/tests/src/JIT/Methodical/switch/switch7.il +++ b/tests/src/JIT/Methodical/switch/switch7.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // calling switch in a loop +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch7' { - - + + } .module 'switch7.exe' @@ -25,7 +28,7 @@ IL_0002: ldloc.0 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0018, IL_0026, IL_0034) @@ -52,7 +55,7 @@ IL_0042: br.s IL_0044 IL_0044: ret - } + } .method public hidebysig static void Main() il managed { @@ -78,18 +81,18 @@ IL_0018: bne.un.s IL_002d IL_001a: ldc.i4.s 100 - IL_001c: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_001c: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0021: ldstr "Test passed" IL_0026: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_002b: br.s IL_003d IL_002d: ldc.i4.1 - IL_002e: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_002e: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0033: ldstr "Test failed" IL_0038: call void ['mscorlib']System.Console::WriteLine(class System.String) - IL_003d: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_003d: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch8.il b/tests/src/JIT/Methodical/switch/switch8.il index 9b57c71b68..31a4f1c0f9 100644 --- a/tests/src/JIT/Methodical/switch/switch8.il +++ b/tests/src/JIT/Methodical/switch/switch8.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + // goto statements in switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch8' { - - + + } .module 'switch8.exe' @@ -24,7 +27,7 @@ IL_0002: ldloc.0 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0014, IL_0016) IL_0012: br.s IL_0018 @@ -36,17 +39,17 @@ IL_0018: br.s IL_002d IL_001a: ldc.i4.s 100 - IL_001c: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_001c: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0021: ldstr "Test passed" IL_0026: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_002b: br.s IL_003d IL_002d: ldc.i4.1 - IL_002e: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_002e: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0033: ldstr "Test failed" IL_0038: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_003d: ret - } + } .method public hidebysig static void Main() il managed { @@ -54,9 +57,9 @@ .maxstack 8 IL_0000: ldc.i4.2 IL_0001: call void Test::DoSwitch(int32) - IL_0006: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0006: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/switch/switch9.il b/tests/src/JIT/Methodical/switch/switch9.il index bbdb518649..5752b0ea4b 100644 --- a/tests/src/JIT/Methodical/switch/switch9.il +++ b/tests/src/JIT/Methodical/switch/switch9.il @@ -1,13 +1,16 @@ // Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. + + //Nested Switch +.assembly extern System.Runtime.Extensions { auto } +.assembly extern legacy library mscorlib { auto } -.assembly extern legacy library mscorlib {} .assembly 'switch9' { - - + + } .module 'switch9.exe' @@ -25,7 +28,7 @@ IL_0002: ldloc.0 IL_0003: ldc.i4.1 IL_0004: sub - IL_0005: switch ( + IL_0005: switch ( IL_0014, IL_0061) IL_0012: br.s IL_0073 @@ -35,25 +38,25 @@ IL_0016: ldloc.0 IL_0017: ldc.i4.1 IL_0018: sub - IL_0019: switch ( + IL_0019: switch ( IL_0028, IL_003b) IL_0026: br.s IL_004d IL_0028: ldc.i4.s 100 - IL_002a: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_002a: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_002f: ldstr "Test passed" IL_0034: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0039: br.s IL_005f IL_003b: ldc.i4.1 - IL_003c: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_003c: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0041: ldstr "Test failed" IL_0046: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_004b: br.s IL_005f IL_004d: ldc.i4.1 - IL_004e: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_004e: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0053: ldstr "Test failed" IL_0058: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_005d: br.s IL_005f @@ -61,19 +64,19 @@ IL_005f: br.s IL_0085 IL_0061: ldc.i4.1 - IL_0062: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0062: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0067: ldstr "Test failed" IL_006c: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0071: br.s IL_0085 IL_0073: ldc.i4.1 - IL_0074: call void ['system.runtime.extensions']System.Environment::set_ExitCode(int32) + IL_0074: call void ['System.Runtime.Extensions']System.Environment::set_ExitCode(int32) IL_0079: ldstr "Test failed" IL_007e: call void ['mscorlib']System.Console::WriteLine(class System.String) IL_0083: br.s IL_0085 IL_0085: ret - } + } .method public hidebysig static void Main() il managed { @@ -83,9 +86,9 @@ IL_0001: ldc.i4.1 IL_0002: call void Test::DoSwitch(int32, int32) - IL_0007: call int32 ['system.runtime.extensions']System.Environment::get_ExitCode() - call void ['system.runtime.extensions']System.Environment::Exit(int32) + IL_0007: call int32 ['System.Runtime.Extensions']System.Environment::get_ExitCode() + call void ['System.Runtime.Extensions']System.Environment::Exit(int32) ret - } - -} + } + +} diff --git a/tests/src/JIT/Methodical/tailcall/recurse_ep_void.il b/tests/src/JIT/Methodical/tailcall/recurse_ep_void.il index 34f981e38f..6bc067783a 100644 --- a/tests/src/JIT/Methodical/tailcall/recurse_ep_void.il +++ b/tests/src/JIT/Methodical/tailcall/recurse_ep_void.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib { } + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly recurse_ep_void { } .namespace JitTest { @@ -16,7 +15,7 @@ { .field private static int32 m .field private static int32 n - .method private hidebysig static + .method private hidebysig static void Main() il managed { .entrypoint @@ -42,7 +41,7 @@ class System.String) IL_0039: call void [System.Console]System.Console::WriteLine(class System.String) IL_003e: ldc.i4 0x65 - IL_0043: call void [system.runtime.extensions]System.Environment::Exit(int32) + IL_0043: call void [System.Runtime.Extensions]System.Environment::Exit(int32) IL_0048: ret IL_0049: ldsfld int32 JitTest.Test::m @@ -56,9 +55,9 @@ IL_0061: tail. IL_0063: call void JitTest.Test::Main() IL_0068: ret - } + } - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { .maxstack 8 @@ -67,17 +66,17 @@ IL_0006: ldc.i4.s 10 IL_0008: stsfld int32 JitTest.Test::n IL_000d: ret - } + } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } + } - } + } -} +} diff --git a/tests/src/JIT/Methodical/tailcall/test_2a.il b/tests/src/JIT/Methodical/tailcall/test_2a.il index c4146b741d..0d32a164a8 100644 --- a/tests/src/JIT/Methodical/tailcall/test_2a.il +++ b/tests/src/JIT/Methodical/tailcall/test_2a.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_2a { } .namespace JitTest { @@ -22,7 +21,7 @@ .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -62,7 +61,7 @@ IL_0047: br.s OUT } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -74,7 +73,7 @@ IL_0047: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_2b.il b/tests/src/JIT/Methodical/tailcall/test_2b.il index c98b345192..f43dc42b0d 100644 --- a/tests/src/JIT/Methodical/tailcall/test_2b.il +++ b/tests/src/JIT/Methodical/tailcall/test_2b.il @@ -2,12 +2,12 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } +.assembly extern System.Console { auto } + .assembly test_2b { } .namespace JitTest { @@ -22,7 +22,7 @@ .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -50,7 +50,7 @@ IL_0047: ldsfld int32 JitTest.Test::n ldc.i4.1 beq MERGE - + ldsfld int32 JitTest.Test::m ldsfld int32 JitTest.Test::n dup @@ -64,7 +64,7 @@ MERGE: ret } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -76,7 +76,7 @@ MERGE: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_2c.il b/tests/src/JIT/Methodical/tailcall/test_2c.il index fa1fc0fd60..dd8109cb95 100644 --- a/tests/src/JIT/Methodical/tailcall/test_2c.il +++ b/tests/src/JIT/Methodical/tailcall/test_2c.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_2c { } .namespace JitTest { @@ -22,7 +21,7 @@ .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -51,7 +50,7 @@ IL_0047: ldsfld int32 JitTest.Test::n ldc.i4.1 beq MERGE - + ldsfld int32 JitTest.Test::m ldsfld int32 JitTest.Test::n dup @@ -66,7 +65,7 @@ RET: ret } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -78,7 +77,7 @@ RET: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_implicit.il b/tests/src/JIT/Methodical/tailcall/test_implicit.il index 0115c62f00..8df233ea6f 100644 --- a/tests/src/JIT/Methodical/tailcall/test_implicit.il +++ b/tests/src/JIT/Methodical/tailcall/test_implicit.il @@ -3,27 +3,15 @@ // See the LICENSE file in the project root for more information. +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } - - - -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) - .hash = (5C EA 16 0E 69 C8 EE F2 C9 A5 6E 45 32 31 FA 61 - 19 8E E7 4D ) - .ver 2:0:3600:0 -} .assembly tailcall { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .hash algorithm 0x00008004 .ver 0:0:0:0 } @@ -31,8 +19,8 @@ .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 -.subsystem 0x0003 -.corflags 0x00000001 +.subsystem 0x0003 +.corflags 0x00000001 @@ -41,7 +29,7 @@ { .field private static int32 MaxDepth .field private int32 'value' - .method public hidebysig instance int32 + .method public hidebysig instance int32 Recurse1(int32 depth) cil managed { .maxstack 5 @@ -94,9 +82,9 @@ ret IL_004b: ldloc.0 IL_004c: ret - } + } - .method public hidebysig instance int32 + .method public hidebysig instance int32 Recurse2(int32 depth, object o1, object o2) cil managed @@ -120,7 +108,7 @@ ret IL_0016: ldc.i4.s 100 IL_0018: bne.un.s IL_0053 - IL_001a: call string [system.runtime.extensions]System.Environment::get_StackTrace() + IL_001a: call string [System.Runtime.Extensions]System.Environment::get_StackTrace() IL_001f: stloc.0 IL_0020: ldloc.0 IL_0021: ldstr "Main" @@ -136,7 +124,7 @@ ret IL_003e: ldstr "Test Failed" IL_0043: call void [System.Console]System.Console::WriteLine(string) IL_0048: ldc.i4.0 - IL_0049: call void [system.runtime.extensions]System.Environment::Exit(int32) + IL_0049: call void [System.Runtime.Extensions]System.Environment::Exit(int32) IL_004e: call void [mscorlib]System.GC::Collect() IL_0053: ldarg.0 IL_0054: dup @@ -161,9 +149,9 @@ ret IL_007b: ldloc.1 IL_007c: ret - } + } - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 Recurse3(int32 depth) cil managed { .maxstack 5 @@ -212,9 +200,9 @@ ret IL_003f: ldloc.0 IL_0040: ret - } + } - .method public hidebysig newslot virtual + .method public hidebysig newslot virtual instance int32 Recurse4(int32 depth, object o1, object o2) cil managed @@ -239,7 +227,7 @@ ret IL_001b: bne.un.s IL_0056 IL_001d: call void [mscorlib]System.GC::Collect() - IL_0022: call string [system.runtime.extensions]System.Environment::get_StackTrace() + IL_0022: call string [System.Runtime.Extensions]System.Environment::get_StackTrace() IL_0027: stloc.0 IL_0028: ldloc.0 IL_0029: ldstr "Main" @@ -255,7 +243,7 @@ ret IL_0046: ldstr "Test Failed" IL_004b: call void [System.Console]System.Console::WriteLine(string) IL_0050: ldc.i4.0 - IL_0051: call void [system.runtime.extensions]System.Environment::Exit(int32) + IL_0051: call void [System.Runtime.Extensions]System.Environment::Exit(int32) IL_0056: ldarg.0 IL_0057: dup IL_0058: ldfld int32 Class1::'value' @@ -279,7 +267,7 @@ ret IL_007e: ldloc.1 IL_007f: ret - } + } .method public hidebysig static int32 Main() cil managed { @@ -343,24 +331,24 @@ ret IL_007d: ldloc.2 IL_007e: ret - } + } - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() cil managed { .maxstack 8 IL_0000: ldc.i4 0x2000 IL_0005: stsfld int32 Class1::MaxDepth IL_000a: ret - } + } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } + } -} +} diff --git a/tests/src/JIT/Methodical/tailcall/test_mutual_rec.il b/tests/src/JIT/Methodical/tailcall/test_mutual_rec.il index 5a291fa863..f17c813ebb 100644 --- a/tests/src/JIT/Methodical/tailcall/test_mutual_rec.il +++ b/tests/src/JIT/Methodical/tailcall/test_mutual_rec.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_mutual_rec { } .namespace JitTest { @@ -16,13 +15,13 @@ { .field private static int32 m .field private static int32 n - .method private hidebysig static int32 Main() il managed + .method private hidebysig static int32 Main() il managed { .entrypoint .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -55,7 +54,7 @@ IL_0047: stsfld int32 JitTest.Test::n mul stsfld int32 JitTest.Test::m - + ldsfld int32 JitTest.Test::n ldc.i4.3 rem @@ -71,12 +70,12 @@ MERGE1: tail. calli int32() ret } // end of method Test::Main - .method private hidebysig static int32 Main1() il managed + .method private hidebysig static int32 Main1() il managed { .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -109,7 +108,7 @@ IL_0047: stsfld int32 JitTest.Test::n mul stsfld int32 JitTest.Test::m - + ldsfld int32 JitTest.Test::n ldc.i4.3 rem @@ -125,12 +124,12 @@ MERGE1: tail. calli int32() ret } // end of method Test::Main - .method private hidebysig static int32 Main2() il managed + .method private hidebysig static int32 Main2() il managed { .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -163,7 +162,7 @@ IL_0047: stsfld int32 JitTest.Test::n mul stsfld int32 JitTest.Test::m - + ldsfld int32 JitTest.Test::n ldc.i4.3 rem @@ -180,7 +179,7 @@ MERGE1: ret } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -192,7 +191,7 @@ MERGE1: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_switch.il b/tests/src/JIT/Methodical/tailcall/test_switch.il index 6eed26c8db..45d026e112 100644 --- a/tests/src/JIT/Methodical/tailcall/test_switch.il +++ b/tests/src/JIT/Methodical/tailcall/test_switch.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_switch { } .namespace JitTest { @@ -18,21 +17,21 @@ .field private static int32 n .method private hidebysig static int32 Main1() il managed { - .maxstack 4 - tail. call int32 JitTest.Test::Main2() - ret + .maxstack 4 + tail. call int32 JitTest.Test::Main2() + ret } .method private hidebysig static int32 Main2() il managed { - .maxstack 4 - tail. call int32 JitTest.Test::Main3() - ret + .maxstack 4 + tail. call int32 JitTest.Test::Main3() + ret } .method private hidebysig static int32 Main3() il managed { - .maxstack 4 - tail. call int32 JitTest.Test::Main() - ret + .maxstack 4 + tail. call int32 JitTest.Test::Main() + ret } .method private hidebysig static int32 Main() il managed { @@ -40,7 +39,7 @@ .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.Test::n ldc.i4.1 bne.un.s IL_0047 @@ -94,7 +93,7 @@ MERGE1: ret } // end of method Test::Main - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -106,7 +105,7 @@ MERGE1: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_virt.il b/tests/src/JIT/Methodical/tailcall/test_virt.il index 77795e4709..a592019955 100644 --- a/tests/src/JIT/Methodical/tailcall/test_virt.il +++ b/tests/src/JIT/Methodical/tailcall/test_virt.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern mscorlib { } -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_virt { } .namespace JitTest { @@ -20,7 +19,7 @@ .maxstack 4 .locals (int32 V_0) ldc.i4.1 - call void [system.runtime.extensions]System.Environment::set_ExitCode(int32) + call void [System.Runtime.Extensions]System.Environment::set_ExitCode(int32) ldsfld int32 JitTest.TestClass::n ldc.i4.1 bne.un.s IL_0047 @@ -66,7 +65,7 @@ IL_0047: tail. callvirt instance int32 JitTest.TestClass::Main() ret } - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { // Code size 14 (0xe) @@ -78,7 +77,7 @@ IL_0047: IL_000d: ret } // end of method Test::.cctor - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { // Code size 7 (0x7) diff --git a/tests/src/JIT/Methodical/tailcall/test_void.il b/tests/src/JIT/Methodical/tailcall/test_void.il index 2c478df1ab..698c665b08 100644 --- a/tests/src/JIT/Methodical/tailcall/test_void.il +++ b/tests/src/JIT/Methodical/tailcall/test_void.il @@ -2,12 +2,11 @@ // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. -.assembly extern System.Console -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) - .ver 4:0:0:0 -} -.assembly extern mscorlib { } + +.assembly extern System.Console { auto } +.assembly extern System.Runtime.Extensions { auto } +.assembly extern mscorlib { auto } + .assembly test_void { } .namespace JitTest { @@ -31,7 +30,7 @@ ldstr "PASSED: 10! == 3628800" call void [System.Console]System.Console::WriteLine(class System.String) ldc.i4.s 100 - call void [system.runtime.extensions]System.Environment::Exit(int32) + call void [System.Runtime.Extensions]System.Environment::Exit(int32) ret IL_0029: @@ -41,7 +40,7 @@ IL_0029: call class System.String [mscorlib]System.String::Concat(class System.String, class System.String) call void [System.Console]System.Console::WriteLine(class System.String) ldc.i4.s 101 - call void [system.runtime.extensions]System.Environment::Exit(int32) + call void [System.Runtime.Extensions]System.Environment::Exit(int32) ret IL_0047: @@ -55,9 +54,9 @@ IL_0047: stsfld int32 JitTest.Test::m tail. call void JitTest.Test::Main() ret - } + } - .method private hidebysig specialname rtspecialname static + .method private hidebysig specialname rtspecialname static void .cctor() il managed { .maxstack 8 @@ -66,17 +65,17 @@ IL_0047: IL_0006: ldc.i4.s 10 IL_0008: stsfld int32 JitTest.Test::n IL_000d: ret - } + } - .method public hidebysig specialname rtspecialname + .method public hidebysig specialname rtspecialname instance void .ctor() il managed { .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret - } + } - } + } -} +} |