blob: a510d05e58cc055290eda4db11d709114ba2994c (
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
127
128
129
130
131
132
133
134
135
136
137
138
139
|
// 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'
{
}
.module 'test.exe'
.namespace TestCase
{
.class private auto ansi Test
extends ['mscorlib']System.Object
{
.method private hidebysig static int8 compare(int8 arg1, int8 arg2) il managed
{
.maxstack 2
.locals (int32 V_0)
ldarg.0
ldc.i4 0xffffff00
and
brfalse.s good_so_far
ldarg.0
ldc.i4 0xffffff00
and
ldc.i4 0xffffff00
bne.un.s throwex
good_so_far:
ldarg.1
ldc.i4 0xffffff00
and
brfalse.s looks_good
ldarg.1
ldc.i4 0xffffff00
and
ldc.i4 0xffffff00
beq.s looks_good
throwex:
newobj instance void ['mscorlib']System.Exception::.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
.maxstack 4
.locals (int32 V_0)
IL_0000: ldc.i4 0xfffffff2
IL_0001: ldc.i4 0xfff2
IL_0002: call int8 TestCase.Test::compare(int8,
int8)
dup
ldc.i4.1
ceq
brtrue check_done
dup
ldc.i4.m1
ceq
brtrue check_done
dup
ldc.i4.0
ceq
brtrue check_done
newobj instance void [mscorlib]System.Exception::.ctor()
throw
check_done:
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
{
.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'
|