diff options
Diffstat (limited to 'tests/src/JIT/jit64/localloc/verify/verify01_small.il')
-rw-r--r-- | tests/src/JIT/jit64/localloc/verify/verify01_small.il | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/localloc/verify/verify01_small.il b/tests/src/JIT/jit64/localloc/verify/verify01_small.il new file mode 100644 index 0000000000..0600d4fff3 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/verify/verify01_small.il @@ -0,0 +1,88 @@ +// Test Invalid program (evaluation stack is not empty before localloc call + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly eh01 +{ + .custom instance void [mscorlib]System.Security.SecurityRulesAttribute::.ctor(valuetype [mscorlib]System.Security.SecurityRuleSet) = ( 01 00 01 00 00 ) +} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 1 + .locals init(int32 V_0) + .try + { + IL_0000: call void LocallocTest::func() + IL_0005: leave.s IL_0027 + + } + catch [mscorlib]System.Security.VerificationException + { + IL_0007: pop + IL_0008: ldstr "Passed" + IL_000d: call void [System.Console]System.Console::WriteLine(string) + IL_0012: ldc.i4.s 100 + IL_0014: stloc.0 + IL_0015: leave.s IL_0035 + + } + catch [mscorlib]System.InvalidProgramException + { + IL_0017: pop + IL_0018: ldstr "Passed" + IL_009d: call void [System.Console]System.Console::WriteLine(string) + IL_0022: ldc.i4.s 100 + IL_0024: stloc.0 + IL_0025: leave.s IL_0035 + + } + IL_0027: ldstr "Failed" + IL_002c: call void [System.Console]System.Console::WriteLine(string) + IL_0031: ldc.i4.1 + IL_0032: stloc.0 + IL_0033: br.s IL_0035 + + IL_0035: ldloc.0 + IL_0036: ret + } + + .method private hidebysig static void func() cil managed + { + .maxstack 2 + .locals init(int32* V_0, + int32* V_1) + IL_0000: ldc.i4.4 + IL_0001: ldc.i4.1 + IL_0002: mul + IL_0003: localloc + IL_0005: stloc.1 + IL_0006: ldc.i4.4 + IL_0007: ldc.i4.1 + IL_0008: mul + IL_0009: localloc + IL_000b: stloc.0 + IL_000c: ret + } + + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } + +} + + + |