diff options
author | Richard L Ford <richford@microsoft.com> | 2015-12-17 21:23:42 -0800 |
---|---|---|
committer | Richard L Ford <richford@microsoft.com> | 2015-12-22 22:12:54 -0800 |
commit | a60e65ab1549d0c584a357f30a4411502b9c1791 (patch) | |
tree | 1ce7f4527ae36b975bb3e1ea43347d00b3f239ec /tests/src/JIT/jit64/localloc/eh | |
parent | 428f413f917a610eae457f44b1870d04ff1f3775 (diff) | |
download | coreclr-a60e65ab1549d0c584a357f30a4411502b9c1791.tar.gz coreclr-a60e65ab1549d0c584a357f30a4411502b9c1791.tar.bz2 coreclr-a60e65ab1549d0c584a357f30a4411502b9c1791.zip |
Port additional desktop tests to CoreClr
Add exclusions for tests that are failing but that
we expect to be able to get working.
Diffstat (limited to 'tests/src/JIT/jit64/localloc/eh')
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/app.config | 27 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_dynamic.il | 212 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_dynamic.ilproj | 45 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_large.il | 212 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_large.ilproj | 45 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_small.il | 212 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh03_small.ilproj | 45 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_dynamic.il | 192 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_dynamic.ilproj | 45 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_large.il | 192 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_large.ilproj | 45 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_small.il | 192 | ||||
-rw-r--r-- | tests/src/JIT/jit64/localloc/eh/eh04_small.ilproj | 45 |
13 files changed, 1509 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/localloc/eh/app.config b/tests/src/JIT/jit64/localloc/eh/app.config new file mode 100644 index 0000000000..6f7bbd9d2b --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/app.config @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<configuration> + <runtime> + <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> + <dependentAssembly> + <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.20.0" newVersion="4.0.20.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Text.Encoding" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.IO" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + <dependentAssembly> + <assemblyIdentity name="System.Reflection" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" /> + <bindingRedirect oldVersion="0.0.0.0-4.0.10.0" newVersion="4.0.10.0" /> + </dependentAssembly> + </assemblyBinding> + </runtime> +</configuration> diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.il b/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.il new file mode 100644 index 0000000000..0a1085f31b --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.il @@ -0,0 +1,212 @@ +// Test localloc with filter + handler construct. + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common {} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + filter + { + ldstr "In filter block" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: pop + IL_005d: ldstr "intArray1" + IL_0062: ldloc.3 + IL_0063: ldsfld int32 LocallocTest::locallocSize + IL_0068: ldc.i4 1000 + IL_006d: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0072: brtrue.s IL_0076 + + IL_0074: ldc.i4.0 + br.s L_ENDFILTER + IL_0076: ldstr "intArray2" + IL_007b: ldloc.s intArray2 + IL_007d: ldsfld int32 LocallocTest::locallocSize + IL_0082: ldc.i4 2000 + IL_0087: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008c: brtrue.s IL_0090 + + IL_008e: ldc.i4.0 + br.s L_ENDFILTER + IL_0090: ldc.i4.1 + L_ENDFILTER: endfilter + } + { + ldstr "In handler block" + call void [System.Console]System.Console::WriteLine(string) + pop + ldstr "intArray1" + IL_0095: ldloc.3 + IL_0096: ldsfld int32 LocallocTest::locallocSize + IL_009b: ldc.i4 1000 + IL_00a0: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00a5: brtrue.s IL_00a9 + + IL_00a7: ldc.i4.0 + IL_00a8: stloc.0 + IL_00a9: ldstr "intArray2" + IL_00ae: ldloc.s intArray2 + IL_00b0: ldsfld int32 LocallocTest::locallocSize + IL_00b5: ldc.i4 2000 + IL_00ba: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00bf: brtrue.s IL_00c3 + + IL_00c1: ldc.i4.0 + IL_00c2: stloc.0 + IL_00c3: leave.s IL_00c5 + } + IL_00c5: ldloc.0 + IL_00c6: brtrue.s IL_00cd + + IL_00c8: ldc.i4.1 + IL_00c9: stloc.s retValue + IL_00cb: br.s L_RET + IL_00cd: ldstr "intArray1" + IL_00d2: ldloc.3 + IL_00d3: ldsfld int32 LocallocTest::locallocSize + IL_00d8: ldc.i4 1000 + IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00e2: brtrue.s IL_00e9 + + IL_00e4: ldc.i4.1 + IL_00e5: stloc.s retValue + IL_00e7: br.s L_RET + + IL_00e9: ldstr "intArray2" + IL_00ee: ldloc.s intArray2 + IL_00f0: ldsfld int32 LocallocTest::locallocSize + IL_00f5: ldc.i4 2000 + IL_00fa: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00ff: brtrue.s IL_0106 + + IL_0101: ldc.i4.1 + IL_0102: stloc.s retValue + IL_0104: br.s L_RET + IL_0106: ldstr "local1" + IL_010b: ldloc.1 + IL_010c: ldc.i8 0xfedcba9876543210 + IL_0115: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_011a: brtrue.s IL_0121 + + IL_011c: ldc.i4.1 + IL_011d: stloc.s retValue + IL_011f: br.s L_RET + + IL_0121: ldstr "local2" + IL_0126: ldloc.2 + IL_0127: ldc.i8 0xfedcba9876543211 + IL_0130: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0135: brtrue.s IL_013c + + IL_0137: ldc.i4.1 + IL_0138: stloc.s retValue + IL_013a: br.s L_RET + + IL_013c: ldstr "Passed\n" + IL_0141: call void [System.Console]System.Console::WriteLine(string) + IL_0146: ldc.i4.s 100 + IL_0148: stloc.s retValue + + L_RET: ldloc.s retValue + IL_014e: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.ilproj b/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.ilproj new file mode 100644 index 0000000000..e75ba6e9b8 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_dynamic.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh03_dynamic.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_large.il b/tests/src/JIT/jit64/localloc/eh/eh03_large.il new file mode 100644 index 0000000000..9d00874ea8 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_large.il @@ -0,0 +1,212 @@ +// Test localloc with filter + handler construct. + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common {} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldc.i4 0x1000 + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldc.i4 0x1000 + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldc.i4 0x1000 + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + filter + { + ldstr "In filter block" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: pop + IL_005d: ldstr "intArray1" + IL_0062: ldloc.3 + IL_0063: ldsfld int32 LocallocTest::locallocSize + IL_0068: ldc.i4 1000 + IL_006d: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0072: brtrue.s IL_0076 + + IL_0074: ldc.i4.0 + br.s L_ENDFILTER + IL_0076: ldstr "intArray2" + IL_007b: ldloc.s intArray2 + IL_007d: ldsfld int32 LocallocTest::locallocSize + IL_0082: ldc.i4 2000 + IL_0087: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008c: brtrue.s IL_0090 + + IL_008e: ldc.i4.0 + br.s L_ENDFILTER + IL_0090: ldc.i4.1 + L_ENDFILTER: endfilter + } + { + ldstr "In handler block" + call void [System.Console]System.Console::WriteLine(string) + pop + ldstr "intArray1" + IL_0095: ldloc.3 + IL_0096: ldsfld int32 LocallocTest::locallocSize + IL_009b: ldc.i4 1000 + IL_00a0: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00a5: brtrue.s IL_00a9 + + IL_00a7: ldc.i4.0 + IL_00a8: stloc.0 + IL_00a9: ldstr "intArray2" + IL_00ae: ldloc.s intArray2 + IL_00b0: ldsfld int32 LocallocTest::locallocSize + IL_00b5: ldc.i4 2000 + IL_00ba: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00bf: brtrue.s IL_00c3 + + IL_00c1: ldc.i4.0 + IL_00c2: stloc.0 + IL_00c3: leave.s IL_00c5 + } + IL_00c5: ldloc.0 + IL_00c6: brtrue.s IL_00cd + + IL_00c8: ldc.i4.1 + IL_00c9: stloc.s retValue + IL_00cb: br.s L_RET + IL_00cd: ldstr "intArray1" + IL_00d2: ldloc.3 + IL_00d3: ldsfld int32 LocallocTest::locallocSize + IL_00d8: ldc.i4 1000 + IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00e2: brtrue.s IL_00e9 + + IL_00e4: ldc.i4.1 + IL_00e5: stloc.s retValue + IL_00e7: br.s L_RET + + IL_00e9: ldstr "intArray2" + IL_00ee: ldloc.s intArray2 + IL_00f0: ldsfld int32 LocallocTest::locallocSize + IL_00f5: ldc.i4 2000 + IL_00fa: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00ff: brtrue.s IL_0106 + + IL_0101: ldc.i4.1 + IL_0102: stloc.s retValue + IL_0104: br.s L_RET + IL_0106: ldstr "local1" + IL_010b: ldloc.1 + IL_010c: ldc.i8 0xfedcba9876543210 + IL_0115: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_011a: brtrue.s IL_0121 + + IL_011c: ldc.i4.1 + IL_011d: stloc.s retValue + IL_011f: br.s L_RET + + IL_0121: ldstr "local2" + IL_0126: ldloc.2 + IL_0127: ldc.i8 0xfedcba9876543211 + IL_0130: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0135: brtrue.s IL_013c + + IL_0137: ldc.i4.1 + IL_0138: stloc.s retValue + IL_013a: br.s L_RET + + IL_013c: ldstr "Passed\n" + IL_0141: call void [System.Console]System.Console::WriteLine(string) + IL_0146: ldc.i4.s 100 + IL_0148: stloc.s retValue + + L_RET: ldloc.s retValue + IL_014e: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_large.ilproj b/tests/src/JIT/jit64/localloc/eh/eh03_large.ilproj new file mode 100644 index 0000000000..6c4a9f9d83 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_large.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh03_large.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_small.il b/tests/src/JIT/jit64/localloc/eh/eh03_small.il new file mode 100644 index 0000000000..6438a15182 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_small.il @@ -0,0 +1,212 @@ +// Test localloc with filter + handler construct. + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common {} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldc.i4.1 + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldc.i4.1 + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldc.i4.1 + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + filter + { + ldstr "In filter block" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: pop + IL_005d: ldstr "intArray1" + IL_0062: ldloc.3 + IL_0063: ldsfld int32 LocallocTest::locallocSize + IL_0068: ldc.i4 1000 + IL_006d: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0072: brtrue.s IL_0076 + + IL_0074: ldc.i4.0 + br.s L_ENDFILTER + IL_0076: ldstr "intArray2" + IL_007b: ldloc.s intArray2 + IL_007d: ldsfld int32 LocallocTest::locallocSize + IL_0082: ldc.i4 2000 + IL_0087: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008c: brtrue.s IL_0090 + + IL_008e: ldc.i4.0 + br.s L_ENDFILTER + IL_0090: ldc.i4.1 + L_ENDFILTER: endfilter + } + { + ldstr "In handler block" + call void [System.Console]System.Console::WriteLine(string) + pop + ldstr "intArray1" + IL_0095: ldloc.3 + IL_0096: ldsfld int32 LocallocTest::locallocSize + IL_009b: ldc.i4 1000 + IL_00a0: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00a5: brtrue.s IL_00a9 + + IL_00a7: ldc.i4.0 + IL_00a8: stloc.0 + IL_00a9: ldstr "intArray2" + IL_00ae: ldloc.s intArray2 + IL_00b0: ldsfld int32 LocallocTest::locallocSize + IL_00b5: ldc.i4 2000 + IL_00ba: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00bf: brtrue.s IL_00c3 + + IL_00c1: ldc.i4.0 + IL_00c2: stloc.0 + IL_00c3: leave.s IL_00c5 + } + IL_00c5: ldloc.0 + IL_00c6: brtrue.s IL_00cd + + IL_00c8: ldc.i4.1 + IL_00c9: stloc.s retValue + IL_00cb: br.s L_RET + IL_00cd: ldstr "intArray1" + IL_00d2: ldloc.3 + IL_00d3: ldsfld int32 LocallocTest::locallocSize + IL_00d8: ldc.i4 1000 + IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00e2: brtrue.s IL_00e9 + + IL_00e4: ldc.i4.1 + IL_00e5: stloc.s retValue + IL_00e7: br.s L_RET + + IL_00e9: ldstr "intArray2" + IL_00ee: ldloc.s intArray2 + IL_00f0: ldsfld int32 LocallocTest::locallocSize + IL_00f5: ldc.i4 2000 + IL_00fa: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00ff: brtrue.s IL_0106 + + IL_0101: ldc.i4.1 + IL_0102: stloc.s retValue + IL_0104: br.s L_RET + IL_0106: ldstr "local1" + IL_010b: ldloc.1 + IL_010c: ldc.i8 0xfedcba9876543210 + IL_0115: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_011a: brtrue.s IL_0121 + + IL_011c: ldc.i4.1 + IL_011d: stloc.s retValue + IL_011f: br.s L_RET + + IL_0121: ldstr "local2" + IL_0126: ldloc.2 + IL_0127: ldc.i8 0xfedcba9876543211 + IL_0130: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0135: brtrue.s IL_013c + + IL_0137: ldc.i4.1 + IL_0138: stloc.s retValue + IL_013a: br.s L_RET + + IL_013c: ldstr "Passed\n" + IL_0141: call void [System.Console]System.Console::WriteLine(string) + IL_0146: ldc.i4.s 100 + IL_0148: stloc.s retValue + + L_RET: ldloc.s retValue + IL_014e: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} diff --git a/tests/src/JIT/jit64/localloc/eh/eh03_small.ilproj b/tests/src/JIT/jit64/localloc/eh/eh03_small.ilproj new file mode 100644 index 0000000000..272044bb13 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh03_small.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh03_small.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.il b/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.il new file mode 100644 index 0000000000..17336bc74f --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.il @@ -0,0 +1,192 @@ + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common{} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + fault + { + ldstr "In fault" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: ldstr "intArray1" + IL_0061: ldloc.3 + IL_0062: ldsfld int32 LocallocTest::locallocSize + IL_0067: ldc.i4 1000 + IL_006c: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0071: brtrue.s IL_0075 + + IL_0073: ldc.i4.0 + IL_0074: stloc.0 + IL_0075: ldstr "intArray2" + IL_007a: ldloc.s intArray2 + IL_007c: ldsfld int32 LocallocTest::locallocSize + IL_0081: ldc.i4 2000 + IL_0086: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008b: brtrue.s IL_008f + + IL_008d: ldc.i4.0 + IL_008e: stloc.0 + IL_008f: endfault + } + } + catch [mscorlib]System.Object + { + IL_0090: pop + IL_0091: leave.s IL_0093 + + } + IL_0093: ldloc.0 + IL_0094: brtrue.s IL_009b + + IL_0096: ldc.i4.1 + IL_0097: stloc.s retValue + IL_0099: br.s IL_011a + IL_009b: ldstr "intArray1" + IL_00a0: ldloc.3 + IL_00a1: ldsfld int32 LocallocTest::locallocSize + IL_00a6: ldc.i4 1000 + IL_00ab: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00b0: brtrue.s IL_00b7 + + IL_00b2: ldc.i4.1 + IL_00b3: stloc.s retValue + IL_00b5: br.s IL_011a + + IL_00b7: ldstr "intArray2" + IL_00bc: ldloc.s intArray2 + IL_00be: ldsfld int32 LocallocTest::locallocSize + IL_00c3: ldc.i4 2000 + IL_00c8: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00cd: brtrue.s IL_00d4 + + IL_00cf: ldc.i4.1 + IL_00d0: stloc.s retValue + IL_00d2: br.s IL_011a + IL_00d4: ldstr "local1" + IL_00d9: ldloc.1 + IL_00da: ldc.i8 0xfedcba9876543210 + IL_00e3: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_00e8: brtrue.s IL_00ef + + IL_00ea: ldc.i4.1 + IL_00eb: stloc.s retValue + IL_00ed: br.s IL_011a + + IL_00ef: ldstr "local2" + IL_00f4: ldloc.2 + IL_00f5: ldc.i8 0xfedcba9876543211 + IL_00fe: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0103: brtrue.s IL_010a + + IL_0105: ldc.i4.1 + IL_0106: stloc.s retValue + IL_0108: br.s IL_011a + + IL_010a: ldstr "Passed\n" + IL_010f: call void [System.Console]System.Console::WriteLine(string) + IL_0114: ldc.i4.s 100 + IL_0116: stloc.s retValue + IL_0118: br.s IL_011a + + IL_011a: ldloc.s retValue + IL_011c: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} + + + diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.ilproj b/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.ilproj new file mode 100644 index 0000000000..e236646501 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_dynamic.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh04_dynamic.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_large.il b/tests/src/JIT/jit64/localloc/eh/eh04_large.il new file mode 100644 index 0000000000..9587ab1625 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_large.il @@ -0,0 +1,192 @@ + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common{} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldc.i4 0x1000 + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldc.i4 0x1000 + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldc.i4 0x1000 + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + fault + { + ldstr "In fault" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: ldstr "intArray1" + IL_0061: ldloc.3 + IL_0062: ldsfld int32 LocallocTest::locallocSize + IL_0067: ldc.i4 1000 + IL_006c: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0071: brtrue.s IL_0075 + + IL_0073: ldc.i4.0 + IL_0074: stloc.0 + IL_0075: ldstr "intArray2" + IL_007a: ldloc.s intArray2 + IL_007c: ldsfld int32 LocallocTest::locallocSize + IL_0081: ldc.i4 2000 + IL_0086: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008b: brtrue.s IL_008f + + IL_008d: ldc.i4.0 + IL_008e: stloc.0 + IL_008f: endfault + } + } + catch [mscorlib]System.Object + { + IL_0090: pop + IL_0091: leave.s IL_0093 + + } + IL_0093: ldloc.0 + IL_0094: brtrue.s IL_009b + + IL_0096: ldc.i4.1 + IL_0097: stloc.s retValue + IL_0099: br.s IL_011a + IL_009b: ldstr "intArray1" + IL_00a0: ldloc.3 + IL_00a1: ldsfld int32 LocallocTest::locallocSize + IL_00a6: ldc.i4 1000 + IL_00ab: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00b0: brtrue.s IL_00b7 + + IL_00b2: ldc.i4.1 + IL_00b3: stloc.s retValue + IL_00b5: br.s IL_011a + + IL_00b7: ldstr "intArray2" + IL_00bc: ldloc.s intArray2 + IL_00be: ldsfld int32 LocallocTest::locallocSize + IL_00c3: ldc.i4 2000 + IL_00c8: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00cd: brtrue.s IL_00d4 + + IL_00cf: ldc.i4.1 + IL_00d0: stloc.s retValue + IL_00d2: br.s IL_011a + IL_00d4: ldstr "local1" + IL_00d9: ldloc.1 + IL_00da: ldc.i8 0xfedcba9876543210 + IL_00e3: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_00e8: brtrue.s IL_00ef + + IL_00ea: ldc.i4.1 + IL_00eb: stloc.s retValue + IL_00ed: br.s IL_011a + + IL_00ef: ldstr "local2" + IL_00f4: ldloc.2 + IL_00f5: ldc.i8 0xfedcba9876543211 + IL_00fe: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0103: brtrue.s IL_010a + + IL_0105: ldc.i4.1 + IL_0106: stloc.s retValue + IL_0108: br.s IL_011a + + IL_010a: ldstr "Passed\n" + IL_010f: call void [System.Console]System.Console::WriteLine(string) + IL_0114: ldc.i4.s 100 + IL_0116: stloc.s retValue + IL_0118: br.s IL_011a + + IL_011a: ldloc.s retValue + IL_011c: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} + + + diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_large.ilproj b/tests/src/JIT/jit64/localloc/eh/eh04_large.ilproj new file mode 100644 index 0000000000..ec171caa5b --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_large.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh04_large.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_small.il b/tests/src/JIT/jit64/localloc/eh/eh04_small.il new file mode 100644 index 0000000000..c6df9b7c8d --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_small.il @@ -0,0 +1,192 @@ + +.assembly extern System.Console +{ + .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) + .ver 4:0:0:0 +} +.assembly extern mscorlib{} +.assembly extern common{} +.assembly eh03{} + +.class private auto ansi beforefieldinit LocallocTest + extends [mscorlib]System.Object +{ + .field private static int32 locallocSize + .method public hidebysig static int32 Main() cil managed + { + .entrypoint + .maxstack 4 + .locals (bool testPassed, + unsigned int64 local1, + unsigned int64 local2, + int32* intArray1, + int32* intArray2, + int32 retValue) + IL_0000: ldc.i4.1 + IL_0001: stloc.0 + IL_0002: ldc.i8 0xfedcba9876543210 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldc.i4.1 + IL_000e: conv.i8 + IL_000f: add + IL_0010: stloc.2 + IL_0011: ldc.i4.4 + IL_0012: ldc.i4.1 + IL_0017: mul + IL_0018: localloc + IL_001a: stloc.3 + IL_001b: ldc.i4.4 + IL_001c: ldc.i4.1 + IL_0021: mul + IL_0022: localloc + IL_0024: stloc.s intArray2 + IL_0026: ldc.i4.1 + IL_002b: stsfld int32 LocallocTest::locallocSize + .try + { + .try + { + IL_0030: ldloc.3 + IL_0031: ldsfld int32 LocallocTest::locallocSize + IL_0036: ldc.i4 1000 + IL_003b: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0040: ldloc.s intArray2 + IL_0042: ldsfld int32 LocallocTest::locallocSize + IL_0047: ldc.i4 2000 + IL_004c: call void [common]LocallocTesting.Global::initializeStack(int32*, + int32, + int32) + IL_0051: ldstr "Test Exception" + IL_0056: newobj instance void [mscorlib]System.Exception::.ctor(string) + IL_005b: throw + + } + fault + { + ldstr "In fault" + call void [System.Console]System.Console::WriteLine(string) + IL_005c: ldstr "intArray1" + IL_0061: ldloc.3 + IL_0062: ldsfld int32 LocallocTest::locallocSize + IL_0067: ldc.i4 1000 + IL_006c: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_0071: brtrue.s IL_0075 + + IL_0073: ldc.i4.0 + IL_0074: stloc.0 + IL_0075: ldstr "intArray2" + IL_007a: ldloc.s intArray2 + IL_007c: ldsfld int32 LocallocTest::locallocSize + IL_0081: ldc.i4 2000 + IL_0086: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_008b: brtrue.s IL_008f + + IL_008d: ldc.i4.0 + IL_008e: stloc.0 + IL_008f: endfault + } + } + catch [mscorlib]System.Object + { + IL_0090: pop + IL_0091: leave.s IL_0093 + + } + IL_0093: ldloc.0 + IL_0094: brtrue.s IL_009b + + IL_0096: ldc.i4.1 + IL_0097: stloc.s retValue + IL_0099: br.s IL_011a + IL_009b: ldstr "intArray1" + IL_00a0: ldloc.3 + IL_00a1: ldsfld int32 LocallocTest::locallocSize + IL_00a6: ldc.i4 1000 + IL_00ab: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00b0: brtrue.s IL_00b7 + + IL_00b2: ldc.i4.1 + IL_00b3: stloc.s retValue + IL_00b5: br.s IL_011a + + IL_00b7: ldstr "intArray2" + IL_00bc: ldloc.s intArray2 + IL_00be: ldsfld int32 LocallocTest::locallocSize + IL_00c3: ldc.i4 2000 + IL_00c8: call bool [common]LocallocTesting.Global::verifyStack(string, + int32*, + int32, + int32) + IL_00cd: brtrue.s IL_00d4 + + IL_00cf: ldc.i4.1 + IL_00d0: stloc.s retValue + IL_00d2: br.s IL_011a + IL_00d4: ldstr "local1" + IL_00d9: ldloc.1 + IL_00da: ldc.i8 0xfedcba9876543210 + IL_00e3: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_00e8: brtrue.s IL_00ef + + IL_00ea: ldc.i4.1 + IL_00eb: stloc.s retValue + IL_00ed: br.s IL_011a + + IL_00ef: ldstr "local2" + IL_00f4: ldloc.2 + IL_00f5: ldc.i8 0xfedcba9876543211 + IL_00fe: call bool [common]LocallocTesting.Global::verifyLocal(string, + unsigned int64, + unsigned int64) + IL_0103: brtrue.s IL_010a + + IL_0105: ldc.i4.1 + IL_0106: stloc.s retValue + IL_0108: br.s IL_011a + + IL_010a: ldstr "Passed\n" + IL_010f: call void [System.Console]System.Console::WriteLine(string) + IL_0114: ldc.i4.s 100 + IL_0116: stloc.s retValue + IL_0118: br.s IL_011a + + IL_011a: ldloc.s retValue + IL_011c: ret + } + + .method private hidebysig specialname rtspecialname static + void .cctor() cil managed + { + .maxstack 8 + IL_0000: ldc.i4.0 + IL_0001: stsfld int32 LocallocTest::locallocSize + IL_0006: 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 + } + +} + + + diff --git a/tests/src/JIT/jit64/localloc/eh/eh04_small.ilproj b/tests/src/JIT/jit64/localloc/eh/eh04_small.ilproj new file mode 100644 index 0000000000..a3672e86c4 --- /dev/null +++ b/tests/src/JIT/jit64/localloc/eh/eh04_small.ilproj @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <AssemblyName>$(MSBuildProjectName)</AssemblyName> + <SchemaVersion>2.0</SchemaVersion> + <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid> + <OutputType>Exe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <FileAlignment>512</FileAlignment> + <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> + <ReferencePath>$(ProgramFiles)\Common Files\microsoft shared\VSTT .0\UITestExtensionPackages</ReferencePath> + <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir> + <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp> + </PropertyGroup> + <!-- Default configurations to help VS understand the configurations --> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + </PropertyGroup> + <ItemGroup> + <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies"> + <Visible>False</Visible> + </CodeAnalysisDependentAssemblyPaths> + </ItemGroup> + <PropertyGroup> + </PropertyGroup> + <ItemGroup> + <Compile Include="eh04_small.il" /> + </ItemGroup> + <ItemGroup> + <None Include="app.config" /> + </ItemGroup> + <ItemGroup> + <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\common\common.ilproj" /> + </ItemGroup> + <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" /> + <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "> + </PropertyGroup> +</Project> |