X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mono%2Ftests%2Fvararg.il;h=9c895194ce431d73e9bef0d8310d40fd7db10c7c;hb=af315df3ab13d99d05b3aa0ca26e7022449cf275;hp=91bec52a7bf61161890be6b92fc99bd7b63d8dbd;hpb=5bbfa8860b090e465a3aa45edeb9c94481ef1a22;p=mono.git diff --git a/mono/tests/vararg.il b/mono/tests/vararg.il index 91bec52a7bf..9c895194ce4 100644 --- a/mono/tests/vararg.il +++ b/mono/tests/vararg.il @@ -86,13 +86,17 @@ } // Test varargs - .method public static int32 test_85_varargs_refany () cil managed { + .method public static int32 test_99_varargs_refany () cil managed { .maxstack 16 ldc.i4 1 + ldc.i4 2 + ldc.i4 3 + ldc.i4 4 + ldc.i4 5 ldc.i4 42 ldc.i4 43 - call vararg int32 Tests::varargtest_refany (int32, ..., int32, int32) + call vararg int32 Tests::varargtest_refany (int32, ..., int32, int32, int32, int32, int32, int32) ret } @@ -158,6 +162,54 @@ ret } + .method public static vararg float64 varargtest_refany_fp (float64 last) cil managed { + .maxstack 16 + .locals init ( + valuetype [mscorlib]System.ArgIterator it, + float64 sum + ) + + ldloca.s it + arglist + call instance void [mscorlib]System.ArgIterator::.ctor (valuetype [mscorlib]System.RuntimeArgumentHandle) + L0: + ldloca.s it + call instance int32 [mscorlib]System.ArgIterator::GetRemainingCount () + ldc.i4.0 + ceq + brtrue L1 + ldloca.s it + call instance typedref [mscorlib]System.ArgIterator::GetNextArg () + //ldloc.s sum + //call void [mscorlib]System.Console::WriteLine (float64) + refanyval float64 + ldind.r8 + //dup + //call void [mscorlib]System.Console::WriteLine (float64) + ldloc.s sum + add + stloc.s sum + br.s L0 + L1: + ldloc.s sum + ret + } + + .method public static int32 test_99_varargs_refany_fp () cil managed { + .maxstack 16 + + ldc.r8 1 + ldc.r8 2 + ldc.r8 3 + ldc.r8 4 + ldc.r8 5 + ldc.r8 42 + ldc.r8 43 + call vararg float64 Tests::varargtest_refany_fp (float64, ..., float64, float64, float64, float64, float64, float64) + conv.i4 + ret + } + .method public static int32 Main () cil managed { .maxstack 16 .entrypoint