summaryrefslogtreecommitdiff
path: root/tests/src/JIT/Methodical/ELEMENT_TYPE_IU/i_seq.il
blob: 80a402e68d5e7e497f0fa6bae89937da82834d6c (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
// 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 'test'
{ }
.class private auto ansi Test extends [mscorlib]System.Object
{
.method private hidebysig static native int calc(native int, native int) il managed
{
	.maxstack 8
	.locals (native int)
	ldarg.1
	stloc.0
	ldloc.0
	br again
again:
	ldarg.0
	brfalse.s stop
	ldarg.0
	ldarg.1
	switch (sum,fact)
	pop
	br stop
sum:
	add
	br.s cont
fact:
	mul
cont:
	ldarg.0
	ldc.i4.1
	sub
	starg 0
	br again
stop:
	ret
}

.method private hidebysig static int32 Main() il managed
{
	.entrypoint
	.maxstack  5
	ldc.i4.s 6
	ldc.i4.1
	call native int Test::calc(native int, native int)
	ldc.i4 720
	conv.i
	ceq
	brfalse ERROR
	ldc.i4.s 6
	ldc.i4.0
	call native int Test::calc(native int, native int)
	ldc.i4 21
	conv.i
	ceq
	brfalse ERROR
	ldc.i4 0x64
	ldstr "PASSED"
	br EXIT
ERROR:
	ldc.i4.1
	ldstr "FAILED"
EXIT:
	call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String)
	ret
}
.method public hidebysig specialname rtspecialname 
        instance void .ctor() il managed
{
	.maxstack  8
	ldarg.0
	call       instance void [mscorlib]System.Object::.ctor()
	ret
}
}