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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
|
// 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.
.assembly extern mscorlib {}
.assembly MCCTest {}
.module mcc_i57.exe
.namespace MCCTest
{
.class MyClass
{
.method assembly static pinvokeimpl("native_i5s" as "#1" stdcall)
valuetype MCCTest.VType5 Sum(unsigned int64, valuetype MCCTest.VType5, float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
int32, valuetype MCCTest.VType5, unsigned int16, valuetype MCCTest.VType5, unsigned int32, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5, int64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5, int16, valuetype MCCTest.VType5) cil managed preservesig {
}
.method private valuetype MCCTest.VType5 GetSum()
{
.maxstack 64
.locals init (
[0] valuetype MCCTest.VType5 v1,
[1] valuetype MCCTest.VType5 v2,
[2] valuetype MCCTest.VType5 v3,
[3] valuetype MCCTest.VType5 v4,
[4] valuetype MCCTest.VType5 v5,
[5] valuetype MCCTest.VType5 v6,
[6] valuetype MCCTest.VType5 v7,
[7] valuetype MCCTest.VType5 v8,
[8] valuetype MCCTest.VType5 v9,
[9] valuetype MCCTest.VType5 v10,
[10] valuetype MCCTest.VType5 v11,
[11] valuetype MCCTest.VType5 v12
)
// Initialize v1 thru v12
ldloca.s v1
call instance void MCCTest.VType5::Init()
ldloca.s v2
call instance void MCCTest.VType5::Init()
ldloca.s v3
call instance void MCCTest.VType5::Init()
ldloca.s v4
call instance void MCCTest.VType5::Init()
ldloca.s v5
call instance void MCCTest.VType5::Init()
ldloca.s v6
call instance void MCCTest.VType5::Init()
ldloca.s v7
call instance void MCCTest.VType5::Init()
ldloca.s v8
call instance void MCCTest.VType5::Init()
ldloca.s v9
call instance void MCCTest.VType5::Init()
ldloca.s v10
call instance void MCCTest.VType5::Init()
ldloca.s v11
call instance void MCCTest.VType5::Init()
ldloca.s v12
call instance void MCCTest.VType5::Init()
ldc.i8 1
ldloc.s v1
ldc.r8 2
ldloc.s v2
ldc.r4 3
ldloc.s v3
ldc.i4 4
ldloc.s v4
ldc.i8 5
conv.u2
ldloc.s v5
ldc.i4 6
ldloc.s v6
ldc.r4 7
ldloc.s v7
ldc.i8 8
ldloc.s v8
ldc.r4 9
ldloc.s v9
ldc.r8 10
ldloc.s v10
ldc.r4 11
ldloc.s v11
ldc.i8 12
conv.i2
ldloc.s v12
call valuetype MCCTest.VType5 MCCTest.MyClass::GetSum2( unsigned int64, valuetype MCCTest.VType5,
float64, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5,
int32, valuetype MCCTest.VType5,
unsigned int16, valuetype MCCTest.VType5,
unsigned int32, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5,
int64, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5,
float64, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5,
int16, valuetype MCCTest.VType5)
ret
}
.method private static valuetype MCCTest.VType5 GetSum2(unsigned int64, valuetype MCCTest.VType5, float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
int32, valuetype MCCTest.VType5, unsigned int16, valuetype MCCTest.VType5, unsigned int32, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5, int64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5, int16, valuetype MCCTest.VType5)
{
jmp valuetype MCCTest.VType5 MCCTest.MyClass::Sum(unsigned int64, valuetype MCCTest.VType5, float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
int32, valuetype MCCTest.VType5, unsigned int16, valuetype MCCTest.VType5, unsigned int32, valuetype MCCTest.VType5,
float32, valuetype MCCTest.VType5, int64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5,
float64, valuetype MCCTest.VType5, float32, valuetype MCCTest.VType5, int16, valuetype MCCTest.VType5)
}
.method public specialname rtspecialname instance void .ctor()
{
.maxstack 1
ldarg.0
call instance void [mscorlib]System.Object::.ctor()
ret
} // end of method MyClass::.ctor
.method private static int32 Main(string[] args)
{
.entrypoint
.maxstack 64
.locals init (
[0] class MCCTest.MyClass me,
[1] valuetype MCCTest.VType5 res,
[2] int32 rc
)
newobj instance void MCCTest.MyClass::.ctor()
stloc.s me
ldloc.s me
call instance valuetype MCCTest.VType5 MCCTest.MyClass::GetSum()
stloc.s res
// Check Result
ldloc.s res
ldc.i4 12
call int32 MCCTest.Common::CheckResult(valuetype MCCTest.VType5, int32)
stloc.s rc
ldloc.s rc
ret
} // end of method MyClass::Main
} // end of class MyClass
} // end of namespace MCCTest
|