summaryrefslogtreecommitdiff
path: root/tests/src/JIT/jit64/localloc/call
diff options
context:
space:
mode:
Diffstat (limited to 'tests/src/JIT/jit64/localloc/call')
-rw-r--r--tests/src/JIT/jit64/localloc/call/app.config27
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_dynamic.il223
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_dynamic.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_large.il223
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_large.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_small.il224
-rw-r--r--tests/src/JIT/jit64/localloc/call/call03_small.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_dynamic.il242
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_dynamic.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_large.il242
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_large.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_small.il260
-rw-r--r--tests/src/JIT/jit64/localloc/call/call04_small.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_dynamic.il242
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_dynamic.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_large.il241
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_large.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_small.il243
-rw-r--r--tests/src/JIT/jit64/localloc/call/call05_small.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_dynamic.il287
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_dynamic.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_large.il287
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_large.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_small.il287
-rw-r--r--tests/src/JIT/jit64/localloc/call/call06_small.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call07_dynamic.il451
-rw-r--r--tests/src/JIT/jit64/localloc/call/call07_dynamic.ilproj45
-rw-r--r--tests/src/JIT/jit64/localloc/call/call07_small.il451
-rw-r--r--tests/src/JIT/jit64/localloc/call/call07_small.ilproj45
29 files changed, 4560 insertions, 0 deletions
diff --git a/tests/src/JIT/jit64/localloc/call/app.config b/tests/src/JIT/jit64/localloc/call/app.config
new file mode 100644
index 0000000000..6f7bbd9d2b
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/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/call/call03_dynamic.il b/tests/src/JIT/jit64/localloc/call/call03_dynamic.il
new file mode 100644
index 0000000000..80999370d7
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_dynamic.il
@@ -0,0 +1,223 @@
+// Tail call version of call01 test.
+
+.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 call01_SMALL {}
+.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 10
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+ IL_001b: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ ldstr "local1"
+ ldloc.0
+ ldc.i8 0xfedcba9876543210
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s L_Verify1
+
+ ldc.i4.1
+ br.s L_End
+ L_Verify1:
+ ldstr "local2"
+ ldloc.1
+ ldc.i8 0xfedcba9876543211
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s IL_0041
+
+ ldc.i4.1
+ br.s L_End
+
+ IL_0041: ldc.i4.1
+ IL_0042: ldc.i4.2
+ IL_0043: ldc.i4.3
+ IL_0044: ldc.i4.4
+ IL_0045: ldc.i4.5
+ IL_0046: ldc.i4.6
+ IL_0047: ldc.i4.7
+ IL_0048: ldc.i4.8
+ IL_0049: ldloc.2
+ IL_004a: ldloc.3
+ IL_004b: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ L_End: ret
+ }
+
+ .method private hidebysig static int32 func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 RetValue)
+ IL_0000: ldc.i4.4
+ IL_0001: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 0x3e8
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s L_Verify1
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s IL_009e
+
+ L_Verify1: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 0x7d0
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s L_Verify2
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s IL_009e
+
+ L_Verify2: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 0xbb8
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s L_Verify3
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s IL_009e
+
+ L_Verify3: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 0xfa0
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_Passed
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s IL_009e
+
+ L_Passed: ldstr "Passed\n"
+ call void [System.Console]System.Console::WriteLine(string)
+ ldc.i4.s 100
+ IL_009b: stloc.2
+ IL_009c: br.s IL_009e
+
+ IL_009e: ldloc.2
+ IL_009f: 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/call/call03_dynamic.ilproj b/tests/src/JIT/jit64/localloc/call/call03_dynamic.ilproj
new file mode 100644
index 0000000000..dffc4897f6
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_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="call03_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/call/call03_large.il b/tests/src/JIT/jit64/localloc/call/call03_large.il
new file mode 100644
index 0000000000..79dfbe48d0
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_large.il
@@ -0,0 +1,223 @@
+// Tail call version of call01 test.
+
+.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 call01_SMALL {}
+.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 10
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4 0x1000
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4 0x1000
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+ IL_001b: ldc.i4 0x1000
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ ldstr "local1"
+ ldloc.0
+ ldc.i8 0xfedcba9876543210
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s L_Verify1
+
+ ldc.i4.1
+ br.s L_End
+ L_Verify1:
+ ldstr "local2"
+ ldloc.1
+ ldc.i8 0xfedcba9876543211
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s IL_0041
+
+ ldc.i4.1
+ br.s L_End
+
+ IL_0041: ldc.i4.1
+ IL_0042: ldc.i4.2
+ IL_0043: ldc.i4.3
+ IL_0044: ldc.i4.4
+ IL_0045: ldc.i4.5
+ IL_0046: ldc.i4.6
+ IL_0047: ldc.i4.7
+ IL_0048: ldc.i4.8
+ IL_0049: ldloc.2
+ IL_004a: ldloc.3
+ IL_004b: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ L_End: ret
+ }
+
+ .method private hidebysig static int32 func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 RetValue)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4 0x1000
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4 0x1000
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 0x3e8
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s L_Verify1
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s IL_009e
+
+ L_Verify1: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 0x7d0
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s L_Verify2
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s IL_009e
+
+ L_Verify2: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 0xbb8
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s L_Verify3
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s IL_009e
+
+ L_Verify3: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 0xfa0
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_Passed
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s IL_009e
+
+ L_Passed: ldstr "Passed\n"
+ call void [System.Console]System.Console::WriteLine(string)
+ ldc.i4.s 100
+ IL_009b: stloc.2
+ IL_009c: br.s IL_009e
+
+ IL_009e: ldloc.2
+ IL_009f: 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/call/call03_large.ilproj b/tests/src/JIT/jit64/localloc/call/call03_large.ilproj
new file mode 100644
index 0000000000..341198656d
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_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="call03_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/call/call03_small.il b/tests/src/JIT/jit64/localloc/call/call03_small.il
new file mode 100644
index 0000000000..e419804a74
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_small.il
@@ -0,0 +1,224 @@
+// Tail call version of call01 test.
+
+
+.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 call01_SMALL {}
+.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 10
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4.1
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+ IL_001b: ldc.i4.1
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ ldstr "local1"
+ ldloc.0
+ ldc.i8 0xfedcba9876543210
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s L_Verify1
+
+ ldc.i4.1
+ br.s L_End
+ L_Verify1:
+ ldstr "local2"
+ ldloc.1
+ ldc.i8 0xfedcba9876543211
+ call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ brtrue.s IL_0041
+
+ ldc.i4.1
+ br.s L_End
+
+ IL_0041: ldc.i4.1
+ IL_0042: ldc.i4.2
+ IL_0043: ldc.i4.3
+ IL_0044: ldc.i4.4
+ IL_0045: ldc.i4.5
+ IL_0046: ldc.i4.6
+ IL_0047: ldc.i4.7
+ IL_0048: ldc.i4.8
+ IL_0049: ldloc.2
+ IL_004a: ldloc.3
+ IL_004b: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ L_End: ret
+ }
+
+ .method private hidebysig static int32 func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 RetValue)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4.1
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4.1
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 0x3e8
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s L_Verify1
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s IL_009e
+
+ L_Verify1: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 0x7d0
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s L_Verify2
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s IL_009e
+
+ L_Verify2: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 0xbb8
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s L_Verify3
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s IL_009e
+
+ L_Verify3: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 0xfa0
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_Passed
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s IL_009e
+
+ L_Passed: ldstr "Passed\n"
+ call void [System.Console]System.Console::WriteLine(string)
+ ldc.i4.s 100
+ IL_009b: stloc.2
+ IL_009c: br.s IL_009e
+
+ IL_009e: ldloc.2
+ IL_009f: 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/call/call03_small.ilproj b/tests/src/JIT/jit64/localloc/call/call03_small.ilproj
new file mode 100644
index 0000000000..46f88cb0b7
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call03_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="call03_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/call/call04_dynamic.il b/tests/src/JIT/jit64/localloc/call/call04_dynamic.il
new file mode 100644
index 0000000000..266b49e93d
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_dynamic.il
@@ -0,0 +1,242 @@
+// tail call version of call02.
+
+
+.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 call02 {}
+
+.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 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ class [common]LocallocTesting.TestClass obj)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+ IL_001b: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ IL_0041: ldc.i4 9999
+ IL_0046: conv.i8
+ IL_0047: newobj instance void [common]LocallocTesting.TestClass::.ctor(int64)
+ IL_004c: stloc.s obj
+
+ IL_004e: ldc.i4.1
+ IL_004f: ldc.i4.2
+ IL_0050: ldc.i4.3
+ IL_0051: ldc.i4.4
+ IL_0052: ldc.i4.5
+ IL_0053: ldc.i4.6
+ IL_0054: ldc.i4.7
+ IL_0055: ldc.i4.8
+ IL_0056: ldloc.2
+ IL_0057: ldloc.s obj
+ IL_0059: ldloc.3
+ IL_005a: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ class [common]LocallocTesting.TestClass,
+ int32*)
+
+ IL_0065: ret
+ }
+
+ .method private hidebysig static int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ class [common]LocallocTesting.TestClass obj,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+
+ ldc.i4.4
+ IL_0078: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0079: mul
+ IL_007a: localloc
+ IL_007c: stloc.s intArray1
+ IL_007e: ldc.i4.4
+ IL_007f: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0080: mul
+ IL_0081: localloc
+ IL_0083: stloc.s intArray2
+
+ IL_0085: ldloc.s intArray1
+ IL_0087: ldsfld int32 LocallocTest::locallocSize
+ IL_008c: ldc.i4 3000
+ IL_0091: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0096: ldloc.s intArray2
+ IL_0098: ldsfld int32 LocallocTest::locallocSize
+ IL_009d: ldc.i4 4000
+ IL_00a2: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0036: ldarg.s obj
+ IL_0037: callvirt instance bool [common]LocallocTesting.TestClass::ForceGC()
+ IL_003c: brtrue.s L_Forced
+ IL_003d: ldstr "Failed to force GC!"
+ IL_0042: call void [System.Console]System.Console::WriteLine(string)
+ IL_004e: ldc.i4.1
+ IL_004f: stloc.s retValue
+ IL_0051: br L_END
+
+ L_Forced: ldarg.s obj
+ IL_00a9: ldfld int64 [common]LocallocTesting.TestClass::id
+ IL_00ae: ldc.i4 0x270f
+ IL_00b3: conv.i8
+ IL_00b4: beq.s L_Verify1
+
+ IL_00b6: ldstr "obj.id is corrupted."
+ IL_00bb: call void [System.Console]System.Console::WriteLine(string)
+ IL_00c0: ldc.i4.1
+ IL_00c1: stloc.s retValue
+ IL_00c3: br L_END
+
+ L_Verify1: ldstr "ar1"
+ IL_00cd: ldarg.s ar1
+ IL_00cf: ldsfld int32 LocallocTest::locallocSize
+ IL_00d4: ldc.i4 1000
+ IL_00d9: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00de: brtrue.s L_Verify2
+
+ IL_00e0: ldc.i4.1
+ IL_00e1: stloc.s retValue
+ IL_00e3: br.s L_END
+
+ L_Verify2: ldstr "ar2"
+ IL_00ea: ldarg.s ar2
+ IL_00ec: ldsfld int32 LocallocTest::locallocSize
+ IL_00f1: ldc.i4 2000
+ IL_00f6: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00fb: brtrue.s L_Verify3
+
+ IL_00fd: ldc.i4.1
+ IL_00fe: stloc.s retValue
+ IL_0100: br.s L_END
+
+ L_Verify3: ldstr "intArray1"
+ IL_0107: ldloc.s intArray1
+ IL_0109: ldsfld int32 LocallocTest::locallocSize
+ IL_010e: ldc.i4 3000
+ IL_0113: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0118: brtrue.s L_Verify4
+
+ IL_011a: ldc.i4.1
+ IL_011b: stloc.s retValue
+ IL_011d: br.s L_END
+
+ L_Verify4: ldstr "intArray2"
+ IL_0124: ldloc.s intArray2
+ IL_0126: ldsfld int32 LocallocTest::locallocSize
+ IL_012b: ldc.i4 4000
+ IL_0130: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0135: brtrue.s L_Passed
+
+ IL_0137: ldc.i4.1
+ IL_0138: stloc.s retValue
+ IL_013a: br.s L_END
+
+ L_Passed: ldstr "Passed"
+ IL_0141: call void [System.Console]System.Console::WriteLine(string)
+ IL_0146: ldc.i4.s 100
+ IL_0148: stloc.s retValue
+ IL_014a: br.s L_END
+
+ L_END: 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/call/call04_dynamic.ilproj b/tests/src/JIT/jit64/localloc/call/call04_dynamic.ilproj
new file mode 100644
index 0000000000..fdca5bdcc8
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_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="call04_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/call/call04_large.il b/tests/src/JIT/jit64/localloc/call/call04_large.il
new file mode 100644
index 0000000000..da3541d820
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_large.il
@@ -0,0 +1,242 @@
+// tail call version of call02.
+
+
+.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 call02 {}
+
+.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 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ class [common]LocallocTesting.TestClass obj)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4 0x1000
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4 0x1000
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+ IL_001b: ldc.i4 0x1000
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ IL_0041: ldc.i4 9999
+ IL_0046: conv.i8
+ IL_0047: newobj instance void [common]LocallocTesting.TestClass::.ctor(int64)
+ IL_004c: stloc.s obj
+
+ IL_004e: ldc.i4.1
+ IL_004f: ldc.i4.2
+ IL_0050: ldc.i4.3
+ IL_0051: ldc.i4.4
+ IL_0052: ldc.i4.5
+ IL_0053: ldc.i4.6
+ IL_0054: ldc.i4.7
+ IL_0055: ldc.i4.8
+ IL_0056: ldloc.2
+ IL_0057: ldloc.s obj
+ IL_0059: ldloc.3
+ IL_005a: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ class [common]LocallocTesting.TestClass,
+ int32*)
+
+ IL_0065: ret
+ }
+
+ .method private hidebysig static int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ class [common]LocallocTesting.TestClass obj,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+
+ ldc.i4.4
+ IL_0078: ldc.i4 0x1000
+ IL_0079: mul
+ IL_007a: localloc
+ IL_007c: stloc.s intArray1
+ IL_007e: ldc.i4.4
+ IL_007f: ldc.i4 0x1000
+ IL_0080: mul
+ IL_0081: localloc
+ IL_0083: stloc.s intArray2
+
+ IL_0085: ldloc.s intArray1
+ IL_0087: ldsfld int32 LocallocTest::locallocSize
+ IL_008c: ldc.i4 3000
+ IL_0091: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0096: ldloc.s intArray2
+ IL_0098: ldsfld int32 LocallocTest::locallocSize
+ IL_009d: ldc.i4 4000
+ IL_00a2: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0036: ldarg.s obj
+ IL_0037: callvirt instance bool [common]LocallocTesting.TestClass::ForceGC()
+ IL_003c: brtrue.s L_Forced
+ IL_003d: ldstr "Failed to force GC!"
+ IL_0042: call void [System.Console]System.Console::WriteLine(string)
+ IL_004e: ldc.i4.1
+ IL_004f: stloc.s retValue
+ IL_0051: br L_END
+
+ L_Forced: ldarg.s obj
+ IL_00a9: ldfld int64 [common]LocallocTesting.TestClass::id
+ IL_00ae: ldc.i4 0x270f
+ IL_00b3: conv.i8
+ IL_00b4: beq.s L_Verify1
+
+ IL_00b6: ldstr "obj.id is corrupted."
+ IL_00bb: call void [System.Console]System.Console::WriteLine(string)
+ IL_00c0: ldc.i4.1
+ IL_00c1: stloc.s retValue
+ IL_00c3: br L_END
+
+ L_Verify1: ldstr "ar1"
+ IL_00cd: ldarg.s ar1
+ IL_00cf: ldsfld int32 LocallocTest::locallocSize
+ IL_00d4: ldc.i4 1000
+ IL_00d9: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00de: brtrue.s L_Verify2
+
+ IL_00e0: ldc.i4.1
+ IL_00e1: stloc.s retValue
+ IL_00e3: br.s L_END
+
+ L_Verify2: ldstr "ar2"
+ IL_00ea: ldarg.s ar2
+ IL_00ec: ldsfld int32 LocallocTest::locallocSize
+ IL_00f1: ldc.i4 2000
+ IL_00f6: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00fb: brtrue.s L_Verify3
+
+ IL_00fd: ldc.i4.1
+ IL_00fe: stloc.s retValue
+ IL_0100: br.s L_END
+
+ L_Verify3: ldstr "intArray1"
+ IL_0107: ldloc.s intArray1
+ IL_0109: ldsfld int32 LocallocTest::locallocSize
+ IL_010e: ldc.i4 3000
+ IL_0113: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0118: brtrue.s L_Verify4
+
+ IL_011a: ldc.i4.1
+ IL_011b: stloc.s retValue
+ IL_011d: br.s L_END
+
+ L_Verify4: ldstr "intArray2"
+ IL_0124: ldloc.s intArray2
+ IL_0126: ldsfld int32 LocallocTest::locallocSize
+ IL_012b: ldc.i4 4000
+ IL_0130: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0135: brtrue.s L_Passed
+
+ IL_0137: ldc.i4.1
+ IL_0138: stloc.s retValue
+ IL_013a: br.s L_END
+
+ L_Passed: ldstr "Passed"
+ IL_0141: call void [System.Console]System.Console::WriteLine(string)
+ IL_0146: ldc.i4.s 100
+ IL_0148: stloc.s retValue
+ IL_014a: br.s L_END
+
+ L_END: 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/call/call04_large.ilproj b/tests/src/JIT/jit64/localloc/call/call04_large.ilproj
new file mode 100644
index 0000000000..a7c0134d3f
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_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="call04_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/call/call04_small.il b/tests/src/JIT/jit64/localloc/call/call04_small.il
new file mode 100644
index 0000000000..e13764d7ba
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_small.il
@@ -0,0 +1,260 @@
+// tail call version of call02.
+
+
+.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 call02 {}
+
+.class private auto ansi beforefieldinit LocallocTest
+ extends [mscorlib]System.Object
+{
+ .field private static int32 locallocSize
+ .method public hidebysig static int32 Main() cil managed
+ {
+ .entrypoint
+ // Code size 102 (0x66)
+ .maxstack 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ class [common]LocallocTesting.TestClass obj)
+// Initialize local variable
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+// localloc for intArrayXX
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4.1
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+
+// Set size localloc
+ IL_001b: ldc.i4.1
+ IL_001c: stsfld int32 LocallocTest::locallocSize
+
+// Initialize intArrayXX
+ IL_0021: ldloc.2
+ IL_0022: ldsfld int32 LocallocTest::locallocSize
+ IL_0027: ldc.i4 1000
+ IL_002c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0031: ldloc.3
+ IL_0032: ldsfld int32 LocallocTest::locallocSize
+ IL_0037: ldc.i4 2000
+ IL_003c: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+// allocate 'obj' which is one of param
+ IL_0041: ldc.i4 9999
+ IL_0046: conv.i8
+ IL_0047: newobj instance void [common]LocallocTesting.TestClass::.ctor(int64)
+ IL_004c: stloc.s obj
+
+// Invoke func1
+ IL_004e: ldc.i4.1
+ IL_004f: ldc.i4.2
+ IL_0050: ldc.i4.3
+ IL_0051: ldc.i4.4
+ IL_0052: ldc.i4.5
+ IL_0053: ldc.i4.6
+ IL_0054: ldc.i4.7
+ IL_0055: ldc.i4.8
+ IL_0056: ldloc.2
+ IL_0057: ldloc.s obj
+ IL_0059: ldloc.3
+ IL_005a: tail. call int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ class [common]LocallocTesting.TestClass,
+ int32*)
+
+ IL_0065: ret
+ } // end of method LocallocTest::Main
+
+ .method private hidebysig static int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ class [common]LocallocTesting.TestClass obj,
+ int32* ar2) cil managed
+ {
+ // Code size 335 (0x14f)
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+
+// allocate intArrayXX
+ ldc.i4.4
+ IL_0078: ldc.i4.1
+ IL_0079: mul
+ IL_007a: localloc
+ IL_007c: stloc.s intArray1
+ IL_007e: ldc.i4.4
+ IL_007f: ldc.i4.1
+ IL_0080: mul
+ IL_0081: localloc
+ IL_0083: stloc.s intArray2
+
+// Initialize intArrayXX
+ IL_0085: ldloc.s intArray1
+ IL_0087: ldsfld int32 LocallocTest::locallocSize
+ IL_008c: ldc.i4 3000
+ IL_0091: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0096: ldloc.s intArray2
+ IL_0098: ldsfld int32 LocallocTest::locallocSize
+ IL_009d: ldc.i4 4000
+ IL_00a2: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+// Force GC
+ IL_0036: ldarg.s obj
+ IL_0037: callvirt instance bool [common]LocallocTesting.TestClass::ForceGC()
+ IL_003c: brtrue.s L_Forced
+ IL_003d: ldstr "Failed to force GC!"
+ IL_0042: call void [System.Console]System.Console::WriteLine(string)
+ IL_004e: ldc.i4.1
+ IL_004f: stloc.s retValue
+ IL_0051: br L_END
+
+// Check if obj is corrupted
+ L_Forced: ldarg.s obj
+ IL_00a9: ldfld int64 [common]LocallocTesting.TestClass::id
+ IL_00ae: ldc.i4 0x270f
+ IL_00b3: conv.i8
+ IL_00b4: beq.s L_Verify1
+
+ IL_00b6: ldstr "obj.id is corrupted."
+ IL_00bb: call void [System.Console]System.Console::WriteLine(string)
+ IL_00c0: ldc.i4.1
+ IL_00c1: stloc.s retValue
+ IL_00c3: br L_END
+
+// Verify arrays.
+ L_Verify1: ldstr "ar1"
+ IL_00cd: ldarg.s ar1
+ IL_00cf: ldsfld int32 LocallocTest::locallocSize
+ IL_00d4: ldc.i4 1000
+ IL_00d9: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00de: brtrue.s L_Verify2
+
+ IL_00e0: ldc.i4.1
+ IL_00e1: stloc.s retValue
+ IL_00e3: br.s L_END
+
+ L_Verify2: ldstr "ar2"
+ IL_00ea: ldarg.s ar2
+ IL_00ec: ldsfld int32 LocallocTest::locallocSize
+ IL_00f1: ldc.i4 2000
+ IL_00f6: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00fb: brtrue.s L_Verify3
+
+ IL_00fd: ldc.i4.1
+ IL_00fe: stloc.s retValue
+ IL_0100: br.s L_END
+
+ L_Verify3: ldstr "intArray1"
+ IL_0107: ldloc.s intArray1
+ IL_0109: ldsfld int32 LocallocTest::locallocSize
+ IL_010e: ldc.i4 3000
+ IL_0113: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0118: brtrue.s L_Verify4
+
+ IL_011a: ldc.i4.1
+ IL_011b: stloc.s retValue
+ IL_011d: br.s L_END
+
+ L_Verify4: ldstr "intArray2"
+ IL_0124: ldloc.s intArray2
+ IL_0126: ldsfld int32 LocallocTest::locallocSize
+ IL_012b: ldc.i4 4000
+ IL_0130: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0135: brtrue.s L_Passed
+
+ IL_0137: ldc.i4.1
+ IL_0138: stloc.s retValue
+ IL_013a: br.s L_END
+
+ L_Passed: ldstr "Passed"
+ IL_0141: call void [System.Console]System.Console::WriteLine(string)
+ IL_0146: ldc.i4.s 100
+ IL_0148: stloc.s retValue
+ IL_014a: br.s L_END
+
+ L_END: ldloc.s retValue
+ IL_014e: ret
+ } // end of method LocallocTest::func1
+
+ .method private hidebysig specialname rtspecialname static
+ void .cctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldc.i4.0
+ IL_0001: stsfld int32 LocallocTest::locallocSize
+ IL_0006: ret
+ } // end of method LocallocTest::.cctor
+
+ .method public hidebysig specialname rtspecialname
+ instance void .ctor() cil managed
+ {
+ // Code size 7 (0x7)
+ .maxstack 8
+ IL_0000: ldarg.0
+ IL_0001: call instance void [mscorlib]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method LocallocTest::.ctor
+
+} // end of class LocallocTest
+
+
+// =============================================================
+
+//*********** DISASSEMBLY COMPLETE ***********************
+// WARNING: Created Win32 resource file call04_small.res
diff --git a/tests/src/JIT/jit64/localloc/call/call04_small.ilproj b/tests/src/JIT/jit64/localloc/call/call04_small.ilproj
new file mode 100644
index 0000000000..1fa45b4ca2
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call04_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="call04_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/call/call05_dynamic.il b/tests/src/JIT/jit64/localloc/call/call05_dynamic.il
new file mode 100644
index 0000000000..7568b1283e
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_dynamic.il
@@ -0,0 +1,242 @@
+
+
+.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 call05{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2,
+ int32 V_3)
+ IL_0000: ldc.i4.4
+ IL_0001: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+
+ IL_000c: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0048: stloc.3
+ IL_004b: ldloc.3
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_0043: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0055: stloc.2
+ IL_0058: ldc.i4.1
+ IL_0059: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 1000
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s IL_0048
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s L_END
+
+ IL_0048: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 2000
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s IL_0064
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s L_END
+
+ IL_0064: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 3000
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s IL_007f
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s L_END
+
+ IL_007f: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 4000
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_PASS
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s L_END
+
+ L_PASS: ldstr "Passed\n"
+ IL_009f: call void [System.Console]System.Console::WriteLine(string)
+ IL_00a4: ldc.i4.s 100
+ IL_00a6: stloc.2
+
+ L_END: ldloc.2
+ IL_00aa: 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/call/call05_dynamic.ilproj b/tests/src/JIT/jit64/localloc/call/call05_dynamic.ilproj
new file mode 100644
index 0000000000..41a55b120f
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_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="call05_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/call/call05_large.il b/tests/src/JIT/jit64/localloc/call/call05_large.il
new file mode 100644
index 0000000000..b93c28c39e
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_large.il
@@ -0,0 +1,241 @@
+
+.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 call05{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2,
+ int32 V_3)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4 0x1000
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4 0x1000
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+
+ IL_000c: ldc.i4 0x1000
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0048: stloc.3
+ IL_004b: ldloc.3
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_0043: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0055: stloc.2
+ IL_0058: ldc.i4.1
+ IL_0059: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4 0x1000
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4 0x1000
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 1000
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s IL_0048
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s L_END
+
+ IL_0048: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 2000
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s IL_0064
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s L_END
+
+ IL_0064: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 3000
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s IL_007f
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s L_END
+
+ IL_007f: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 4000
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_PASS
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s L_END
+
+ L_PASS: ldstr "Passed\n"
+ IL_009f: call void [System.Console]System.Console::WriteLine(string)
+ IL_00a4: ldc.i4.s 100
+ IL_00a6: stloc.2
+
+ L_END: ldloc.2
+ IL_00aa: 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/call/call05_large.ilproj b/tests/src/JIT/jit64/localloc/call/call05_large.ilproj
new file mode 100644
index 0000000000..91aa5427a5
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_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="call05_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/call/call05_small.il b/tests/src/JIT/jit64/localloc/call/call05_small.il
new file mode 100644
index 0000000000..a1b211c6bf
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_small.il
@@ -0,0 +1,243 @@
+// localloc test with jmp
+
+
+.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 call05{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2,
+ int32 V_3)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4.1
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4.1
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+
+ IL_000c: ldc.i4.1
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0048: stloc.3
+ IL_004b: ldloc.3
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+
+ IL_0043: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_0055: stloc.2
+ IL_0058: ldc.i4.1
+ IL_0059: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (int32* intArray1,
+ int32* intArray2,
+ int32 V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4.1
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4.1
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldloc.0
+ IL_000d: ldsfld int32 LocallocTest::locallocSize
+ IL_0012: ldc.i4 0xbb8
+ IL_0017: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_001c: ldloc.1
+ IL_001d: ldsfld int32 LocallocTest::locallocSize
+ IL_0022: ldc.i4 0xfa0
+ IL_0027: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002c: ldstr "ar1"
+ IL_0031: ldarg.s ar1
+ IL_0033: ldsfld int32 LocallocTest::locallocSize
+ IL_0038: ldc.i4 1000
+ IL_003d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0042: brtrue.s IL_0048
+
+ IL_0044: ldc.i4.1
+ IL_0045: stloc.2
+ IL_0046: br.s L_END
+
+ IL_0048: ldstr "ar2"
+ IL_004d: ldarg.s ar2
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 2000
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue.s IL_0064
+
+ IL_0060: ldc.i4.1
+ IL_0061: stloc.2
+ IL_0062: br.s L_END
+
+ IL_0064: ldstr "intArray1"
+ IL_0069: ldloc.0
+ IL_006a: ldsfld int32 LocallocTest::locallocSize
+ IL_006f: ldc.i4 3000
+ IL_0074: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0079: brtrue.s IL_007f
+
+ IL_007b: ldc.i4.1
+ IL_007c: stloc.2
+ IL_007d: br.s L_END
+
+ IL_007f: ldstr "intArray2"
+ IL_0084: ldloc.1
+ IL_0085: ldsfld int32 LocallocTest::locallocSize
+ IL_008a: ldc.i4 4000
+ IL_008f: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0094: brtrue.s L_PASS
+
+ IL_0096: ldc.i4.1
+ IL_0097: stloc.2
+ IL_0098: br.s L_END
+
+ L_PASS: ldstr "Passed\n"
+ IL_009f: call void [System.Console]System.Console::WriteLine(string)
+ IL_00a4: ldc.i4.s 100
+ IL_00a6: stloc.2
+
+ L_END: ldloc.2
+ IL_00aa: 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/call/call05_small.ilproj b/tests/src/JIT/jit64/localloc/call/call05_small.ilproj
new file mode 100644
index 0000000000..55714133c9
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call05_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="call05_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/call/call06_dynamic.il b/tests/src/JIT/jit64/localloc/call/call06_dynamic.il
new file mode 100644
index 0000000000..be5a6f75f7
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_dynamic.il
@@ -0,0 +1,287 @@
+// Test localloc with tail call followed by jump
+
+.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 call06{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: tail. callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (int32 retValue)
+ IL_0000: ldstr "ar1"
+ IL_0005: ldarg.s ar1
+ IL_0007: ldsfld int32 LocallocTest::locallocSize
+ IL_000c: ldc.i4 1000
+ IL_0011: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0016: brtrue.s IL_001c
+
+ IL_0018: ldc.i4.1
+ IL_0019: stloc.0
+ IL_001a: br.s L_END
+
+ IL_001c: ldstr "ar2"
+ IL_0021: ldarg.s ar2
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0032: brtrue.s L_JMP
+
+ IL_0034: ldc.i4.1
+ IL_0035: stloc.0
+ IL_0036: br.s L_END
+
+ L_JMP: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004a: stloc.0
+
+ L_END: ldc.i4.1
+ IL_004e: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+ IL_001b: ldloc.2
+ IL_001c: ldsfld int32 LocallocTest::locallocSize
+ IL_0021: ldc.i4 3000
+ IL_0026: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002b: ldloc.3
+ IL_002c: ldsfld int32 LocallocTest::locallocSize
+ IL_0031: ldc.i4 4000
+ IL_0036: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_003b: ldstr "local1"
+ IL_0040: ldloc.0
+ IL_0041: ldc.i8 0xfedcba9876543210
+ IL_004a: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_004f: brtrue.s IL_0059
+
+ IL_0051: ldc.i4.1
+ IL_0052: stloc.s retValue
+ IL_0054: br L_END
+
+ IL_0059: ldstr "local2"
+ IL_005e: ldloc.1
+ IL_005f: ldc.i8 0xfedcba9876543211
+ IL_0068: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_006d: brtrue.s IL_0077
+ IL_006f: ldc.i4.1
+ IL_0070: stloc.s retValue
+ IL_0072: br L_END
+
+ IL_0077: ldstr "ar1"
+ IL_007c: ldarg.s ar1
+ IL_007e: ldsfld int32 LocallocTest::locallocSize
+ IL_0083: ldc.i4 1000
+ IL_0088: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_008d: brtrue.s IL_0094
+
+ IL_008f: ldc.i4.1
+ IL_0090: stloc.s retValue
+ IL_0092: br.s L_END
+
+ IL_0094: ldstr "ar2"
+ IL_0099: ldarg.s ar2
+ IL_009b: ldsfld int32 LocallocTest::locallocSize
+ IL_00a0: ldc.i4 2000
+ IL_00a5: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00aa: brtrue.s IL_00b1
+
+ IL_00ac: ldc.i4.1
+ IL_00ad: stloc.s retValue
+ IL_00af: br.s L_END
+
+ IL_00b1: ldstr "intArray1"
+ IL_00b6: ldloc.2
+ IL_00b7: ldsfld int32 LocallocTest::locallocSize
+ IL_00bc: ldc.i4 3000
+ IL_00c1: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00c6: brtrue.s IL_00cd
+
+ IL_00c8: ldc.i4.1
+ IL_00c9: stloc.s retValue
+ IL_00cb: br.s L_END
+
+ IL_00cd: ldstr "intArray2"
+ IL_00d2: ldloc.3
+ IL_00d3: ldsfld int32 LocallocTest::locallocSize
+ IL_00d8: ldc.i4 4000
+ IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00e2: brtrue.s L_Passed
+
+ IL_00e4: ldc.i4.1
+ IL_00e5: stloc.s retValue
+ IL_00e7: br.s L_END
+
+ L_Passed: ldstr "Passed\n"
+ IL_00ee: call void [System.Console]System.Console::WriteLine(string)
+ IL_00f3: ldc.i4.s 100
+ IL_00f5: stloc.s retValue
+
+ L_END: ldloc.s retValue
+ IL_00fb: 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/call/call06_dynamic.ilproj b/tests/src/JIT/jit64/localloc/call/call06_dynamic.ilproj
new file mode 100644
index 0000000000..4c9fc0efe1
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_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="call06_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/call/call06_large.il b/tests/src/JIT/jit64/localloc/call/call06_large.il
new file mode 100644
index 0000000000..c454286f21
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_large.il
@@ -0,0 +1,287 @@
+// Test localloc with tail call followed by jump
+
+.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 call06{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4 0x1000
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4 0x1000
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldc.i4 0x1000
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: tail. callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (int32 retValue)
+ IL_0000: ldstr "ar1"
+ IL_0005: ldarg.s ar1
+ IL_0007: ldsfld int32 LocallocTest::locallocSize
+ IL_000c: ldc.i4 1000
+ IL_0011: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0016: brtrue.s IL_001c
+
+ IL_0018: ldc.i4.1
+ IL_0019: stloc.0
+ IL_001a: br.s L_END
+
+ IL_001c: ldstr "ar2"
+ IL_0021: ldarg.s ar2
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0032: brtrue.s L_JMP
+
+ IL_0034: ldc.i4.1
+ IL_0035: stloc.0
+ IL_0036: br.s L_END
+
+ L_JMP: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004a: stloc.0
+
+ L_END: ldc.i4.1
+ IL_004e: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4 0x1000
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4 0x1000
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+ IL_001b: ldloc.2
+ IL_001c: ldsfld int32 LocallocTest::locallocSize
+ IL_0021: ldc.i4 3000
+ IL_0026: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002b: ldloc.3
+ IL_002c: ldsfld int32 LocallocTest::locallocSize
+ IL_0031: ldc.i4 4000
+ IL_0036: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_003b: ldstr "local1"
+ IL_0040: ldloc.0
+ IL_0041: ldc.i8 0xfedcba9876543210
+ IL_004a: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_004f: brtrue.s IL_0059
+
+ IL_0051: ldc.i4.1
+ IL_0052: stloc.s retValue
+ IL_0054: br L_END
+
+ IL_0059: ldstr "local2"
+ IL_005e: ldloc.1
+ IL_005f: ldc.i8 0xfedcba9876543211
+ IL_0068: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_006d: brtrue.s IL_0077
+ IL_006f: ldc.i4.1
+ IL_0070: stloc.s retValue
+ IL_0072: br L_END
+
+ IL_0077: ldstr "ar1"
+ IL_007c: ldarg.s ar1
+ IL_007e: ldsfld int32 LocallocTest::locallocSize
+ IL_0083: ldc.i4 1000
+ IL_0088: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_008d: brtrue.s IL_0094
+
+ IL_008f: ldc.i4.1
+ IL_0090: stloc.s retValue
+ IL_0092: br.s L_END
+
+ IL_0094: ldstr "ar2"
+ IL_0099: ldarg.s ar2
+ IL_009b: ldsfld int32 LocallocTest::locallocSize
+ IL_00a0: ldc.i4 2000
+ IL_00a5: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00aa: brtrue.s IL_00b1
+
+ IL_00ac: ldc.i4.1
+ IL_00ad: stloc.s retValue
+ IL_00af: br.s L_END
+
+ IL_00b1: ldstr "intArray1"
+ IL_00b6: ldloc.2
+ IL_00b7: ldsfld int32 LocallocTest::locallocSize
+ IL_00bc: ldc.i4 3000
+ IL_00c1: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00c6: brtrue.s IL_00cd
+
+ IL_00c8: ldc.i4.1
+ IL_00c9: stloc.s retValue
+ IL_00cb: br.s L_END
+
+ IL_00cd: ldstr "intArray2"
+ IL_00d2: ldloc.3
+ IL_00d3: ldsfld int32 LocallocTest::locallocSize
+ IL_00d8: ldc.i4 4000
+ IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00e2: brtrue.s L_Passed
+
+ IL_00e4: ldc.i4.1
+ IL_00e5: stloc.s retValue
+ IL_00e7: br.s L_END
+
+ L_Passed: ldstr "Passed\n"
+ IL_00ee: call void [System.Console]System.Console::WriteLine(string)
+ IL_00f3: ldc.i4.s 100
+ IL_00f5: stloc.s retValue
+
+ L_END: ldloc.s retValue
+ IL_00fb: 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/call/call06_large.ilproj b/tests/src/JIT/jit64/localloc/call/call06_large.ilproj
new file mode 100644
index 0000000000..5579bce628
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_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="call06_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/call/call06_small.il b/tests/src/JIT/jit64/localloc/call/call06_small.il
new file mode 100644
index 0000000000..3acf909b7b
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_small.il
@@ -0,0 +1,287 @@
+// Test localloc with tail call followed by jump
+
+.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 call06{}
+
+.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 11
+ .locals (int32* intArray1,
+ int32* intArray2,
+ class LocallocTest V_2)
+ IL_0000: ldc.i4.4
+ IL_0001: ldc.i4.1
+ IL_0002: mul
+ IL_0003: localloc
+ IL_0005: stloc.0
+ IL_0006: ldc.i4.4
+ IL_0007: ldc.i4.1
+ IL_0008: mul
+ IL_0009: localloc
+ IL_000b: stloc.1
+ IL_000c: ldc.i4.1
+ IL_000d: stsfld int32 LocallocTest::locallocSize
+ IL_0012: ldloc.0
+ IL_0013: ldsfld int32 LocallocTest::locallocSize
+ IL_0018: ldc.i4 1000
+ IL_001d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0022: ldloc.1
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0032: newobj instance void LocallocTest::.ctor()
+ IL_0037: stloc.2
+ IL_0038: ldloc.2
+ IL_0039: ldc.i4.1
+ IL_003a: ldc.i4.2
+ IL_003b: ldc.i4.3
+ IL_003c: ldc.i4.4
+ IL_003d: ldc.i4.5
+ IL_003e: ldc.i4.6
+ IL_003f: ldc.i4.7
+ IL_0040: ldc.i4.8
+ IL_0041: ldloc.0
+ IL_0042: ldloc.1
+ IL_0043: tail. callvirt instance int32 LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004c: ret
+ }
+
+ .method private hidebysig instance int32
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 11
+ .locals (int32 retValue)
+ IL_0000: ldstr "ar1"
+ IL_0005: ldarg.s ar1
+ IL_0007: ldsfld int32 LocallocTest::locallocSize
+ IL_000c: ldc.i4 1000
+ IL_0011: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0016: brtrue.s IL_001c
+
+ IL_0018: ldc.i4.1
+ IL_0019: stloc.0
+ IL_001a: br.s L_END
+
+ IL_001c: ldstr "ar2"
+ IL_0021: ldarg.s ar2
+ IL_0023: ldsfld int32 LocallocTest::locallocSize
+ IL_0028: ldc.i4 2000
+ IL_002d: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0032: brtrue.s L_JMP
+
+ IL_0034: ldc.i4.1
+ IL_0035: stloc.0
+ IL_0036: br.s L_END
+
+ L_JMP: jmp instance int32 LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*,
+ int32*)
+ IL_004a: stloc.0
+
+ L_END: ldc.i4.1
+ IL_004e: ret
+ }
+
+ .method private hidebysig instance int32
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* intArray1,
+ int32* intArray2,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0011: mul
+ IL_0012: localloc
+ IL_0014: stloc.2
+ IL_0015: ldc.i4.4
+ IL_0016: ldc.i4.1
+ IL_0017: mul
+ IL_0018: localloc
+ IL_001a: stloc.3
+ IL_001b: ldloc.2
+ IL_001c: ldsfld int32 LocallocTest::locallocSize
+ IL_0021: ldc.i4 3000
+ IL_0026: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002b: ldloc.3
+ IL_002c: ldsfld int32 LocallocTest::locallocSize
+ IL_0031: ldc.i4 4000
+ IL_0036: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_003b: ldstr "local1"
+ IL_0040: ldloc.0
+ IL_0041: ldc.i8 0xfedcba9876543210
+ IL_004a: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_004f: brtrue.s IL_0059
+
+ IL_0051: ldc.i4.1
+ IL_0052: stloc.s retValue
+ IL_0054: br L_END
+
+ IL_0059: ldstr "local2"
+ IL_005e: ldloc.1
+ IL_005f: ldc.i8 0xfedcba9876543211
+ IL_0068: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_006d: brtrue.s IL_0077
+ IL_006f: ldc.i4.1
+ IL_0070: stloc.s retValue
+ IL_0072: br L_END
+
+ IL_0077: ldstr "ar1"
+ IL_007c: ldarg.s ar1
+ IL_007e: ldsfld int32 LocallocTest::locallocSize
+ IL_0083: ldc.i4 1000
+ IL_0088: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_008d: brtrue.s IL_0094
+
+ IL_008f: ldc.i4.1
+ IL_0090: stloc.s retValue
+ IL_0092: br.s L_END
+
+ IL_0094: ldstr "ar2"
+ IL_0099: ldarg.s ar2
+ IL_009b: ldsfld int32 LocallocTest::locallocSize
+ IL_00a0: ldc.i4 2000
+ IL_00a5: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00aa: brtrue.s IL_00b1
+
+ IL_00ac: ldc.i4.1
+ IL_00ad: stloc.s retValue
+ IL_00af: br.s L_END
+
+ IL_00b1: ldstr "intArray1"
+ IL_00b6: ldloc.2
+ IL_00b7: ldsfld int32 LocallocTest::locallocSize
+ IL_00bc: ldc.i4 3000
+ IL_00c1: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00c6: brtrue.s IL_00cd
+
+ IL_00c8: ldc.i4.1
+ IL_00c9: stloc.s retValue
+ IL_00cb: br.s L_END
+
+ IL_00cd: ldstr "intArray2"
+ IL_00d2: ldloc.3
+ IL_00d3: ldsfld int32 LocallocTest::locallocSize
+ IL_00d8: ldc.i4 4000
+ IL_00dd: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00e2: brtrue.s L_Passed
+
+ IL_00e4: ldc.i4.1
+ IL_00e5: stloc.s retValue
+ IL_00e7: br.s L_END
+
+ L_Passed: ldstr "Passed\n"
+ IL_00ee: call void [System.Console]System.Console::WriteLine(string)
+ IL_00f3: ldc.i4.s 100
+ IL_00f5: stloc.s retValue
+
+ L_END: ldloc.s retValue
+ IL_00fb: 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/call/call06_small.ilproj b/tests/src/JIT/jit64/localloc/call/call06_small.ilproj
new file mode 100644
index 0000000000..7b711432d4
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call06_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="call06_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/call/call07_dynamic.il b/tests/src/JIT/jit64/localloc/call/call07_dynamic.il
new file mode 100644
index 0000000000..32fb99b309
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call07_dynamic.il
@@ -0,0 +1,451 @@
+// Test localloc with jump followed by tail call.
+
+.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 call07{}
+
+.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 10
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar1,
+ class LocallocTest V_3,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_001e: stsfld int32 LocallocTest::locallocSize
+ IL_0023: ldloc.2
+ IL_0024: ldsfld int32 LocallocTest::locallocSize
+ IL_0029: ldc.i4 1000
+ IL_002e: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0033: newobj instance void LocallocTest::.ctor()
+ IL_0038: stloc.3
+ IL_0039: ldloc.3
+ IL_003a: ldc.i4.1
+ IL_003b: ldc.i4.2
+ IL_003c: ldc.i4.3
+ IL_003d: ldc.i4.4
+ IL_003e: ldc.i4.5
+ IL_003f: ldc.i4.6
+ IL_0040: ldc.i4.7
+ IL_0041: ldc.i4.8
+ IL_0042: ldloc.2
+ IL_0043: callvirt instance bool LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*)
+ IL_0048: brtrue.s IL_004f
+
+ IL_004a: ldc.i4.1
+ IL_004b: stloc.s retValue
+ IL_004d: br.s L_END
+
+ IL_004f: ldstr "local1"
+ IL_0054: ldloc.0
+ IL_0055: ldc.i8 0xfedcba9876543210
+ IL_005e: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0063: brtrue.s IL_006a
+
+ IL_0065: ldc.i4.1
+ IL_0066: stloc.s retValue
+ IL_0068: br.s L_END
+
+ IL_006a: ldstr "local2"
+ IL_006f: ldloc.1
+ IL_0070: ldc.i8 0xfedcba9876543211
+ IL_0079: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_007e: brtrue.s IL_0085
+
+ IL_0080: ldc.i4.1
+ IL_0081: stloc.s retValue
+ IL_0083: br.s L_END
+
+ IL_0085: ldstr "Passed\n"
+ IL_008a: call void [System.Console]System.Console::WriteLine(string)
+ IL_008f: ldc.i4.s 100
+ IL_0091: stloc.s retValue
+ IL_0093: br.s L_END
+
+ L_END: ldloc.s retValue
+ IL_0097: ret
+ }
+
+ .method private hidebysig instance bool
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1) cil managed
+ {
+ .maxstack 10
+ .locals (bool retValue)
+ IL_0000: ldstr "ar1"
+ IL_0005: ldarg.s ar1
+ IL_0007: ldsfld int32 LocallocTest::locallocSize
+ IL_000c: ldc.i4 1000
+ IL_0011: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0016: brtrue.s L_JUMP
+
+ IL_0018: ldc.i4.0
+ IL_0019: stloc.0
+ IL_001a: br.s IL_002f
+ L_JUMP: jmp instance bool LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*)
+ IL_002c: stloc.0
+ IL_002d: br.s IL_002f
+
+ IL_002f: ldc.i4.1
+ IL_0030: ret
+ }
+
+ .method private hidebysig instance bool
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1) cil managed
+ {
+ .maxstack 3
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar2)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldloc.2
+ IL_001a: ldsfld int32 LocallocTest::locallocSize
+ IL_001f: ldc.i4 2000
+ IL_0024: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0029: ldstr "local1"
+ IL_002e: ldloc.0
+ IL_002f: ldc.i8 0xfedcba9876543210
+ IL_0038: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_003d: brtrue.s IL_0043
+
+ IL_003f: ldc.i4.0
+ IL_0041: br.s L_END
+
+ IL_0043: ldstr "local2"
+ IL_0048: ldloc.1
+ IL_0049: ldc.i8 0xfedcba9876543211
+ IL_0052: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0057: brtrue.s IL_005d
+
+ IL_0059: ldc.i4.0
+ IL_005b: br.s L_END
+ IL_005d: ldarg.0
+ IL_005e: ldarg.s ar1
+ IL_0060: ldloc.2
+ IL_0061: call instance bool LocallocTest::func2(int32*,
+ int32*)
+ L_END: ret
+ }
+
+ .method private hidebysig instance bool
+ func2(int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar3,
+ bool retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldloc.2
+ IL_001a: ldsfld int32 LocallocTest::locallocSize
+ IL_001f: ldc.i4 3000
+ IL_0024: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0029: ldstr "local1"
+ IL_002e: ldloc.0
+ IL_002f: ldc.i8 0xfedcba9876543210
+ IL_0038: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_003d: brtrue.s IL_0043
+
+ IL_003f: ldc.i4.0
+ IL_0040: stloc.3
+ IL_0041: br IL_00d3
+
+ IL_0043: ldstr "local2"
+ IL_0048: ldloc.1
+ IL_0049: ldc.i8 0xfedcba9876543211
+ IL_0052: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0057: brtrue.s IL_005d
+
+ IL_0059: ldc.i4.0
+ IL_005a: stloc.3
+ IL_005b: br IL_00d3
+ IL_005d: ldstr "ar1"
+ IL_0062: ldarg.1
+ 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_0078
+
+ IL_0074: ldc.i4.0
+ IL_0075: stloc.3
+ IL_0076: br IL_00d3
+
+ IL_0078: ldstr "ar2"
+ IL_007d: ldarg.2
+ IL_007e: ldsfld int32 LocallocTest::locallocSize
+ IL_0083: ldc.i4 2000
+ IL_0088: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_008d: brtrue.s IL_0093
+
+ IL_008f: ldc.i4.0
+ IL_0090: stloc.3
+ IL_0091: br IL_00d3
+
+ IL_0093: ldstr "ar3"
+ IL_0098: ldloc.2
+ IL_0099: ldsfld int32 LocallocTest::locallocSize
+ IL_009e: ldc.i4 3000
+ IL_00a3: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00b4: brtrue.s IL_00bd
+
+ IL_00b6: ldc.i4.0
+ IL_00b7: stloc.3
+ IL_00b8: br IL_00d3
+
+ IL_00bd: ldarg.0
+ IL_00be: ldc.i4 0x1f4
+ IL_00c3: ldarg ar1
+ IL_00c7: ldarg ar2
+ IL_00cb: call instance bool LocallocTest::func3(int32,
+ int32*,
+ int32*)
+ IL_00d0: stloc.3
+ IL_00d1: br.s IL_00d3
+
+ IL_00d3: ldloc.3
+ IL_00d4: ret
+ }
+
+ .method private hidebysig instance bool
+ func3(int32 n,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals init ([0] int32* ar3,
+ [1] int32* ar4,
+ [2] int32 iter)
+
+ IL_0000: ldarg.s n
+ IL_0002: stloc.s iter
+
+ IL_0004: ldloc.s iter
+ IL_0006: ldc.i4.1
+ IL_0007: bgt.s IL_000c
+
+ IL_0009: ldloc.s iter
+ IL_000b: ret
+
+ IL_000c: ldc.i4.4
+ IL_000d: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0012: mul
+ IL_0013: localloc
+ IL_0015: stloc ar3
+ IL_0019: ldloc.s ar3
+ IL_001b: ldsfld int32 LocallocTest::locallocSize
+ IL_0020: ldc.i4 0xbb8
+ IL_0025: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002a: ldc.i4.4
+ IL_002b: ldsfld int32 [common]LocallocTesting.Global::stackAllocSize
+ IL_0030: mul
+ IL_0031: localloc
+ IL_0033: stloc.s ar4
+ IL_0035: ldloc.s ar4
+ IL_0037: ldsfld int32 LocallocTest::locallocSize
+ IL_003c: ldc.i4 0xfa0
+ IL_0041: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0046: ldstr "ar1"
+ IL_004b: ldarg ar1
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 0x3e8
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue IL_006d
+
+ IL_0063: ldc.i4.0
+ IL_0064: stloc iter
+ IL_0068: br IL_00ec
+
+ IL_006d: ldstr "ar2"
+ IL_0072: ldarg ar2
+ IL_0076: ldsfld int32 LocallocTest::locallocSize
+ IL_007b: ldc.i4 0x7d0
+ IL_0080: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0085: brtrue IL_0094
+
+ IL_008a: ldc.i4.0
+ IL_008b: stloc iter
+ IL_008f: br IL_00ec
+
+ IL_0094: ldstr "ar3"
+ IL_0099: ldloc ar3
+ IL_009d: ldsfld int32 LocallocTest::locallocSize
+ IL_00a2: ldc.i4 0xbb8
+ IL_00a7: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00ac: brtrue IL_00bb
+
+ IL_00b1: ldc.i4.0
+ IL_00b2: stloc iter
+ IL_00b6: br IL_00ec
+
+ IL_00bb: ldstr "ar4"
+ IL_00c0: ldloc ar4
+ IL_00c4: ldsfld int32 LocallocTest::locallocSize
+ IL_00c9: ldc.i4 0xfa0
+ IL_00ce: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00d3: brtrue IL_00e2
+
+ IL_00d8: ldc.i4.0
+ IL_00d9: stloc iter
+ IL_00dd: br IL_00ec
+
+ IL_00e2: ldc.i4.m1
+ IL_00e3: ldloc iter
+ IL_00e7: add
+ IL_00e8: stloc iter
+
+ IL_00ec: ldarg.0
+ IL_00ed: ldloc iter
+ IL_00f1: ldarg ar1
+ IL_00f5: ldarg ar2
+ IL_00f9: tail.
+ IL_00fb: call instance bool LocallocTest::func3(int32,
+ int32*,
+ int32*)
+ IL_0100: 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/call/call07_dynamic.ilproj b/tests/src/JIT/jit64/localloc/call/call07_dynamic.ilproj
new file mode 100644
index 0000000000..e7d12b8ed1
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call07_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="call07_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/call/call07_small.il b/tests/src/JIT/jit64/localloc/call/call07_small.il
new file mode 100644
index 0000000000..e1ea33e1eb
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call07_small.il
@@ -0,0 +1,451 @@
+// Test localloc with jump followed by tail call.
+
+.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 call07{}
+
+.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 10
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar1,
+ class LocallocTest V_3,
+ int32 retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldc.i4.1
+ IL_001e: stsfld int32 LocallocTest::locallocSize
+ IL_0023: ldloc.2
+ IL_0024: ldsfld int32 LocallocTest::locallocSize
+ IL_0029: ldc.i4 1000
+ IL_002e: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0033: newobj instance void LocallocTest::.ctor()
+ IL_0038: stloc.3
+ IL_0039: ldloc.3
+ IL_003a: ldc.i4.1
+ IL_003b: ldc.i4.2
+ IL_003c: ldc.i4.3
+ IL_003d: ldc.i4.4
+ IL_003e: ldc.i4.5
+ IL_003f: ldc.i4.6
+ IL_0040: ldc.i4.7
+ IL_0041: ldc.i4.8
+ IL_0042: ldloc.2
+ IL_0043: callvirt instance bool LocallocTest::func0(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*)
+ IL_0048: brtrue.s IL_004f
+
+ IL_004a: ldc.i4.1
+ IL_004b: stloc.s retValue
+ IL_004d: br.s L_END
+
+ IL_004f: ldstr "local1"
+ IL_0054: ldloc.0
+ IL_0055: ldc.i8 0xfedcba9876543210
+ IL_005e: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0063: brtrue.s IL_006a
+
+ IL_0065: ldc.i4.1
+ IL_0066: stloc.s retValue
+ IL_0068: br.s L_END
+
+ IL_006a: ldstr "local2"
+ IL_006f: ldloc.1
+ IL_0070: ldc.i8 0xfedcba9876543211
+ IL_0079: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_007e: brtrue.s IL_0085
+
+ IL_0080: ldc.i4.1
+ IL_0081: stloc.s retValue
+ IL_0083: br.s L_END
+
+ IL_0085: ldstr "Passed\n"
+ IL_008a: call void [System.Console]System.Console::WriteLine(string)
+ IL_008f: ldc.i4.s 100
+ IL_0091: stloc.s retValue
+ IL_0093: br.s L_END
+
+ L_END: ldloc.s retValue
+ IL_0097: ret
+ }
+
+ .method private hidebysig instance bool
+ func0(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1) cil managed
+ {
+ .maxstack 10
+ .locals (bool retValue)
+ IL_0000: ldstr "ar1"
+ IL_0005: ldarg.s ar1
+ IL_0007: ldsfld int32 LocallocTest::locallocSize
+ IL_000c: ldc.i4 1000
+ IL_0011: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0016: brtrue.s L_JUMP
+
+ IL_0018: ldc.i4.0
+ IL_0019: stloc.0
+ IL_001a: br.s IL_002f
+ L_JUMP: jmp instance bool LocallocTest::func1(int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32,
+ int32*)
+ IL_002c: stloc.0
+ IL_002d: br.s IL_002f
+
+ IL_002f: ldc.i4.1
+ IL_0030: ret
+ }
+
+ .method private hidebysig instance bool
+ func1(int32 i1,
+ int32 i2,
+ int32 i3,
+ int32 i4,
+ int32 i5,
+ int32 i6,
+ int32 i7,
+ int32 i8,
+ int32* ar1) cil managed
+ {
+ .maxstack 3
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar2)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldloc.2
+ IL_001a: ldsfld int32 LocallocTest::locallocSize
+ IL_001f: ldc.i4 2000
+ IL_0024: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0029: ldstr "local1"
+ IL_002e: ldloc.0
+ IL_002f: ldc.i8 0xfedcba9876543210
+ IL_0038: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_003d: brtrue.s IL_0043
+
+ IL_003f: ldc.i4.0
+ IL_0041: br.s L_END
+
+ IL_0043: ldstr "local2"
+ IL_0048: ldloc.1
+ IL_0049: ldc.i8 0xfedcba9876543211
+ IL_0052: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0057: brtrue.s IL_005d
+
+ IL_0059: ldc.i4.0
+ IL_005b: br.s L_END
+ IL_005d: ldarg.0
+ IL_005e: ldarg.s ar1
+ IL_0060: ldloc.2
+ IL_0061: call instance bool LocallocTest::func2(int32*,
+ int32*)
+ L_END: ret
+ }
+
+ .method private hidebysig instance bool
+ func2(int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals (unsigned int64 local1,
+ unsigned int64 local2,
+ int32* ar3,
+ bool retValue)
+ IL_0000: ldc.i8 0xfedcba9876543210
+ IL_0009: stloc.0
+ IL_000a: ldloc.0
+ IL_000b: ldc.i4.1
+ IL_000c: conv.i8
+ IL_000d: add
+ IL_000e: stloc.1
+ IL_000f: ldc.i4.4
+ IL_0010: ldc.i4.1
+ IL_0015: mul
+ IL_0016: localloc
+ IL_0018: stloc.2
+ IL_0019: ldloc.2
+ IL_001a: ldsfld int32 LocallocTest::locallocSize
+ IL_001f: ldc.i4 3000
+ IL_0024: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0029: ldstr "local1"
+ IL_002e: ldloc.0
+ IL_002f: ldc.i8 0xfedcba9876543210
+ IL_0038: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_003d: brtrue.s IL_0043
+
+ IL_003f: ldc.i4.0
+ IL_0040: stloc.3
+ IL_0041: br IL_00d3
+
+ IL_0043: ldstr "local2"
+ IL_0048: ldloc.1
+ IL_0049: ldc.i8 0xfedcba9876543211
+ IL_0052: call bool [common]LocallocTesting.Global::verifyLocal(string,
+ unsigned int64,
+ unsigned int64)
+ IL_0057: brtrue.s IL_005d
+
+ IL_0059: ldc.i4.0
+ IL_005a: stloc.3
+ IL_005b: br IL_00d3
+ IL_005d: ldstr "ar1"
+ IL_0062: ldarg.1
+ 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_0078
+
+ IL_0074: ldc.i4.0
+ IL_0075: stloc.3
+ IL_0076: br IL_00d3
+
+ IL_0078: ldstr "ar2"
+ IL_007d: ldarg.2
+ IL_007e: ldsfld int32 LocallocTest::locallocSize
+ IL_0083: ldc.i4 2000
+ IL_0088: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_008d: brtrue.s IL_0093
+
+ IL_008f: ldc.i4.0
+ IL_0090: stloc.3
+ IL_0091: br IL_00d3
+
+ IL_0093: ldstr "ar3"
+ IL_0098: ldloc.2
+ IL_0099: ldsfld int32 LocallocTest::locallocSize
+ IL_009e: ldc.i4 3000
+ IL_00a3: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00b4: brtrue.s IL_00bd
+
+ IL_00b6: ldc.i4.0
+ IL_00b7: stloc.3
+ IL_00b8: br IL_00d3
+
+ IL_00bd: ldarg.0
+ IL_00be: ldc.i4 0x1f4
+ IL_00c3: ldarg ar1
+ IL_00c7: ldarg ar2
+ IL_00cb: call instance bool LocallocTest::func3(int32,
+ int32*,
+ int32*)
+ IL_00d0: stloc.3
+ IL_00d1: br.s IL_00d3
+
+ IL_00d3: ldloc.3
+ IL_00d4: ret
+ }
+
+ .method private hidebysig instance bool
+ func3(int32 n,
+ int32* ar1,
+ int32* ar2) cil managed
+ {
+ .maxstack 4
+ .locals init ([0] int32* ar3,
+ [1] int32* ar4,
+ [2] int32 iter)
+
+ IL_0000: ldarg.s n
+ IL_0002: stloc.s iter
+
+ IL_0004: ldloc.s iter
+ IL_0006: ldc.i4.1
+ IL_0007: bgt.s IL_000c
+
+ IL_0009: ldloc.s iter
+ IL_000b: ret
+
+ IL_000c: ldc.i4.4
+ IL_000d: ldc.i4.1
+ IL_0012: mul
+ IL_0013: localloc
+ IL_0015: stloc ar3
+ IL_0019: ldloc.s ar3
+ IL_001b: ldsfld int32 LocallocTest::locallocSize
+ IL_0020: ldc.i4 0xbb8
+ IL_0025: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_002a: ldc.i4.4
+ IL_002b: ldc.i4.1
+ IL_0030: mul
+ IL_0031: localloc
+ IL_0033: stloc.s ar4
+ IL_0035: ldloc.s ar4
+ IL_0037: ldsfld int32 LocallocTest::locallocSize
+ IL_003c: ldc.i4 0xfa0
+ IL_0041: call void [common]LocallocTesting.Global::initializeStack(int32*,
+ int32,
+ int32)
+ IL_0046: ldstr "ar1"
+ IL_004b: ldarg ar1
+ IL_004f: ldsfld int32 LocallocTest::locallocSize
+ IL_0054: ldc.i4 0x3e8
+ IL_0059: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_005e: brtrue IL_006d
+
+ IL_0063: ldc.i4.0
+ IL_0064: stloc iter
+ IL_0068: br IL_00ec
+
+ IL_006d: ldstr "ar2"
+ IL_0072: ldarg ar2
+ IL_0076: ldsfld int32 LocallocTest::locallocSize
+ IL_007b: ldc.i4 0x7d0
+ IL_0080: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_0085: brtrue IL_0094
+
+ IL_008a: ldc.i4.0
+ IL_008b: stloc iter
+ IL_008f: br IL_00ec
+
+ IL_0094: ldstr "ar3"
+ IL_0099: ldloc ar3
+ IL_009d: ldsfld int32 LocallocTest::locallocSize
+ IL_00a2: ldc.i4 0xbb8
+ IL_00a7: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00ac: brtrue IL_00bb
+
+ IL_00b1: ldc.i4.0
+ IL_00b2: stloc iter
+ IL_00b6: br IL_00ec
+
+ IL_00bb: ldstr "ar4"
+ IL_00c0: ldloc ar4
+ IL_00c4: ldsfld int32 LocallocTest::locallocSize
+ IL_00c9: ldc.i4 0xfa0
+ IL_00ce: call bool [common]LocallocTesting.Global::verifyStack(string,
+ int32*,
+ int32,
+ int32)
+ IL_00d3: brtrue IL_00e2
+
+ IL_00d8: ldc.i4.0
+ IL_00d9: stloc iter
+ IL_00dd: br IL_00ec
+
+ IL_00e2: ldc.i4.m1
+ IL_00e3: ldloc iter
+ IL_00e7: add
+ IL_00e8: stloc iter
+
+ IL_00ec: ldarg.0
+ IL_00ed: ldloc iter
+ IL_00f1: ldarg ar1
+ IL_00f5: ldarg ar2
+ IL_00f9: tail.
+ IL_00fb: call instance bool LocallocTest::func3(int32,
+ int32*,
+ int32*)
+ IL_0100: 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/call/call07_small.ilproj b/tests/src/JIT/jit64/localloc/call/call07_small.ilproj
new file mode 100644
index 0000000000..4ef64e14c0
--- /dev/null
+++ b/tests/src/JIT/jit64/localloc/call/call07_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="call07_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>