summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/tailcall/test_void.il
blob: 18c67ba31f120312a02e5f5644c9c365d9f475c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

.assembly extern System.Console
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:0:0:0
}
.assembly extern mscorlib { }
.assembly test_void { }
.namespace JitTest
{
  .class private auto ansi beforefieldinit Test extends [mscorlib]System.Object
  {
    .field private static int32 m
    .field private static int32 n
    .method private hidebysig static void Main() il managed
    {
      .entrypoint
      .maxstack  4
      .locals (int32 V_0)
      ldsfld     int32 JitTest.Test::n
      ldc.i4.1
      bne.un.s   IL_0047

      ldsfld     int32 JitTest.Test::m
      ldc.i4     0x375f00
      bne.un.s   IL_0029

      ldstr      "PASSED: 10! == 3628800"
      call       void [System.Console]System.Console::WriteLine(class System.String)
      ldc.i4.s   100
      call       void [mscorlib]System.Environment::set_ExitCode(int32)
      ret

IL_0029:
      ldstr      "FAILED: 10! != "
      ldsflda    int32 JitTest.Test::m
      call       instance class System.String [mscorlib]System.Int32::ToString()
      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 [mscorlib]System.Environment::set_ExitCode(int32)
      ret

IL_0047:
      ldsfld     int32 JitTest.Test::m
      ldsfld     int32 JitTest.Test::n
      dup
      ldc.i4.1
      sub
      stsfld     int32 JitTest.Test::n
      mul
      stsfld     int32 JitTest.Test::m
      tail. call void JitTest.Test::Main()
      ret
    } 

    .method private hidebysig  specialname rtspecialname static 
            void .cctor() il managed
    {
      .maxstack  8
      IL_0000:  ldc.i4.1
      IL_0001:  stsfld     int32 JitTest.Test::m
      IL_0006:  ldc.i4.s   10
      IL_0008:  stsfld     int32 JitTest.Test::n
      IL_000d:  ret
    } 

    .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
    } 

  } 

}