summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/Invoke/implicit/ii2.il
blob: ae0b7282cb726587385bdf438617dd7b5b11d555 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.





.assembly extern mscorlib { }
.assembly extern System.Console
{
  .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A )
  .ver 4:0:0:0
}
.assembly 'test'
{

  //  .custom instance void ['mscorlib']System.Diagnostics.DebuggableAttribute::.ctor(bool,
  //                                                                                  bool) = ( 01 00 00 01 00 00 ) 
  
  
}
.module 'test.exe'
// MVID: {37F05BF1-E8CC-42FA-A268-D866F07CFFF8}
.namespace TestCase
{
  .class private auto ansi Test
         extends ['mscorlib']System.Object
  {
    .method private hidebysig static int32 compare(int16 arg1, int16 arg2) il managed
    {
      // Code size       26 (0x1a)
      .maxstack  2
      .locals (int32 V_0)
  			ldarg.0
  			ldc.i4	   0xffff0000
  			and
  			brfalse.s  good_so_far
  			ldarg.0
  			ldc.i4	   0xffff0000
  			and
  			ldc.i4     0xffff0000
 			bne.un.s   throwex
  good_so_far:
  			ldarg.1
  			ldc.i4	   0xffff0000
  			and
  			brfalse.s  looks_good
  			ldarg.1
  			ldc.i4	   0xffff0000
  			and
  			ldc.i4	   0xffff0000
  			beq.s      looks_good
  throwex:
  			newobj     instance void ['mscorlib']System.ApplicationException::.ctor()
  			throw
  looks_good:
  
      IL_0000:  ldarg.0
      IL_0002:  ldarg.1
      IL_0004:  bge.s      IL_000a

      IL_0006:  ldc.i4.m1
      IL_0007:  stloc.0
      IL_0008:  br.s       IL_0018

      IL_000a:  ldarg.0
      IL_000c:  ldarg.1
      IL_000e:  ble.s      IL_0014

      IL_0010:  ldc.i4.m1
      IL_0011:  stloc.0
      IL_0012:  br.s       IL_0018

      IL_0014:  ldc.i4.0
      IL_0015:  stloc.0
      IL_0016:  br.s       IL_0018

      IL_0018:  ldloc.0
      IL_0019:  ret
    } // end of method 'Test::compare'

    .method private hidebysig static int32 Main() il managed
    {
      .entrypoint
      // Code size       39 (0x27)
      .maxstack  2
      .locals (int32 V_0)
      IL_0000:  ldc.i4 0xfffffff2
      			conv.i
      IL_0001:  ldc.i4 0xfff2
      			conv.i
      IL_0002:  call       int32 TestCase.Test::compare(int16,
                                                        int16)
      IL_0007:  brfalse.s  IL_0017

      IL_0009:  ldstr      "FAILED"
      IL_000e:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_0013:  ldc.i4.1
      IL_0014:  stloc.0
      IL_0015:  br.s       IL_0025

      IL_0017:  ldstr      "PASSED"
      IL_001c:  call       void [System.Console]System.Console::WriteLine(class System.String)
      IL_0021:  ldc.i4    0x64
      IL_0022:  stloc.0
      IL_0023:  br.s       IL_0025

      IL_0025:  ldloc.0
      IL_0026:  ret
    } // end of method 'Test::Main'

    .method public hidebysig specialname rtspecialname 
            instance void .ctor() il managed
    {
      // Code size       7 (0x7)
      .maxstack  8
      IL_0000:  ldarg.0
      IL_0001:  call       instance void ['mscorlib']System.Object::.ctor()
      IL_0006:  ret
    } // end of method 'Test::.ctor'

  } // end of class 'Test'

} // end of namespace 'TestCase'

//*********** DISASSEMBLY COMPLETE ***********************