summaryrefslogtreecommitdiff
path: root/tests/src/JIT/jit64/mcc/interop/mcc_i03.il
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/JIT/jit64/mcc/interop/mcc_i03.il')
-rw-r--r--tests/src/JIT/jit64/mcc/interop/mcc_i03.il93
1 files changed, 93 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/mcc/interop/mcc_i03.il b/tests/src/JIT/jit64/mcc/interop/mcc_i03.il
new file mode 100644
index 0000000000..c2c5cfdb63
--- /dev/null
+++ b/tests/src/JIT/jit64/mcc/interop/mcc_i03.il
@@ -0,0 +1,93 @@
+// 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 MCCTest {}
+.module mcc_i03.exe
+
+
+.namespace MCCTest
+{
+ .class MyClass
+ {
+ .method assembly static pinvokeimpl("native_i0c" as "#1" cdecl)
+ vararg valuetype MCCTest.VType0 Sum(unsigned int64) cil managed preservesig {
+ }
+
+ .method private valuetype MCCTest.VType0 GetSum()
+ {
+ .maxstack 64
+ ldc.i8 1
+ ldc.i8 2
+ ldc.i8 3
+ ldc.i8 4
+ ldc.i8 5
+ ldc.i8 6
+ ldc.i8 7
+ ldc.i8 8
+ ldc.i8 9
+ ldc.i8 10
+ ldc.i8 11
+ ldc.i8 12
+ ldc.i8 1
+ neg
+ call vararg valuetype MCCTest.VType0 MCCTest.MyClass::GetSum2(unsigned int64, ...,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64,
+ unsigned int64)
+ ret
+ }
+
+ .method private static vararg valuetype MCCTest.VType0 GetSum2(unsigned int64)
+ {
+ jmp vararg valuetype MCCTest.VType0 MCCTest.MyClass::Sum(unsigned int64)
+ }
+
+ .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.VType0 res,
+ [2] int32 rc
+ )
+
+ newobj instance void MCCTest.MyClass::.ctor()
+ stloc.s me
+
+ ldloc.s me
+ call instance valuetype MCCTest.VType0 MCCTest.MyClass::GetSum()
+ stloc.s res
+
+ // Check Result
+ ldloc.s res
+ ldc.i4 12
+ call int32 MCCTest.Common::CheckResult(valuetype MCCTest.VType0, int32)
+ stloc.s rc
+
+ ldloc.s rc
+ ret
+ } // end of method MyClass::Main
+
+ } // end of class MyClass
+
+} // end of namespace MCCTest