summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Regression/JitBlue/DevDiv_205323/starg0.il
blob: d69453372de4e8281e5257fdd9a203900fb334ff (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
// 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.

// Storing to arg 0 in an instance method requires special 
// handling by the jit.

.assembly extern mscorlib {}
.assembly starg0 {}
.module starg0.exe

.class public F
{

.method public instance void .ctor(int32 a)
{
   ldarg.0
   ldarg.1
   ldc.i4 100
   add
   stfld int32 F::A
   ret
}

.field public int32 A

.method public int32 Starg0() cil managed
{
   ldarg.0
   ldfld int32 F::A
   newobj instance void F::.ctor(int32)
   starg.s 0
   ldarg.0
   ldfld int32 F::A
   ret
}

.method public hidebysig static int32 Main(string[] args) cil managed
{
   .entrypoint
   ldc.i4 -100
   newobj instance void F::.ctor(int32)
   call instance int32 F::Starg0()
   ret
}


}