summaryrefslogtreecommitdiff
path: root/tests/src
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2017-04-27 07:54:50 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2017-04-27 07:54:50 (GMT)
commit5b975f8233e8c8d17b215372f89ca713b45d6a0b (patch)
tree0267bcc331458a01f4c26fafd28110a72273beb3 /tests/src
parenta56e30c8d33048216567753d9d3fefc2152af8ac (diff)
downloadcoreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.zip
coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.gz
coreclr-5b975f8233e8c8d17b215372f89ca713b45d6a0b.tar.bz2
Imported Upstream version 2.0.0.11599upstream/2.0.0.11599
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/Common/PerfHarness/project.json2
-rw-r--r--tests/src/Common/build_against_pkg_dependencies/project.json13
-rw-r--r--tests/src/Common/external/external.depproj7
-rw-r--r--tests/src/Common/external/project.json10
-rw-r--r--tests/src/Common/netcoreapp/project.json2
-rw-r--r--tests/src/Common/targeting_pack_ref/project.json2
-rw-r--r--tests/src/Common/test_dependencies/project.json12
-rw-r--r--tests/src/Common/test_runtime/project.json8
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateequals1.csbin23538 -> 11651 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.csbin25374 -> 12561 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.csbin19234 -> 9593 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateremove.csbin27380 -> 13569 bytes
-rw-r--r--tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.csbin23370 -> 11598 bytes
-rw-r--r--tests/src/GC/API/GC/GetGenerationWR2.csproj2
-rw-r--r--tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs21
-rw-r--r--tests/src/GC/Stress/Framework/ReliabilityFramework.cs107
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt2
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csbin17120 -> 8341 bytes
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csproj2
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPSTR/LPSTRTestNative.cpp0
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPSTR/PinvokeDef.cs2
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt0
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTest.csbin17934 -> 17934 bytes
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestNative.cpp46
-rw-r--r--[-rwxr-xr-x]tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs0
-rw-r--r--tests/src/Interop/common/xplatform.h4
-rw-r--r--tests/src/JIT/CheckProjects/CheckProjects.cs10
-rw-r--r--tests/src/JIT/Directed/pinvoke/calli_excep.il4
-rw-r--r--tests/src/JIT/Performance/CodeQuality/Span/Indexer.cs1021
-rw-r--r--tests/src/JIT/Performance/CodeQuality/Span/Indexer.csproj44
-rw-r--r--tests/src/JIT/Performance/RunBenchmarks/RunBenchmarks.cs186
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.il147
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.ilproj34
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.il83
-rw-r--r--tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.ilproj37
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.cs58
-rw-r--r--tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.csproj42
-rw-r--r--tests/src/JIT/config/benchmark+roslyn/project.json14
-rw-r--r--tests/src/JIT/config/benchmark+serialize/project.json12
-rw-r--r--tests/src/JIT/config/benchmark/project.json19
-rw-r--r--tests/src/JIT/jit64/hfa/main/dll/hfa_native.h305
-rw-r--r--tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj1
-rw-r--r--tests/src/NuGet.Config2
-rw-r--r--tests/src/Regressions/coreclr/GitHub_7685/test7685.cs191
-rw-r--r--tests/src/TestWrappersConfig/project.json2
-rw-r--r--tests/src/baseservices/multidimmarray/rank1array.il160
-rw-r--r--tests/src/baseservices/multidimmarray/rank1array.ilproj31
-rw-r--r--tests/src/performance/linkbench/assets/MusicStore/MusicStoreReflection.xml27
-rw-r--r--tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.txt3
-rw-r--r--tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.xml5
-rw-r--r--tests/src/performance/linkbench/assets/Roslyn/illinkcsproj9
-rw-r--r--tests/src/performance/linkbench/linkbench.cs372
-rw-r--r--tests/src/performance/linkbench/linkbench.csproj41
-rw-r--r--tests/src/performance/linkbench/scripts/build.cmd116
-rw-r--r--tests/src/performance/linkbench/scripts/clone.cmd30
-rw-r--r--tests/src/performance/linkbench/scripts/empty.cmd1
-rw-r--r--tests/src/performance/linkbench/scripts/getcert.cmd2
-rw-r--r--tests/src/performance/project.json17
-rw-r--r--tests/src/readytorun/tests/fieldgetter.il (renamed from tests/src/readytorun/fieldgetter.il)0
-rw-r--r--tests/src/readytorun/tests/fieldgetter.ilproj (renamed from tests/src/readytorun/fieldgetter.ilproj)0
-rw-r--r--tests/src/readytorun/tests/generics.cs (renamed from tests/src/readytorun/generics.cs)0
-rw-r--r--tests/src/readytorun/tests/generics.csproj (renamed from tests/src/readytorun/generics.csproj)0
-rw-r--r--tests/src/readytorun/tests/genericsload/callgenericctor.cs (renamed from tests/src/readytorun/genericsload/callgenericctor.cs)0
-rw-r--r--tests/src/readytorun/tests/genericsload/callgenericctor.csproj (renamed from tests/src/readytorun/genericsload/callgenericctor.csproj)0
-rw-r--r--tests/src/readytorun/tests/genericsload/genericslib.il (renamed from tests/src/readytorun/genericsload/genericslib.il)0
-rw-r--r--tests/src/readytorun/tests/genericsload/genericslib.ilproj (renamed from tests/src/readytorun/genericsload/genericslib.ilproj)0
-rw-r--r--tests/src/readytorun/tests/genericsload/usegenericfield.cs (renamed from tests/src/readytorun/genericsload/usegenericfield.cs)0
-rw-r--r--tests/src/readytorun/tests/genericsload/usegenericfield.csproj (renamed from tests/src/readytorun/genericsload/usegenericfield.csproj)0
-rw-r--r--tests/src/readytorun/tests/main.cs (renamed from tests/src/readytorun/main.cs)0
-rw-r--r--tests/src/readytorun/tests/mainv1.csproj (renamed from tests/src/readytorun/mainv1.csproj)0
-rw-r--r--tests/src/readytorun/tests/mainv2.csproj (renamed from tests/src/readytorun/mainv2.csproj)0
-rw-r--r--tests/src/readytorun/tests/test.cs (renamed from tests/src/readytorun/test.cs)0
-rw-r--r--tests/src/readytorun/tests/testv1/test.csproj (renamed from tests/src/readytorun/testv1/test.csproj)0
-rw-r--r--tests/src/readytorun/tests/testv2/test.csproj (renamed from tests/src/readytorun/testv2/test.csproj)0
74 files changed, 2866 insertions, 402 deletions
diff --git a/tests/src/Common/PerfHarness/project.json b/tests/src/Common/PerfHarness/project.json
index d920190..a1ecb28 100644
--- a/tests/src/Common/PerfHarness/project.json
+++ b/tests/src/Common/PerfHarness/project.json
@@ -12,7 +12,7 @@
"type": "platform",
"version": "1.1.0"
},
- "xunit.performance.api": "1.0.0-alpha-build0049"
+ "xunit.performance.api": "1.0.0-beta-build0003"
}
}
}
diff --git a/tests/src/Common/build_against_pkg_dependencies/project.json b/tests/src/Common/build_against_pkg_dependencies/project.json
index 501dfec..327340f 100644
--- a/tests/src/Common/build_against_pkg_dependencies/project.json
+++ b/tests/src/Common/build_against_pkg_dependencies/project.json
@@ -1,10 +1,10 @@
{
"dependencies": {
- "Microsoft.NETCore.ILAsm": "2.0.0-preview1-25212-04",
- "Microsoft.NETCore.ILDAsm": "2.0.0-preview1-25212-04",
- "Microsoft.NETCore.Jit": "2.0.0-preview1-25212-04",
- "Microsoft.NETCore.Runtime.CoreCLR": "2.0.0-preview1-25212-04",
- "Microsoft.NETCore.TestHost": "2.0.0-preview1-25212-04"
+ "Microsoft.NETCore.ILAsm": "2.0.0-preview1-25221-01",
+ "Microsoft.NETCore.ILDAsm": "2.0.0-preview1-25221-01",
+ "Microsoft.NETCore.Jit": "2.0.0-preview1-25221-01",
+ "Microsoft.NETCore.Runtime.CoreCLR": "2.0.0-preview1-25221-01",
+ "Microsoft.NETCore.TestHost": "2.0.0-preview1-25221-01"
},
"frameworks": {
"netcoreapp2.0": {
@@ -15,6 +15,8 @@
}
},
"runtimes": {
+ "win-x64": {},
+ "win-x86": {},
"win7-x86": {},
"win7-x64": {},
"win10-arm64": {},
@@ -22,6 +24,7 @@
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"osx.10.12-x64": {},
+ "osx-x64": {},
"centos.7-x64": {},
"rhel.7-x64": {},
"debian.8-x64": {},
diff --git a/tests/src/Common/external/external.depproj b/tests/src/Common/external/external.depproj
index 3f78906..5a16122 100644
--- a/tests/src/Common/external/external.depproj
+++ b/tests/src/Common/external/external.depproj
@@ -24,9 +24,6 @@
<PackageToInclude Include="xunit.extensibility.core"/>
<PackageToInclude Include="xunit.extensibility.execution"/>
<PackageToInclude Include="xunit.runner.utility"/>
- <PackageToInclude Include="Microsoft.DotNet.xunit.performance"/>
- <PackageToInclude Include="Microsoft.DotNet.xunit.performance.analysis"/>
- <PackageToInclude Include="Microsoft.DotNet.xunit.performance.runner.Windows"/>
<PackageToInclude Include="xunit.performance.api"/>
<PackageToInclude Include="xunit.performance.core"/>
<PackageToInclude Include="xunit.performance.execution"/>
@@ -37,7 +34,7 @@
<PackageToInclude Include="Microsoft.CodeAnalysis.Common"/>
<PackageToInclude Include="Microsoft.CodeAnalysis.Compilers"/>
<PackageToInclude Include="Microsoft.CodeAnalysis.CSharp"/>
- <PackageToInclude Include="Microsoft.CodeAnalysis.VisualBasic"/>
+ <PackageToInclude Include="Microsoft.CodeAnalysis.VisualBasic"/>
<PackageToInclude Include="$(XUnitRunnerPackageId)" />
</ItemGroup>
@@ -48,7 +45,7 @@
Text="Error: looks the package $(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion) not restored or missing xunit.console.exe."
/>
<ItemGroup>
- <ReferenceCopyLocalPaths
+ <ReferenceCopyLocalPaths
Include="$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\*.*"
Exclude="$(PackagesDir)$(XUnitRunnerPackageId)\$(XUnitPackageVersion)\tools\xunit.console.exe.config"
>
diff --git a/tests/src/Common/external/project.json b/tests/src/Common/external/project.json
index 63cdc04..12c986a 100644
--- a/tests/src/Common/external/project.json
+++ b/tests/src/Common/external/project.json
@@ -1,10 +1,10 @@
{
"dependencies": {
"Microsoft.CodeAnalysis.Compilers": "1.1.1",
- "xunit.performance.api": "1.0.0-alpha-build0049",
- "xunit.performance.core": "1.0.0-alpha-build0049",
- "xunit.performance.execution": "1.0.0-alpha-build0049",
- "xunit.performance.metrics": "1.0.0-alpha-build0049",
+ "xunit.performance.api": "1.0.0-beta-build0003",
+ "xunit.performance.core": "1.0.0-beta-build0003",
+ "xunit.performance.execution": "1.0.0-beta-build0003",
+ "xunit.performance.metrics": "1.0.0-beta-build0003",
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.3-alpha-experimental",
"Newtonsoft.Json": "9.0.1",
"xunit": "2.2.0-beta2-build3300",
@@ -23,4 +23,4 @@
"win7-x86": {},
"win7-x64": {}
}
-} \ No newline at end of file
+}
diff --git a/tests/src/Common/netcoreapp/project.json b/tests/src/Common/netcoreapp/project.json
index 2fae8dd..ca40b18 100644
--- a/tests/src/Common/netcoreapp/project.json
+++ b/tests/src/Common/netcoreapp/project.json
@@ -1,7 +1,7 @@
{
"dependencies": {
"Microsoft.NETCore.App": "2.0.0-beta-001494-00",
- "System.Runtime.CompilerServices.Unsafe": "4.4.0-preview1-25210-01"
+ "System.Runtime.CompilerServices.Unsafe": "4.4.0-preview1-25221-01"
},
"frameworks": {
"netcoreapp2.0": {}
diff --git a/tests/src/Common/targeting_pack_ref/project.json b/tests/src/Common/targeting_pack_ref/project.json
index ea49ba3..0754b74 100644
--- a/tests/src/Common/targeting_pack_ref/project.json
+++ b/tests/src/Common/targeting_pack_ref/project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "Microsoft.TargetingPack.Private.CoreCLR": "2.0.0-preview1-25212-04"
+ "Microsoft.TargetingPack.Private.CoreCLR": "2.0.0-preview1-25221-01"
},
"frameworks": {
"netcoreapp1.1": {
diff --git a/tests/src/Common/test_dependencies/project.json b/tests/src/Common/test_dependencies/project.json
index 89a5d6b..4477c68 100644
--- a/tests/src/Common/test_dependencies/project.json
+++ b/tests/src/Common/test_dependencies/project.json
@@ -1,9 +1,10 @@
{
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
- "Microsoft.Private.CoreFx.NETCoreApp": "4.4.0-preview1-25210-01",
- "System.Memory": "4.4.0-preview1-25210-01",
- "System.Runtime.CompilerServices.Unsafe": "4.4.0-preview1-25210-01"
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
+ "Microsoft.Private.CoreFx.NETCoreApp": "4.4.0-preview1-25221-01",
+ "System.Memory": "4.4.0-preview1-25221-01",
+ "System.Runtime.CompilerServices.Unsafe": "4.4.0-preview1-25221-01",
+ "System.Security.Permissions": "4.4.0-preview1-25221-01"
},
"frameworks": {
"netcoreapp2.0": {
@@ -15,12 +16,15 @@
}
},
"runtimes": {
+ "win-x64": {},
+ "win-x86": {},
"win7-x86": {},
"win7-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"osx.10.12-x64": {},
+ "osx-x64": {},
"centos.7-x64": {},
"rhel.7-x64": {},
"debian.8-x64": {},
diff --git a/tests/src/Common/test_runtime/project.json b/tests/src/Common/test_runtime/project.json
index 0f82a11..575d75d 100644
--- a/tests/src/Common/test_runtime/project.json
+++ b/tests/src/Common/test_runtime/project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"Microsoft.DotNet.CoreCLR.TestDependencies": "1.0.0-prerelease",
"jit-dasm": "0.0.1.4",
"cijobs": "0.0.1.2",
@@ -15,15 +15,19 @@
}
},
"runtimes": {
+ "win-x64": {},
+ "win-x86": {},
"win7-x86": {},
"win7-x64": {},
"ubuntu.14.04-x64": {},
"ubuntu.16.04-x64": {},
"ubuntu.16.10-x64": {},
"osx.10.12-x64": {},
+ "osx-x64": {},
"centos.7-x64": {},
"rhel.7-x64": {},
"debian.8-x64": {},
- "fedora.24-x64": {}
+ "fedora.24-x64": {},
+ "linux-x64": {}
}
}
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs
index ca99d67..b94fa69 100644
--- a/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateequals1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs
index 8c77c9b..05ba362 100644
--- a/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegategethashcode1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs b/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs
index 3f1d311..b0396aa 100644
--- a/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegategetinvocationlist1.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs
index aba475d..f75ec6f 100644
--- a/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateremove.cs
Binary files differ
diff --git a/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs b/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs
index d06e82a..8325a4e 100644
--- a/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs
+++ b/tests/src/CoreMangLib/cti/system/delegate/delegateremoveimpl.cs
Binary files differ
diff --git a/tests/src/GC/API/GC/GetGenerationWR2.csproj b/tests/src/GC/API/GC/GetGenerationWR2.csproj
index edafe56..438bbd0 100644
--- a/tests/src/GC/API/GC/GetGenerationWR2.csproj
+++ b/tests/src/GC/API/GC/GetGenerationWR2.csproj
@@ -10,7 +10,7 @@
<OutputType>Exe</OutputType>
<ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
- <GCStressIncompatible Condition="'$(Platform)' == 'x86'">true</GCStressIncompatible>
+ <GCStressIncompatible>true</GCStressIncompatible>
<CLRTestExecutionArguments></CLRTestExecutionArguments>
</PropertyGroup>
diff --git a/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs b/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs
index f5fe8db..6be9e66 100644
--- a/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs
+++ b/tests/src/GC/Stress/Framework/ReliabilityConfiguration.cs
@@ -413,11 +413,22 @@ public class ReliabilityConfig : IEnumerable, IEnumerator
case RFConfigOptions.RFConfigOptions_Test_MinMaxTestsUseCPUCount:
if (GetTrueFalseOptionValue(currentXML.Value, RFConfigOptions.RFConfigOptions_Test_MinMaxTestsUseCPUCount))
{
- int CPUCount = Convert.ToInt32(Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS"));
- if (CPUCount <= 0)
- throw new Exception("Invalid Value when reading NUMBER_OF_PROCESSORS: {0}" + CPUCount);
- _curTestSet.MinTestsRunning = CPUCount;
- _curTestSet.MaxTestsRunning = (int)(CPUCount * 1.5);
+ string numProcessors = Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS");
+ int cpuCount;
+ if (numProcessors == null)
+ {
+ Console.WriteLine("NUMBER_OF_PROCESSORS environment variable not supplied, falling back to Environment");
+ cpuCount = Environment.ProcessorCount;
+ }
+ else
+ {
+ cpuCount = Convert.ToInt32(Environment.GetEnvironmentVariable("NUMBER_OF_PROCESSORS"));
+ }
+
+ if (cpuCount <= 0)
+ throw new Exception("Invalid Value when reading processor count: " + cpuCount);
+ _curTestSet.MinTestsRunning = cpuCount;
+ _curTestSet.MaxTestsRunning = (int)(cpuCount * 1.5);
}
break;
case RFConfigOptions.RFConfigOptions_Test_SuppressConsoleOutputFromTests:
diff --git a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs
index 6aaeddf..cb7bcab 100644
--- a/tests/src/GC/Stress/Framework/ReliabilityFramework.cs
+++ b/tests/src/GC/Stress/Framework/ReliabilityFramework.cs
@@ -35,23 +35,54 @@ using System.Runtime.Loader;
internal class CustomAssemblyResolver : AssemblyLoadContext
{
- protected override Assembly Load(AssemblyName assemblyName)
+ private string _frameworkPath;
+ private string _testsPath;
+
+ public CustomAssemblyResolver()
{
- Console.WriteLine("\nCustomAssemblyLoader: Got request to load {0}\n", assemblyName.ToString());
+ Console.WriteLine("CustomAssemblyResolver initializing");
+ _frameworkPath = Environment.GetEnvironmentVariable("BVT_ROOT");
+ if (_frameworkPath == null)
+ {
+ Console.WriteLine("CustomAssemblyResolver: BVT_ROOT not set");
+ _frameworkPath = Environment.GetEnvironmentVariable("CORE_ROOT");
+ }
- string strBVTRoot = Environment.GetEnvironmentVariable("BVT_ROOT");
- if (String.IsNullOrEmpty(strBVTRoot))
- strBVTRoot = Path.Combine(Directory.GetCurrentDirectory(), "Tests");
+ if (_frameworkPath == null)
+ {
+ Console.WriteLine("CustomAssemblyResolver: CORE_ROOT not set");
+ _frameworkPath = Directory.GetCurrentDirectory();
+ }
+
+ Console.WriteLine("CustomAssemblyResolver: looking for framework libraries at path: {0}", _frameworkPath);
+ string stressFrameworkDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ Console.WriteLine("CustomAssemblyResolver: currently executing assembly is at path: {0}", stressFrameworkDir);
+ _testsPath = Path.Combine(stressFrameworkDir, "Tests");
+ Console.WriteLine("CustomAssemblyResolver: looking for tests in dir: {0}", _testsPath);
+ }
+
+ protected override Assembly Load(AssemblyName assemblyName)
+ {
+ Console.WriteLine("CustomAssemblyLoader: Got request to load {0}", assemblyName.ToString());
- string strPath = Path.Combine(strBVTRoot, assemblyName.Name + ".exe");
+ string strPath;
+ if (assemblyName.Name.StartsWith("System."))
+ {
+ Console.WriteLine("CustomAssemblyLoader: this looks like a framework assembly");
+ strPath = Path.Combine(_frameworkPath, assemblyName.Name + ".dll");
+ }
+ else
+ {
+ Console.WriteLine("CustomAssemblyLoader: this looks like a test");
+ strPath = Path.Combine(_testsPath, assemblyName.Name + ".exe");
+ }
- Console.WriteLine("Incoming AssemblyName: {0}\n", assemblyName.ToString());
- Console.WriteLine("Trying to Load: {0}\n", strPath);
- Console.WriteLine("Computed AssemblyName: {0}\n", GetAssemblyName(strPath).ToString());
+ Console.WriteLine("Incoming AssemblyName: {0}", assemblyName.ToString());
+ Console.WriteLine("Trying to Load: {0}", strPath);
+ Console.WriteLine("Computed AssemblyName: {0}", GetAssemblyName(strPath).ToString());
Assembly asmLoaded = LoadFromAssemblyPath(strPath);
- //Console.WriteLine("Loaded {0} from {1}", asmLoaded.FullName, asmLoaded.Location);
- Console.WriteLine("Loaded {0}", asmLoaded.FullName);
+ Console.WriteLine("Loaded {0} from {1}", asmLoaded.FullName, asmLoaded.Location);
return asmLoaded;
}
@@ -217,7 +248,7 @@ public class ReliabilityFramework
if (eTemp == null)
{
rf._logger.WriteToInstrumentationLog(null, LoggingLevels.Tests, String.Format("Exception while running tests: {0}", e));
- Console.WriteLine("There was an exception while attempting to run the tests: See Instrumentation Log for details");
+ Console.WriteLine("There was an exception while attempting to run the tests: See Instrumentation Log for details. (Exception: {0})", e);
}
}
}
@@ -529,6 +560,7 @@ public class ReliabilityFramework
return (99);
}
+#if !PROJECTK_BUILD
[DllImport("kernel32.dll")]
private extern static void DebugBreak();
@@ -537,6 +569,7 @@ public class ReliabilityFramework
[DllImport("kernel32.dll")]
private extern static void OutputDebugString(string debugStr);
+#endif
/// <summary>
/// Checks to see if we should block all execution due to a fatal error
@@ -558,12 +591,20 @@ public class ReliabilityFramework
}
internal static void MyDebugBreak(string extraData)
{
+#if !PROJECTK_BUILD
if (IsDebuggerPresent())
{
OutputDebugString(String.Format("\r\n\r\n\r\nRELIABILITYFRAMEWORK DEBUGBREAK: Breaking in because test throw an exception ({0})\r\n\r\n\r\n", extraData));
DebugBreak();
}
else
+#else
+ if (Debugger.IsAttached)
+ {
+ Console.WriteLine(string.Format("DebugBreak: breaking in because test threw an exception: {0}", extraData));
+ Debugger.Break();
+ }
+#endif
{
// We need to stop the process now,
// but all the threads are still running
@@ -669,7 +710,7 @@ public class ReliabilityFramework
ourPageFaultsCounter = new PerformanceCounter("Process", "Page Faults/sec", myProcessName);
}
}
-#endif
+#endif
/// <summary>
/// Calculates the total number of tests to be run based upon the maximum
/// number of loops & number of tests in the current test set.
@@ -1017,7 +1058,7 @@ public class ReliabilityFramework
test.TestStarted();
StartTestWorker(test);
-#else
+#else
try
{
if (curTestSet.AppDomainLoaderMode == AppDomainLoaderMode.Lazy)
@@ -1062,7 +1103,7 @@ public class ReliabilityFramework
{
HandleOom(e, "StartTest");
}
-#endif
+#endif
}
/// <summary>
@@ -1439,7 +1480,7 @@ public class ReliabilityFramework
{
SignalTestFinished(daTest);
}
-#endif
+#endif
break;
}
}
@@ -1531,15 +1572,31 @@ public class ReliabilityFramework
{
RunCommands(test.PreCommands, "pre", test);
+ List<string> newPaths = new List<string>(paths);
+ string bvtRoot = Environment.GetEnvironmentVariable("BVT_ROOT");
+ if (bvtRoot != null)
+ {
+ newPaths.Add(bvtRoot);
+ }
+
+ string coreRoot = Environment.GetEnvironmentVariable("CORE_ROOT");
+ if (coreRoot != null)
+ {
+ newPaths.Add(coreRoot);
+ }
+
+ string thisRoot = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "Tests");
+ newPaths.Add(thisRoot);
+
switch (test.TestStartMode)
{
case TestStartModeEnum.ProcessLoader:
- TestPreLoader_Process(test, paths);
+ TestPreLoader_Process(test, newPaths.ToArray());
break;
case TestStartModeEnum.AppDomainLoader:
#if PROJECTK_BUILD
Console.WriteLine("Appdomain mode is NOT supported for ProjectK");
-#else
+#else
TestPreLoader_AppDomain(test, paths);
#endif
break;
@@ -1688,21 +1745,30 @@ public class ReliabilityFramework
{
Console.WriteLine("Preloading for process mode");
+ Console.WriteLine("basepath: {0}, asm: {1}", test.BasePath, test.Assembly);
+ foreach (var path in paths)
+ {
+ Console.WriteLine(" path: {0}", path);
+ }
string realpath = ReliabilityConfig.ConvertPotentiallyRelativeFilenameToFullPath(test.BasePath, test.Assembly);
Debug.Assert(test.TestObject == null);
+ Console.WriteLine("Real path: {0}", realpath);
if (File.Exists(realpath))
{
test.TestObject = realpath;
}
else if (File.Exists((string)test.Assembly))
{
+ Console.WriteLine("asm path: {0}", test.Assembly);
test.TestObject = test.Assembly;
}
else
{
foreach (string path in paths)
{
+ Console.WriteLine("Candidate path: {0}", path);
string fullPath = ReliabilityConfig.ConvertPotentiallyRelativeFilenameToFullPath(path, (string)test.Assembly);
+ Console.WriteLine("Candidate full path: {0}", fullPath);
if (File.Exists(fullPath))
{
test.TestObject = fullPath;
@@ -1710,6 +1776,7 @@ public class ReliabilityFramework
}
}
}
+
if (test.TestObject == null)
{
Console.WriteLine("Couldn't find path for {0}", test.Assembly);
@@ -1740,7 +1807,7 @@ public class ReliabilityFramework
test.EntryPointMethod = methodInfo;
}
-#endif
+#endif
}
#if !PROJECTK_BUILD
@@ -1902,6 +1969,7 @@ Thanks for contributing to CLR Stress!
{
try
{
+#if !PROJECTK_BUILD
// Record the failure to the database
string arguments = String.Format("//b //nologo %SCRIPTSDIR%\\record.js -i %STRESSID% -a LOG_FAILED_TEST -k \"FAILED {0}\"", test.RefOrID);
ProcessStartInfo psi = new ProcessStartInfo("cscript.exe", Environment.ExpandEnvironmentVariables(arguments));
@@ -1916,6 +1984,7 @@ Thanks for contributing to CLR Stress!
Console.WriteLine("//b //nologo record.js -i %STRESSID% -a LOG_FAILED_TEST -k \"{0}\"", test.RefOrID);
}
p.Dispose();
+#endif
}
catch
{
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt b/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
index aa3fd76..3d30d82 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
+++ b/tests/src/Interop/StringMarshalling/LPSTR/CMakeLists.txt
@@ -7,4 +7,4 @@ add_library (LPSTRTestNative SHARED ${SOURCES})
target_link_libraries(LPSTRTestNative ${LINK_LIBRARIES_ADDITIONAL})
# add the install targets
-install (TARGETS LPSTRTestNative DESTINATION bin) \ No newline at end of file
+install (TARGETS LPSTRTestNative DESTINATION bin)
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.cs b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.cs
index f704791..12cff70 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.cs
+++ b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.cs
Binary files differ
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csproj b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csproj
index 88a0330..d78ecb1 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csproj
+++ b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTest.csproj
@@ -39,4 +39,4 @@
</ProjectReference>
</ItemGroup>
<Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
-</Project> \ No newline at end of file
+</Project>
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTestNative.cpp b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTestNative.cpp
index b440c52..b440c52 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTestNative.cpp
+++ b/tests/src/Interop/StringMarshalling/LPSTR/LPSTRTestNative.cpp
diff --git a/tests/src/Interop/StringMarshalling/LPSTR/PinvokeDef.cs b/tests/src/Interop/StringMarshalling/LPSTR/PinvokeDef.cs
index ce8455f..31d0eba 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPSTR/PinvokeDef.cs
+++ b/tests/src/Interop/StringMarshalling/LPSTR/PinvokeDef.cs
@@ -70,4 +70,4 @@ namespace NativeDefs
[DllImport(NativeBinaryName)]
public static extern bool ReverseP_MarshalStrB_Out(Del_MarshalStrB_Out d);
}
-} \ No newline at end of file
+}
diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt b/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
index f99a6e5..f99a6e5 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
+++ b/tests/src/Interop/StringMarshalling/LPTSTR/CMakeLists.txt
diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTest.cs b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTest.cs
index cc7369f..cc7369f 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTest.cs
+++ b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTest.cs
Binary files differ
diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestNative.cpp b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestNative.cpp
index bc3fa07..15b6038 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestNative.cpp
+++ b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestNative.cpp
@@ -100,24 +100,24 @@ extern "C" DLL_EXPORT LPWSTR MarshalPointer_Out(/*[out]*/ LPWSTR *s)
return ReturnString();
}
-typedef LPTSTR (__stdcall * Test_Del_MarshalStrB_InOut)(/*[in,out]*/ LPTSTR s);
-extern "C" DLL_EXPORT BOOL NATIVEAPI ReverseP_MarshalStrB_InOut(Test_Del_MarshalStrB_InOut d, /*[in]*/ LPCTSTR s)
+typedef LPWSTR (__stdcall * Test_Del_MarshalStrB_InOut)(/*[in,out]*/ LPWSTR s);
+extern "C" DLL_EXPORT BOOL NATIVEAPI ReverseP_MarshalStrB_InOut(Test_Del_MarshalStrB_InOut d, /*[in]*/ LPCWSTR s)
{
- LPTSTR ret = d((LPTSTR)s);
- LPTSTR expectedret =(LPTSTR)W("Native");
- LPTSTR expectedstr = (LPTSTR)W("m");
+ LPWSTR ret = d((LPWSTR)s);
+ LPWSTR expectedret =(LPWSTR)W("Native");
+ LPWSTR expectedstr = (LPWSTR)W("m");
- size_t lenret = _tcslen(ret);
- size_t lenexpectedret = _tcslen(expectedret);
- if((lenret != lenexpectedret)||(_tcsncmp(ret,expectedret,lenret)!=0))
+ size_t lenret = wcslen(ret);
+ size_t lenexpectedret = wcslen(expectedret);
+ if((lenret != lenexpectedret)||(wcsncmp(ret,expectedret,lenret)!=0))
{
printf("Error in ReverseP_MarshalStrB_InOut, Returned value didn't match\n");
return FALSE;
}
- size_t lenstr = _tcslen(s);
- size_t lenexpectedstr = _tcslen(expectedstr);
- if((lenstr != lenexpectedstr)||(_tcsncmp(s,expectedstr,lenstr)!=0))
+ size_t lenstr = wcslen(s);
+ size_t lenexpectedstr = wcslen(expectedstr);
+ if((lenstr != lenexpectedstr)||(wcsncmp(s,expectedstr,lenstr)!=0))
{
printf("Error in ReverseP_MarshalStrB_InOut, Changed value didn't reflect on native side.\n");
return FALSE;
@@ -126,25 +126,25 @@ extern "C" DLL_EXPORT BOOL NATIVEAPI ReverseP_MarshalStrB_InOut(Test_Del_Marshal
return TRUE;
}
-typedef LPTSTR (__cdecl * Test_Del_MarshalStrB_Out)(/*[out]*/ LPTSTR * s);
+typedef LPWSTR (__cdecl * Test_Del_MarshalStrB_Out)(/*[out]*/ LPWSTR * s);
extern "C" DLL_EXPORT BOOL NATIVEAPI ReverseP_MarshalStrB_Out(Test_Del_MarshalStrB_Out d)
{
- LPTSTR s;
- LPTSTR ret = d((LPTSTR*)&s);
- LPTSTR expectedret = (LPTSTR)W("Native");
- LPTSTR expectedstr = (LPTSTR)W("Managed");
-
- size_t lenret = _tcslen(ret);
- size_t lenexpectedret = _tcslen(expectedret);
- if((lenret != lenexpectedret)||(_tcsncmp(ret,expectedret,lenret)!=0))
+ LPWSTR s;
+ LPWSTR ret = d((LPWSTR*)&s);
+ LPWSTR expectedret = (LPWSTR)W("Native");
+ LPWSTR expectedstr = (LPWSTR)W("Managed");
+
+ size_t lenret = wcslen(ret);
+ size_t lenexpectedret = wcslen(expectedret);
+ if((lenret != lenexpectedret)||(wcsncmp(ret,expectedret,lenret)!=0))
{
printf("Error in ReverseP_MarshalStrB_Out, Returned value didn't match\n");
return FALSE;
}
- size_t lenstr = _tcslen(s);
- size_t lenexpectedstr = _tcslen(expectedstr);
- if((lenstr != lenexpectedstr)||(_tcsncmp(s,expectedstr,lenstr)!=0))
+ size_t lenstr = wcslen(s);
+ size_t lenexpectedstr = wcslen(expectedstr);
+ if((lenstr != lenexpectedstr)||(wcsncmp(s,expectedstr,lenstr)!=0))
{
printf("Error in ReverseP_MarshalStrB_Out, Changed value didn't reflect on native side.\n");
return FALSE;
diff --git a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs
index f54397b..f54397b 100755..100644
--- a/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs
+++ b/tests/src/Interop/StringMarshalling/LPTSTR/LPTSTRTestPInvokeDef.cs
diff --git a/tests/src/Interop/common/xplatform.h b/tests/src/Interop/common/xplatform.h
index 36c4e56..370ebe8 100644
--- a/tests/src/Interop/common/xplatform.h
+++ b/tests/src/Interop/common/xplatform.h
@@ -194,7 +194,9 @@ int wcsncpy_s(LPWSTR strDestination, size_t size1, LPCWSTR strSource)
}
-int wmemcmp(LPWSTR str1, LPWSTR str2,size_t len)
+#define wcsncmp wmemcmp
+
+int wmemcmp(LPCWSTR str1, LPCWSTR str2,size_t len)
{
// < 0 str1 less than str2
// 0 str1 identical to str2
diff --git a/tests/src/JIT/CheckProjects/CheckProjects.cs b/tests/src/JIT/CheckProjects/CheckProjects.cs
index dc44d2e..be42ab9 100644
--- a/tests/src/JIT/CheckProjects/CheckProjects.cs
+++ b/tests/src/JIT/CheckProjects/CheckProjects.cs
@@ -52,9 +52,9 @@ internal class ScanProjectFiles
if (binIndex < 0)
{
- Console.WriteLine("CORE_ROOT must be set to full path to repo test dir; was '{0}'.",
- coreRoot);
- return -1;
+ Console.WriteLine("No bin directory found in CORE_ROOT path `{0}`," +
+ " so no checking will be performed.", coreRoot);
+ return 100;
}
string repoRoot = coreRoot.Substring(0, binIndex);
@@ -78,8 +78,8 @@ internal class ScanProjectFiles
if (!Directory.Exists(projectRoot))
{
- Console.WriteLine("Project directory does not exist");
- return -1;
+ Console.WriteLine("Project directory does not exist, so no checking will be performed.");
+ return 100;
}
DirectoryInfo projectRootDir = new DirectoryInfo(projectRoot);
diff --git a/tests/src/JIT/Directed/pinvoke/calli_excep.il b/tests/src/JIT/Directed/pinvoke/calli_excep.il
index 157643f..8768344 100644
--- a/tests/src/JIT/Directed/pinvoke/calli_excep.il
+++ b/tests/src/JIT/Directed/pinvoke/calli_excep.il
@@ -33,7 +33,7 @@
int32 V_1)
.try
{
- ldc.i4 0xc0000005
+ ldc.i4 0xC0000017
ldc.i4.0
dup
dup
@@ -44,7 +44,7 @@
calli void (unsigned int32, unsigned int32, unsigned int32, native uint)
leave.s IL_001d
} // end .try
- catch [mscorlib]System.AccessViolationException
+ catch [mscorlib]System.OutOfMemoryException
{
IL_000f: stloc.0
IL_0010: ldloc.0
diff --git a/tests/src/JIT/Performance/CodeQuality/Span/Indexer.cs b/tests/src/JIT/Performance/CodeQuality/Span/Indexer.cs
new file mode 100644
index 0000000..4a7264b
--- /dev/null
+++ b/tests/src/JIT/Performance/CodeQuality/Span/Indexer.cs
@@ -0,0 +1,1021 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.Linq;
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+using System.Text;
+using Xunit;
+using Microsoft.Xunit.Performance;
+
+[assembly: OptimizeForBenchmarks]
+[assembly: MeasureInstructionsRetired]
+
+namespace Span
+{
+ class Sink
+ {
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ public static Sink NewSink() { return new Sink(); }
+
+ public byte b;
+ public int i;
+ }
+
+ [AttributeUsage(AttributeTargets.Method, Inherited = false)]
+ class CategoryAttribute : Attribute
+ {
+ public CategoryAttribute(string name)
+ {
+ _name = name;
+ }
+ string _name;
+ public string Name => _name;
+ }
+
+ public class IndexerBench
+ {
+ const int Iterations = 1000000;
+ const int DefaultLength = 1024;
+ const byte Expected = 70;
+ static bool HasFailure = false;
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Ref(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestRef(s);
+ }
+ return result;
+ },
+ "Ref({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestRef(Span<byte> data)
+ {
+ ref byte p = ref data.DangerousGetPinnableReference();
+ int length = data.Length;
+ byte x = 0;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= Unsafe.Add(ref p, idx);
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Fixed1(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestFixed1(s);
+ }
+ return result;
+ },
+ "Fixed1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static unsafe byte TestFixed1(Span<byte> data)
+ {
+ fixed (byte* pData = &data.DangerousGetPinnableReference())
+ {
+ int length = data.Length;
+ byte x = 0;
+ byte* p = pData;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= *(p + idx);
+ }
+
+ return x;
+ }
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Fixed2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestFixed2(s);
+ }
+ return result;
+ },
+ "Fixed2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static unsafe byte TestFixed2(Span<byte> data)
+ {
+ fixed (byte* pData = &data.DangerousGetPinnableReference())
+ {
+ int length = data.Length;
+ byte x = 0;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= pData[idx];
+ }
+
+ return x;
+ }
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer1(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestIndexer1(s);
+ }
+ return result;
+ },
+ "Indexer1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer1(Span<byte> data)
+ {
+ int length = data.Length;
+ byte x = 0;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= data[idx];
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestIndexer2(s);
+ }
+ return result;
+ },
+ "Indexer2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer2(Span<byte> data)
+ {
+ byte x = 0;
+
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer3(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestIndexer3(s);
+ }
+ return result;
+ },
+ "Indexer3({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer3(Span<byte> data)
+ {
+ Span<byte> data2 = data;
+
+ byte x = 0;
+
+ for (var idx = 0; idx < data2.Length; idx++)
+ {
+ x ^= data2[idx];
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount=Iterations / 10)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer4(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ int inner = Math.Max(1, (innerIterationCount / 10));
+ for (int i = 0; i < inner ; ++i)
+ {
+ result = TestIndexer4(s, 10);
+ }
+ return result;
+ },
+ "Indexer4({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer4(Span<byte> data, int iterations)
+ {
+ byte x = 0;
+ int length = data.Length;
+
+ // This does more or less the same work as TestIndexer1
+ // but is expressed as a loop nest.
+ for (int i = 0; i < iterations; i++)
+ {
+ x = 0;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= data[idx];
+ }
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer5(int length)
+ {
+ byte[] a = GetData(length);
+ int z = 0;
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestIndexer5(s, out z);
+ }
+ return result;
+ },
+ "Indexer5({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer5(Span<byte> data, out int z)
+ {
+ byte x = 0;
+ z = -1;
+
+ // Write to z here should not be able to modify
+ // the span.
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ z = idx;
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void Indexer6(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestIndexer6(s);
+ }
+ return result;
+ },
+ "Indexer6({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestIndexer6(Span<byte> data)
+ {
+ byte x = 0;
+ Sink s = Sink.NewSink();
+
+ // Write to s.i here should not be able to modify
+ // the span.
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ s.i = 0;
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void ReadOnlyIndexer1(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ ReadOnlySpan<byte> s = new ReadOnlySpan<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestReadOnlyIndexer1(s);
+ }
+ return result;
+ },
+ "ReadOnlyIndexer1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestReadOnlyIndexer1(ReadOnlySpan<byte> data)
+ {
+ int length = data.Length;
+ byte x = 0;
+
+ for (var idx = 0; idx < length; idx++)
+ {
+ x ^= data[idx];
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination")]
+ public static void ReadOnlyIndexer2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ ReadOnlySpan<byte> s = new ReadOnlySpan<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestReadOnlyIndexer2(s);
+ }
+ return result;
+ },
+ "ReadOnlyIndexer2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestReadOnlyIndexer2(ReadOnlySpan<byte> data)
+ {
+ byte x = 0;
+
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination w/ writes")]
+ public static void WriteViaIndexer1(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestWriteViaIndexer1(s);
+ }
+ return result;
+ },
+ "WriteViaIndexer1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestWriteViaIndexer1(Span<byte> data)
+ {
+ byte q = data[0];
+
+ for (var idx = 1; idx < data.Length; idx++)
+ {
+ data[0] ^= data[idx];
+ }
+
+ byte x = data[0];
+ data[0] = q;
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Indexer in-loop bounds check elimination w/ writes")]
+ public static void WriteViaIndexer2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestWriteViaIndexer2(s, 0, length);
+ }
+ return result;
+ },
+ "WriteViaIndexer2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestWriteViaIndexer2(Span<byte> data, int start, int end)
+ {
+ byte x = 0;
+
+ for (var idx = start; idx < end; idx++)
+ {
+ // Bounds checks are redundant
+ byte b = data[idx];
+ x ^= b;
+ data[idx] = b;
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Span known size bounds check elimination")]
+ public static void KnownSizeArray(int length)
+ {
+ if (length != 1024)
+ {
+ throw new Exception("test requires 1024 byte length");
+ }
+
+ Invoke((int innerIterationCount) =>
+ {
+ byte result = TestKnownSizeArray(innerIterationCount);
+ return result;
+ },
+ "KnownSizeArray({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestKnownSizeArray(int innerIterationCount)
+ {
+ byte[] a = new byte[1024];
+ SetData(a);
+ Span<byte> data = new Span<byte>(a);
+ byte x = 0;
+
+ for (int i = 0; i < innerIterationCount; i++)
+ {
+ x = 0;
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ }
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Span known size bounds check elimination")]
+ public static void KnownSizeCtor(int length)
+ {
+ if (length < 1024)
+ {
+ throw new Exception("test requires at least 1024 byte length");
+ }
+
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ byte result = TestKnownSizeCtor(a, innerIterationCount);
+ return result;
+ },
+ "KnownSizeCtor({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestKnownSizeCtor(byte[] a, int innerIterationCount)
+ {
+ Span<byte> data = new Span<byte>(a, 0, 1024);
+ byte x = 0;
+
+ for (int i = 0; i < innerIterationCount; i++)
+ {
+ x = 0;
+ for (var idx = 0; idx < data.Length; idx++)
+ {
+ x ^= data[idx];
+ }
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Span known size bounds check elimination")]
+ public static void KnownSizeCtor2(int length)
+ {
+ if (length < 1024)
+ {
+ throw new Exception("test requires at least 1024 byte length");
+ }
+
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ byte result = TestKnownSizeCtor2(a, innerIterationCount);
+ return result;
+ },
+ "KnownSizeCtor2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestKnownSizeCtor2(byte[] a, int innerIterationCount)
+ {
+ Span<byte> data1 = new Span<byte>(a, 0, 512);
+ Span<byte> data2 = new Span<byte>(a, 512, 512);
+ byte x = 0;
+
+ for (int i = 0; i < innerIterationCount; i++)
+ {
+ x = 0;
+ for (var idx = 0; idx < data1.Length; idx++)
+ {
+ x ^= data1[idx];
+ }
+ for (var idx = 0; idx < data2.Length; idx++)
+ {
+ x ^= data2[idx];
+ }
+ }
+
+ return x;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Same index in-loop redundant bounds check elimination")]
+ public static void SameIndex1(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestSameIndex1(s, 0, length);
+ }
+ return result;
+ },
+ "SameIndex1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestSameIndex1(Span<byte> data, int start, int end)
+ {
+ byte x = 0;
+ byte y = 0;
+
+ for (var idx = start; idx < end; idx++)
+ {
+ x ^= data[idx];
+ y ^= data[idx];
+ }
+
+ byte t = (byte)(y ^ x ^ y);
+
+ return t;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Same index in-loop redundant bounds check elimination")]
+ public static void SameIndex2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestSameIndex2(s, ref s[0], 0, length);
+ }
+ return result;
+ },
+ "SameIndex2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestSameIndex2(Span<byte> data, ref byte b, int start, int end)
+ {
+ byte x = 0;
+ byte y = 0;
+ byte ye = 121;
+ byte q = data[0];
+
+ for (var idx = start; idx < end; idx++)
+ {
+ // Bounds check is redundant, but values are not CSEs.
+ x ^= data[idx];
+ b = 1;
+ y ^= data[idx];
+ }
+
+ byte t = (byte)(y ^ x ^ ye);
+ data[0] = q;
+
+ return t;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Covered index in-loop redundant bounds check elimination")]
+ public static void CoveredIndex1(int length)
+ {
+ if (length < 100)
+ {
+ throw new Exception("test requires at least 100 byte length");
+ }
+
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestCoveredIndex1(s, 0, length);
+ }
+ return result;
+ },
+ "CoveredIndex1({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestCoveredIndex1(Span<byte> data, int start, int end)
+ {
+ byte x = 0;
+ byte y = 0;
+
+ for (var idx = start; idx < end - 100; idx++)
+ {
+ x ^= data[idx + 100];
+ y ^= data[idx];
+ }
+
+ for (var idx = end - 100; idx < end; idx++)
+ {
+ y ^= data[idx];
+ x ^= data[idx - 100];
+ }
+
+ byte r = (byte)(x ^ y ^ x);
+
+ return r;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Covered index in-loop redundant bounds check elimination")]
+ public static void CoveredIndex2(int length)
+ {
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestCoveredIndex2(s, 0, length);
+ }
+ return result;
+ },
+ "CoveredIndex2({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestCoveredIndex2(Span<byte> data, int start, int end)
+ {
+ byte x = 0;
+ byte y = 0;
+
+ for (var idx = start; idx < end; idx++)
+ {
+ x ^= data[idx];
+
+ if (idx != 100)
+ {
+ // Should be able to eliminate this bounds check
+ y ^= data[0];
+ }
+ }
+
+ byte r = (byte)(y ^ x ^ y);
+
+ return r;
+ }
+
+ [Benchmark(InnerIterationCount = Iterations)]
+ [InlineData(DefaultLength)]
+ [Category("Covered index in-loop redundant bounds check elimination")]
+ public static void CoveredIndex3(int length)
+ {
+ if (length < 50)
+ {
+ throw new Exception("test requires at least 100 byte length");
+ }
+
+ byte[] a = GetData(length);
+
+ Invoke((int innerIterationCount) =>
+ {
+ Span<byte> s = new Span<byte>(a);
+ byte result = 0;
+ for (int i = 0; i < innerIterationCount; ++i)
+ {
+ result = TestCoveredIndex3(s, 0, length);
+ }
+ return result;
+ },
+ "CoveredIndex3({0})", length);
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static byte TestCoveredIndex3(Span<byte> data, int start, int end)
+ {
+ byte x = 0;
+ byte y = 0;
+ byte z = 0;
+
+ for (var idx = start; idx < end; idx++)
+ {
+ x ^= data[idx];
+
+ if (idx != 100)
+ {
+ y ^= data[50];
+ // Should be able to eliminate this bounds check
+ z ^= data[25];
+ }
+ }
+
+ byte r = (byte)(z ^ y ^ x ^ y ^ z);
+
+ return r;
+ }
+
+ // Invoke routine to abstract away the difference between running under xunit-perf vs running from the
+ // command line. Inner loop to be measured is taken as an Func<int, byte>, and invoked passing the number
+ // of iterations that the inner loop should execute.
+ static void Invoke(Func<int, byte> innerLoop, string nameFormat, params object[] nameArgs)
+ {
+ if (IsXunitInvocation)
+ {
+ foreach (var iteration in Benchmark.Iterations)
+ using (iteration.StartMeasurement())
+ innerLoop((int)Benchmark.InnerIterationCount);
+ }
+ else
+ {
+ if (DoWarmUp)
+ {
+ // Run some warm-up iterations before measuring
+ innerLoop(CommandLineInnerIterationCount);
+ // Clear the flag since we're now warmed up (caller will
+ // reset it before calling new code)
+ DoWarmUp = false;
+ }
+
+ // Now do the timed run of the inner loop.
+ Stopwatch sw = Stopwatch.StartNew();
+ byte check = innerLoop(CommandLineInnerIterationCount);
+ sw.Stop();
+
+ // Print result.
+ string name = String.Format(nameFormat, nameArgs);
+ double timeInMs = sw.Elapsed.TotalMilliseconds;
+ Console.Write("{0,25}: {1,7:F2}ms", name, timeInMs);
+
+ bool failed = (check != Expected);
+ if (failed)
+ {
+ Console.Write(" -- failed to validate, got {0} expected {1}", check, Expected);
+ HasFailure = true;
+ }
+ Console.WriteLine();
+ }
+ }
+
+ static byte[] GetData(int size)
+ {
+ byte[] data = new byte[size];
+ SetData(data);
+ return data;
+ }
+
+ static void SetData(byte[] data)
+ {
+ Random Rnd = new Random(42);
+ Rnd.NextBytes(data);
+ }
+
+ static bool IsXunitInvocation = true;
+ static int CommandLineInnerIterationCount = 1;
+ static bool DoWarmUp;
+
+ public static void Usage()
+ {
+ Console.WriteLine(" pass -bench for benchmark mode w/default iterations");
+ Console.WriteLine(" pass [#iterations] for benchmark mode w/iterations");
+ Console.WriteLine();
+ }
+
+ public static int Main(string[] args)
+ {
+ if (args.Length > 0)
+ {
+ if (args[0].Equals("-bench"))
+ {
+ CommandLineInnerIterationCount = Iterations;
+ }
+ else
+ {
+ bool parsed = Int32.TryParse(args[0], out CommandLineInnerIterationCount);
+ if (!parsed)
+ {
+ Usage();
+ return -1;
+ }
+ }
+
+ Console.WriteLine("Running as command line perf test: {0} iterations",
+ CommandLineInnerIterationCount);
+ Console.WriteLine();
+ }
+ else
+ {
+ Console.WriteLine("Running as correctness test: {0} iterations",
+ CommandLineInnerIterationCount);
+ Usage();
+ }
+
+ // When we call into Invoke, it'll need to know this isn't xunit-perf running
+ IsXunitInvocation = false;
+
+ // Discover what tests to run via reflection
+ TypeInfo t = typeof(IndexerBench).GetTypeInfo();
+
+ var testsByCategory = new Dictionary<string, List<MethodInfo>>();
+
+ // Do a first pass to find out what categories of benchmarks we have.
+ foreach(MethodInfo m in t.DeclaredMethods)
+ {
+ BenchmarkAttribute benchAttr = m.GetCustomAttribute<BenchmarkAttribute>();
+ if (benchAttr != null)
+ {
+ string category = "none";
+ CategoryAttribute categoryAttr = m.GetCustomAttribute<CategoryAttribute>();
+ if (categoryAttr != null)
+ {
+ category = categoryAttr.Name;
+ }
+
+ List<MethodInfo> tests = null;
+
+ if (!testsByCategory.ContainsKey(category))
+ {
+ tests = new List<MethodInfo>();
+ testsByCategory.Add(category, tests);
+ }
+ else
+ {
+ tests = testsByCategory[category];
+ }
+
+ tests.Add(m);
+ }
+ }
+
+ foreach(string categoryName in testsByCategory.Keys)
+ {
+ Console.WriteLine("**** {0} ****", categoryName);
+
+ foreach(MethodInfo m in testsByCategory[categoryName])
+ {
+ // Request a warm-up iteration before measuring this benchmark method.
+ DoWarmUp = true;
+
+ // Get the benchmark to measure as a delegate taking the number of inner-loop iterations to run
+ var invokeMethod = m.CreateDelegate(typeof(Action<int>)) as Action<int>;
+
+ // All the benchmarks methods in this test use [InlineData] to specify how many times and with
+ // what arguments they should be run.
+ foreach (InlineDataAttribute dataAttr in m.GetCustomAttributes<InlineDataAttribute>())
+ {
+ foreach (object[] data in dataAttr.GetData(m))
+ {
+ // All the benchmark methods in this test take a single int parameter
+ invokeMethod((int)data[0]);
+ }
+ }
+ }
+
+ Console.WriteLine();
+ }
+
+ if (HasFailure)
+ {
+ Console.WriteLine("Some tests failed validation");
+ return -1;
+ }
+
+ return 100;
+ }
+ }
+}
diff --git a/tests/src/JIT/Performance/CodeQuality/Span/Indexer.csproj b/tests/src/JIT/Performance/CodeQuality/Span/Indexer.csproj
new file mode 100644
index 0000000..a871713
--- /dev/null
+++ b/tests/src/JIT/Performance/CodeQuality/Span/Indexer.csproj
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <!-- Always use latest Roslyn compiler -->
+ <Import Project="..\..\..\..\..\..\Tools\net46\roslyn\build\Microsoft.Net.Compilers.props"/>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.props))\dir.props" />
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{95DFC527-4DC1-495E-97D7-E94EE1F7140D}</ProjectGuid>
+ <OutputType>Exe</OutputType>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetTargetMoniker>.NETStandard,Version=v1.4</NuGetTargetMoniker>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ </PropertyGroup>
+ <PropertyGroup>
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Indexer.cs" />
+ </ItemGroup>
+ <PropertyGroup>
+ <ProjectJson>$(JitPackagesConfigFileDirectory)benchmark\project.json</ProjectJson>
+ <ProjectLockJson>$(JitPackagesConfigFileDirectory)benchmark\project.lock.json</ProjectLockJson>
+ </PropertyGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Performance/RunBenchmarks/RunBenchmarks.cs b/tests/src/JIT/Performance/RunBenchmarks/RunBenchmarks.cs
index d5920e4..a1ffb56 100644
--- a/tests/src/JIT/Performance/RunBenchmarks/RunBenchmarks.cs
+++ b/tests/src/JIT/Performance/RunBenchmarks/RunBenchmarks.cs
@@ -70,11 +70,11 @@
//
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
+using System.Linq;
using System.Xml;
-using System.Xml.XPath;
+using System.Xml.Linq;
using System.IO;
namespace BenchmarkConsoleApplication
@@ -497,115 +497,6 @@ namespace BenchmarkConsoleApplication
}
}
- // XML processing, select a single node given root node and xpath field name.
-
- public XmlNode SelectSingleNode
- (
- XmlNode node,
- string xpath
- )
- {
-#if DESKTOP
- return node.SelectSingleNode(xpath);
-#else
- return XmlDocumentXPathExtensions.SelectSingleNode(node, xpath);
-#endif
- }
-
- // XML processing, get a string field value given a node and xpath field name.
- // Can be optional field.
-
- public string GetField
- (
- XmlNode node,
- string xpath,
- bool optional = false
- )
- {
- XmlNode fieldNode = SelectSingleNode(node, xpath);
- if (fieldNode == null)
- {
- if (optional)
- {
- return "";
- }
- throw new Exception("missing field: " + xpath);
- }
-
- return fieldNode.InnerText;
- }
-
- // XML processing, get a boolean field value given a node and xpath field name.
- // Can be optional field.
-
- public bool GetBooleanField
- (
- XmlNode node,
- string xpath,
- bool optional = false
- )
- {
- string value = GetField(node, xpath, optional);
-
- if (value == "true")
- return true;
- if (value == "false")
- return false;
- if (optional)
- return false;
-
- throw new Exception("bad boolean value: " + value);
- }
-
- // XML processing, get an integer field value given a node and xpath field name.
- // Can be optional field.
-
- public int GetIntegerField
- (
- XmlNode node,
- string xpath,
- bool optional = false
- )
- {
- string value = GetField(node, xpath, optional);
-
- if (value != "")
- {
- int number = Int32.Parse(value);
- return number;
- }
- if (optional)
- return 0;
-
- throw new Exception("bad integer value: " + value);
- }
-
- // XML processing, select a list of nodes given root node and xpath field name.
-
- public XmlNodeList SelectNodes
- (
- XmlNode node,
- string xpath
- )
- {
-#if DESKTOP
- return node.SelectNodes(xpath);
-#else
- return XmlDocumentXPathExtensions.SelectNodes(node, xpath);
-#endif
- }
-
- // XML processing, get a list of nodes given root node and xpath field name.
-
- public XmlNodeList GetList
- (
- XmlNode node,
- string xpath
- )
- {
- return SelectNodes(node, xpath);
- }
-
// Exit benchmark system with specified exit code.
public int Exit(int exitCode)
@@ -657,6 +548,45 @@ namespace BenchmarkConsoleApplication
return platformSpecificDirectoryName;
}
+ public static bool GetBool
+ (
+ XElement node,
+ string name,
+ bool optional = true
+ )
+ {
+ string value = node.Element(name)?.Value;
+
+ if (value == "true")
+ return true;
+ if (value == "false")
+ return false;
+ if (optional)
+ return false;
+
+ throw new Exception("bad boolean value: " + value);
+ }
+
+ public static int GetInteger
+ (
+ XElement node,
+ string name,
+ bool optional = true
+ )
+ {
+ string value = node.Element(name)?.Value;
+
+ if (value != "")
+ {
+ int number = Int32.Parse(value);
+ return number;
+ }
+ if (optional)
+ return 0;
+
+ throw new Exception("bad integer value: " + value);
+ }
+
// Build list of benchmarks by reading in and processing .XML file.
public void BuildBenchmarksList()
@@ -691,9 +621,7 @@ namespace BenchmarkConsoleApplication
// Load XML description of benchmarks.
- XmlDocument benchmarkXml = new XmlDocument();
- var xmlFile = new FileStream(benchmarkXmlFullFileName, FileMode.Open, FileAccess.Read);
- benchmarkXml.Load(xmlFile);
+ XElement benchmarkXml = XElement.Load(benchmarkXmlFullFileName);
// Get root directory for benchmark system. Command line argument overrides
// specification in benchmark control file.
@@ -701,7 +629,7 @@ namespace BenchmarkConsoleApplication
benchmarkRootDirectoryName = Controls.BenchmarksRootDirectory;
if (benchmarkRootDirectoryName == "")
{
- benchmarkRootDirectoryName = GetField(benchmarkXml.DocumentElement, "benchmark-root-directory");
+ benchmarkRootDirectoryName =
Controls.BenchmarksRootDirectory = benchmarkRootDirectoryName;
}
benchmarkRootDirectoryName = PlatformSpecificDirectoryName(benchmarkRootDirectoryName);
@@ -709,26 +637,26 @@ namespace BenchmarkConsoleApplication
// Process each benchmark suite in the list of benchmark suites.
- XmlNodeList benchmarkSuiteList = GetList(benchmarkXml.DocumentElement, "benchmark-suite");
- foreach (XmlNode benchmarkSuite in benchmarkSuiteList)
+ var benchmarkSuiteList = from e in benchmarkXml.Descendants("benchmark-suite") select e;
+ foreach (XElement benchmarkSuite in benchmarkSuiteList)
{
- benchmarkSuiteName = GetField(benchmarkSuite, "name");
+ benchmarkSuiteName = benchmarkSuite.Element("name").Value;
//Process each benchmark in benchmark suite.
- XmlNodeList benchmarkList = GetList(benchmarkSuite, "benchmark");
- foreach (XmlNode benchmark in benchmarkList)
+ var benchmarkList = from e in benchmarkSuite.Descendants("benchmark") select e;
+ foreach (XElement benchmark in benchmarkList)
{
- benchmarkName = GetField(benchmark, "name");
- benchmarkDirectoryName = GetField(benchmark, "directory", OptionalField);
+ benchmarkName = benchmark.Element("name").Value;
+ benchmarkDirectoryName = benchmark.Element("directory")?.Value ?? "";
benchmarkDirectoryName = PlatformSpecificDirectoryName(benchmarkDirectoryName);
- benchmarkExecutableName = GetField(benchmark, "executable");
- benchmarkArgs = GetField(benchmark, "args", OptionalField);
- useSSE = GetBooleanField(benchmark, "useSSE", OptionalField);
- useAVX = GetBooleanField(benchmark, "useAVX", OptionalField);
- expectedResults = GetIntegerField(benchmark, "expected-results", OptionalField);
- doRunInShell = GetBooleanField(benchmark, "run-in-shell", OptionalField);
- tags = GetField(benchmark, "tags", OptionalField);
+ benchmarkExecutableName = benchmark.Element("executable").Value;
+ benchmarkArgs = benchmark.Element("args")?.Value ?? "";
+ useSSE = GetBool(benchmark, "useSSE");
+ useAVX = GetBool(benchmark, "useAVX");
+ doRunInShell = GetBool(benchmark, "run-in-shell");
+ expectedResults = GetInteger(benchmark, "expected-results");
+ tags = benchmark.Element("tags")?.Value ?? "";
AddBenchmark(benchmarkName, benchmarkSuiteName, tags, benchmarkDirectoryName,
benchmarkExecutableName, benchmarkArgs, doRunInShell, useSSE, useAVX, expectedResults);
}
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.il b/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.il
new file mode 100644
index 0000000..95d40b6
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.il
@@ -0,0 +1,147 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+.assembly extern mscorlib{}
+.assembly ILGEN_MODULE{}
+
+// This test originally failed compilation during CSE due to value numbers that were discarded during remorphing.
+// The arguments to and return value from `ILGEN_METHOD` are not meaningful; it is enough that this function
+// compiles successfully.
+
+.class ILGEN_CLASS
+{
+ .method static float32 ILGEN_METHOD(int16, char, char, native int)
+ {
+ .maxstack 65535
+ .locals init (int8, native unsigned int, int64, int8, bool, unsigned int64, char, float64, int64, native int, float32, int64, int64, unsigned int16)
+
+ IL_0000: ldloc 0x000d
+ IL_0004: not
+ IL_0005: ldloc.s 0x06
+ IL_0007: cgt.un
+ IL_0009: ldloc.s 0x06
+ IL_000b: clt.un
+ IL_000d: conv.r4
+ IL_000e: ldloc.s 0x08
+ IL_0010: conv.r.un
+ IL_0011: mul
+ IL_0012: conv.i8
+ IL_0013: ldloc.s 0x03
+ IL_0015: conv.u1
+ IL_0016: not
+ IL_0017: ldloc.s 0x00
+ IL_0019: ldloc.s 0x07
+ IL_001b: neg
+ IL_001c: conv.u1
+ IL_001d: xor
+ IL_001e: sub
+ IL_001f: ldloc 0x000c
+ IL_0023: neg
+ IL_0024: conv.i8
+ IL_0025: ldloc.s 0x07
+ IL_0027: neg
+ IL_0028: conv.u8
+ IL_0029: conv.i8
+ IL_002a: ldc.i4 0x2487c9b5
+ IL_002f: conv.i8
+ IL_0030: rem.un
+ IL_0031: ldloc.s 0x09
+ IL_0033: conv.i8
+ IL_0034: ldloc.s 0x01
+ IL_0036: neg
+ IL_0037: not
+ IL_0038: ldloc 0x0006
+ IL_003c: mul
+ IL_003d: shr.un
+ IL_003e: add
+ IL_003f: ldloc.s 0x0b
+ IL_0041: conv.i4
+ IL_0042: shr.un
+ IL_0043: ldarg.s 0x03
+ IL_0045: conv.i4
+ IL_0046: ldloc.s 0x00
+ IL_0048: clt
+ IL_004a: neg
+ IL_004b: ldloc.s 0x09
+ IL_004d: pop
+ IL_004e: conv.r.un
+ IL_004f: conv.u8
+ IL_0050: ldloc.s 0x05
+ IL_0052: mul
+ IL_0053: ldloc.s 0x0c
+ IL_0055: conv.i8
+ IL_0056: not
+ IL_0057: cgt.un
+ IL_0059: neg
+ IL_005a: nop
+ IL_005b: shl
+ IL_005c: ldc.i8 0x6ddee7e52bcb7a50
+ IL_0065: ldloc 0x0004
+ IL_0069: shr.un
+ IL_006a: pop
+ IL_006b: and
+ IL_006c: conv.u2
+ IL_006d: add
+ IL_006e: ldarg.s 0x02
+ IL_0070: not
+ IL_0071: neg
+ IL_0072: pop
+ IL_0073: ldarg.s 0x01
+ IL_0075: ldloc 0x0008
+ IL_0079: ldloc 0x000b
+ IL_007d: clt
+ IL_007f: conv.r.un
+ IL_0080: pop
+ IL_0081: ldloc 0x000c
+ IL_0085: not
+ IL_0086: ldloc.s 0x0c
+ IL_0088: conv.u8
+ IL_0089: mul
+ IL_008a: ldloc 0x000b
+ IL_008e: add
+ IL_008f: ldloc 0x0002
+ IL_0093: ldloc.s 0x0b
+ IL_0095: rem
+ IL_0096: ldc.i8 0xfe6f83985a745065
+ IL_009f: add
+ IL_00a0: neg
+ IL_00a1: cgt.un
+ IL_00a3: shr
+ IL_00a4: conv.u8
+ IL_00a5: nop
+ IL_00a6: neg
+ IL_00a7: neg
+ IL_00a8: pop
+ IL_00a9: shr
+ IL_00aa: nop
+ IL_00ab: conv.r.un
+ IL_00ac: ret
+ }
+
+ .method public static int32 Main()
+ {
+ .entrypoint
+
+ .try
+ {
+ ldc.i4 0
+ ldc.i4 0
+ ldc.i4 0
+ ldc.i4 0
+ conv.i
+ call float32 ILGEN_CLASS::ILGEN_METHOD(int16, char, char, native int)
+ pop
+ leave done
+ }
+ catch [mscorlib]System.Exception
+ {
+ pop
+ leave done
+ }
+
+ done:
+ ldc.i4 100
+ ret
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.ilproj
new file mode 100644
index 0000000..c722432
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_397793/DevDiv_397793.ilproj
@@ -0,0 +1,34 @@
+<?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>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ </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>
+ <DebugType>PdbOnly</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_397793.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' "></PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.il b/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.il
new file mode 100644
index 0000000..a7eaea4
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.il
@@ -0,0 +1,83 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+
+// Metadata version: v4.0.30319
+.assembly extern System.Runtime
+{
+ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
+ .ver 4:2:0:0
+}
+.assembly extern System.Console
+{
+ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
+ .ver 4:1:0:0
+}
+.assembly DevDiv_406160
+{
+}
+
+.class private auto ansi beforefieldinit Bug.Program
+ extends [System.Runtime]System.Object
+{
+ .method static char ILGEN_METHOD(int16, unsigned int16, native unsigned int)
+ {
+ .maxstack 65535
+ .locals init (bool, int64, native unsigned int)
+ IL_0000: ldarg.s 0x00
+ IL_0002: ldc.i4.1
+ IL_0015: clt
+ IL_001b: starg.s 0x00
+ IL_001d: ldloc 0x0001
+ IL_0067: ldc.i8 0xc3ec93cfd869ae83
+ IL_0072: ldc.r8 float64(0xb47a62a75e195a1c)
+ IL_007c: conv.ovf.u8
+ IL_007d: ldc.i4.1
+ IL_0081: conv.ovf.i8.un
+ IL_0088: div.un
+ IL_0089: add.ovf.un
+ IL_008c: ldloc 0x0001
+ IL_009a: ldc.i8 0x97a27f9613c909c1
+ IL_00a3: dup
+ IL_00a4: clt
+ IL_00a6: shr.un
+ IL_00a7: xor
+ IL_00a8: ldarg.s 0x00
+ IL_00aa: conv.ovf.u8.un
+ IL_00ab: and
+ IL_00ac: ldloc.s 0x01
+ IL_00ae: and
+ IL_00af: conv.ovf.i2.un
+ IL_00b0: xor
+ IL_00cd: conv.i4
+ IL_00ce: ret
+ }
+
+ .method public hidebysig static int32 Main() cil managed
+ {
+ .entrypoint
+ // Code size 22 (0x16)
+ .maxstack 8
+ IL_0001: ldc.i4.0
+ IL_0002: ldc.i4.0
+ IL_0003: ldc.i4.0
+ IL_0004: call char Bug.Program::ILGEN_METHOD(int16, unsigned int16, native unsigned int)
+ IL_0005: pop
+ IL_0009: ldstr "Pass"
+ IL_000e: call void [System.Console]System.Console::WriteLine(string)
+ IL_0013: ldc.i4.s 100
+ IL_0015: ret
+ } // end of method Program::Main
+
+ .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 [System.Runtime]System.Object::.ctor()
+ IL_0006: ret
+ } // end of method Program::.ctor
+
+} // end of class Bug.Program \ No newline at end of file
diff --git a/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.ilproj b/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.ilproj
new file mode 100644
index 0000000..310db80
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/DevDiv_406160/DevDiv_406160.ilproj
@@ -0,0 +1,37 @@
+<?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>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ </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>
+ <DebugType>None</DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="DevDiv_406160.il" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.cs b/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.cs
new file mode 100644
index 0000000..2a72bd8
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.cs
@@ -0,0 +1,58 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+using System.Runtime.CompilerServices;
+
+// This test checks whether or not the JIT properly spills side effects in the importer when dumping multi-reg values
+// to temps. If the JIT does not do so correctly, the calls to GetString() and GetDecimal() will be reordered and the
+// test will fail with exit code 0; if it does do so correctly, the calls will not be reordered and the test will
+// pass.
+
+class Test
+{
+ abstract class ValueSourceBase
+ {
+ public abstract string GetString();
+ public abstract decimal GetDecimal();
+ public abstract int GetReturnValue();
+ }
+
+ class ValueSource : ValueSourceBase
+ {
+ int rv;
+
+ public override string GetString()
+ {
+ rv = 0;
+ return "";
+ }
+
+ public override decimal GetDecimal()
+ {
+ rv = 100;
+ return 0;
+ }
+
+ public override int GetReturnValue()
+ {
+ return rv;
+ }
+ }
+
+ Test(string s, decimal d)
+ {
+ }
+
+ [MethodImpl(MethodImplOptions.NoInlining)]
+ static int M(ValueSourceBase vs)
+ {
+ new Test(vs.GetString(), vs.GetDecimal());
+ return vs.GetReturnValue();
+ }
+
+ static int Main()
+ {
+ return M(new ValueSource());
+ }
+}
diff --git a/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.csproj b/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.csproj
new file mode 100644
index 0000000..ef69a3b
--- /dev/null
+++ b/tests/src/JIT/Regression/JitBlue/GitHub_10940/GitHub_10940.csproj
@@ -0,0 +1,42 @@
+<?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\11.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>
+ <DebugType></DebugType>
+ <Optimize>True</Optimize>
+ </PropertyGroup>
+ <ItemGroup>
+ <Compile Include="GitHub_10940.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+ <PropertyGroup Condition=" '$(MsBuildProjectDirOverride)' != '' ">
+ </PropertyGroup>
+</Project>
diff --git a/tests/src/JIT/config/benchmark+roslyn/project.json b/tests/src/JIT/config/benchmark+roslyn/project.json
index 7940c40..18907a1 100644
--- a/tests/src/JIT/config/benchmark+roslyn/project.json
+++ b/tests/src/JIT/config/benchmark+roslyn/project.json
@@ -1,20 +1,20 @@
{
"dependencies": {
"Microsoft.CodeAnalysis.Compilers": "1.1.1",
- "xunit.performance.api": "1.0.0-alpha-build0049",
- "xunit.performance.core": "1.0.0-alpha-build0049",
- "xunit.performance.execution": "1.0.0-alpha-build0049",
- "xunit.performance.metrics": "1.0.0-alpha-build0049",
+ "xunit.performance.api": "1.0.0-beta-build0003",
+ "xunit.performance.core": "1.0.0-beta-build0003",
+ "xunit.performance.execution": "1.0.0-beta-build0003",
+ "xunit.performance.metrics": "1.0.0-beta-build0003",
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.3-alpha-experimental",
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"System.Console": "4.4.0-beta-24913-02",
"System.Dynamic.Runtime": "4.4.0-beta-24913-02",
"System.Linq": "4.4.0-beta-24913-02",
"System.IO.FileSystem": "4.4.0-beta-24913-02",
- "System.Numerics.Vectors": "4.4.0-preview1-25210-01",
+ "System.Numerics.Vectors": "4.4.0-preview1-25221-01",
"System.Reflection": "4.4.0-beta-24913-02",
"System.Reflection.Extensions": "4.4.0-beta-24913-02",
- "System.Reflection.TypeExtensions": "4.4.0-preview1-25210-01",
+ "System.Reflection.TypeExtensions": "4.4.0-preview1-25221-01",
"System.Runtime": "4.4.0-beta-24913-02",
"System.Runtime.Extensions": "4.4.0-beta-24913-02",
"System.Runtime.Numerics": "4.4.0-beta-24913-02",
diff --git a/tests/src/JIT/config/benchmark+serialize/project.json b/tests/src/JIT/config/benchmark+serialize/project.json
index 49d20c2..b71701f 100644
--- a/tests/src/JIT/config/benchmark+serialize/project.json
+++ b/tests/src/JIT/config/benchmark+serialize/project.json
@@ -1,11 +1,11 @@
{
"dependencies": {
- "xunit.performance.api": "1.0.0-alpha-build0049",
- "xunit.performance.core": "1.0.0-alpha-build0049",
- "xunit.performance.execution": "1.0.0-alpha-build0049",
- "xunit.performance.metrics": "1.0.0-alpha-build0049",
+ "xunit.performance.api": "1.0.0-beta-build0003",
+ "xunit.performance.core": "1.0.0-beta-build0003",
+ "xunit.performance.execution": "1.0.0-beta-build0003",
+ "xunit.performance.metrics": "1.0.0-beta-build0003",
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.3-alpha-experimental",
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"Newtonsoft.Json": "7.0.1",
"System.Console": "4.4.0-beta-24913-02",
"System.IO": "4.4.0-beta-24913-02",
@@ -15,7 +15,7 @@
"System.Dynamic.Runtime": "4.4.0-beta-24913-02",
"System.Reflection": "4.4.0-beta-24913-02",
"System.Reflection.Extensions": "4.4.0-beta-24913-02",
- "System.Reflection.TypeExtensions": "4.4.0-preview1-25210-01",
+ "System.Reflection.TypeExtensions": "4.4.0-preview1-25221-01",
"System.Runtime": "4.4.0-beta-24913-02",
"System.Runtime.Serialization.Json": "4.4.0-beta-24913-02",
"System.Runtime.Serialization.Primitives": "4.4.0-beta-24913-02",
diff --git a/tests/src/JIT/config/benchmark/project.json b/tests/src/JIT/config/benchmark/project.json
index e42976a..aac92ec 100644
--- a/tests/src/JIT/config/benchmark/project.json
+++ b/tests/src/JIT/config/benchmark/project.json
@@ -1,23 +1,24 @@
{
"dependencies": {
- "xunit.performance.api": "1.0.0-alpha-build0049",
- "xunit.performance.core": "1.0.0-alpha-build0049",
- "xunit.performance.execution": "1.0.0-alpha-build0049",
- "xunit.performance.metrics": "1.0.0-alpha-build0049",
+ "xunit.performance.api": "1.0.0-beta-build0003",
+ "xunit.performance.core": "1.0.0-beta-build0003",
+ "xunit.performance.execution": "1.0.0-beta-build0003",
+ "xunit.performance.metrics": "1.0.0-beta-build0003",
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.3-alpha-experimental",
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"System.Collections.NonGeneric": "4.4.0-beta-24913-02",
"System.Console": "4.4.0-beta-24913-02",
"System.IO.FileSystem": "4.4.0-beta-24913-02",
"System.Linq": "4.4.0-beta-24913-02",
"System.Linq.Parallel": "4.4.0-beta-24913-02",
"System.Linq.Expressions": "4.4.0-beta-24913-02",
- "System.Memory": "4.4.0-preview1-25210-01",
- "System.Numerics.Vectors": "4.4.0-preview1-25210-01",
+ "System.Memory": "4.4.0-preview1-25221-01",
+ "System.Numerics.Vectors": "4.4.0-preview1-25221-01",
"System.Reflection": "4.4.0-beta-24913-02",
"System.Reflection.Extensions": "4.4.0-beta-24913-02",
- "System.Reflection.TypeExtensions": "4.4.0-preview1-25210-01",
+ "System.Reflection.TypeExtensions": "4.4.0-preview1-25221-01",
"System.Runtime": "4.4.0-beta-24913-02",
+ "System.Runtime.CompilerServices.Unsafe": "4.4.0-preview1-25221-01",
"System.Runtime.Extensions": "4.4.0-beta-24913-02",
"System.Runtime.Numerics": "4.4.0-beta-24913-02",
"System.Text.RegularExpressions": "4.4.0-beta-24913-02",
@@ -27,8 +28,6 @@
"System.Threading.ThreadPool": "4.4.0-beta-24913-02",
"System.Diagnostics.Process": "4.4.0-beta-24913-02",
"System.Xml.XmlDocument": "4.4.0-beta-24913-02",
- "System.Xml.XPath": "4.4.0-beta-24913-02",
- "System.Xml.XPath.XmlDocument": "4.4.0-beta-24913-02",
"xunit": "2.2.0-beta2-build3300",
"xunit.console.netcore": "1.0.2-prerelease-00177",
"xunit.runner.utility": "2.2.0-beta2-build3300"
diff --git a/tests/src/JIT/jit64/hfa/main/dll/hfa_native.h b/tests/src/JIT/jit64/hfa/main/dll/hfa_native.h
index 814ae4a..7cfdb28 100644
--- a/tests/src/JIT/jit64/hfa/main/dll/hfa_native.h
+++ b/tests/src/JIT/jit64/hfa/main/dll/hfa_native.h
@@ -1,11 +1,20 @@
// Copyright (c) Microsoft. All rights reserved.
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
+#if !defined(_MSC_VER)
+#if __i386__
+#define __stdcall __attribute__((stdcall))
+#else // __i386__
+#define __stdcall
+#endif // !__i386__
+#endif // !defined(_MSC_VER)
#if defined(_MSC_VER)
#define HFADLL_API extern "C" __declspec(dllexport)
+#define HFADLL_CALLCONV
#else
#define HFADLL_API extern "C" __attribute__((visibility("default")))
+#define HFADLL_CALLCONV __stdcall
#endif
@@ -102,13 +111,13 @@ const FLOATTYPE EXPECTED_SUM_HFA11 = static_cast<FLOATTYPE>(66);
const FLOATTYPE EXPECTED_SUM_HFA19 = static_cast<FLOATTYPE>(190);
#endif
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA01() {return EXPECTED_SUM_HFA01;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA02() {return EXPECTED_SUM_HFA02;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA03() {return EXPECTED_SUM_HFA03;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA05() {return EXPECTED_SUM_HFA05;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA08() {return EXPECTED_SUM_HFA08;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA11() {return EXPECTED_SUM_HFA11;}
-HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA19() {return EXPECTED_SUM_HFA19;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA01() {return EXPECTED_SUM_HFA01;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA02() {return EXPECTED_SUM_HFA02;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA03() {return EXPECTED_SUM_HFA03;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA05() {return EXPECTED_SUM_HFA05;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA08() {return EXPECTED_SUM_HFA08;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA11() {return EXPECTED_SUM_HFA11;}
+HFADLL_API FLOATTYPE HFADLL_CALLCONV get_EXPECTED_SUM_HFA19() {return EXPECTED_SUM_HFA19;}
@@ -116,13 +125,13 @@ HFADLL_API FLOATTYPE get_EXPECTED_SUM_HFA19() {return EXPECTED_SUM_HFA19;}
// init Methods
// ---------------------------------------------------
-HFADLL_API void init_HFA01(HFA01& hfa);
-HFADLL_API void init_HFA02(HFA02& hfa);
-HFADLL_API void init_HFA03(HFA03& hfa);
-HFADLL_API void init_HFA05(HFA05& hfa);
-HFADLL_API void init_HFA08(HFA08& hfa);
-HFADLL_API void init_HFA11(HFA11& hfa);
-HFADLL_API void init_HFA19(HFA19& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA01(HFA01& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA02(HFA02& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA03(HFA03& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA05(HFA05& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA08(HFA08& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA11(HFA11& hfa);
+HFADLL_API void HFADLL_CALLCONV init_HFA19(HFA19& hfa);
@@ -130,13 +139,13 @@ HFADLL_API void init_HFA19(HFA19& hfa);
// identity methods
// --------------------------------------------------------------
-HFADLL_API HFA01 identity_HFA01(HFA01 hfa);
-HFADLL_API HFA02 identity_HFA02(HFA02 hfa);
-HFADLL_API HFA03 identity_HFA03(HFA03 hfa);
-HFADLL_API HFA05 identity_HFA05(HFA05 hfa);
-HFADLL_API HFA08 identity_HFA08(HFA08 hfa);
-HFADLL_API HFA11 identity_HFA11(HFA11 hfa);
-HFADLL_API HFA19 identity_HFA19(HFA19 hfa);
+HFADLL_API HFA01 HFADLL_CALLCONV identity_HFA01(HFA01 hfa);
+HFADLL_API HFA02 HFADLL_CALLCONV identity_HFA02(HFA02 hfa);
+HFADLL_API HFA03 HFADLL_CALLCONV identity_HFA03(HFA03 hfa);
+HFADLL_API HFA05 HFADLL_CALLCONV identity_HFA05(HFA05 hfa);
+HFADLL_API HFA08 HFADLL_CALLCONV identity_HFA08(HFA08 hfa);
+HFADLL_API HFA11 HFADLL_CALLCONV identity_HFA11(HFA11 hfa);
+HFADLL_API HFA19 HFADLL_CALLCONV identity_HFA19(HFA19 hfa);
@@ -144,13 +153,13 @@ HFADLL_API HFA19 identity_HFA19(HFA19 hfa);
// get methods
// --------------------------------------------------------------
-HFADLL_API HFA01 get_HFA01();
-HFADLL_API HFA02 get_HFA02();
-HFADLL_API HFA03 get_HFA03();
-HFADLL_API HFA05 get_HFA05();
-HFADLL_API HFA08 get_HFA08();
-HFADLL_API HFA11 get_HFA11();
-HFADLL_API HFA19 get_HFA19();
+HFADLL_API HFA01 HFADLL_CALLCONV get_HFA01();
+HFADLL_API HFA02 HFADLL_CALLCONV get_HFA02();
+HFADLL_API HFA03 HFADLL_CALLCONV get_HFA03();
+HFADLL_API HFA05 HFADLL_CALLCONV get_HFA05();
+HFADLL_API HFA08 HFADLL_CALLCONV get_HFA08();
+HFADLL_API HFA11 HFADLL_CALLCONV get_HFA11();
+HFADLL_API HFA19 HFADLL_CALLCONV get_HFA19();
@@ -158,53 +167,53 @@ HFADLL_API HFA19 get_HFA19();
// sum Methods
// ---------------------------------------------------
-HFADLL_API FLOATTYPE sum_HFA01(HFA01 hfa);
-HFADLL_API FLOATTYPE sum_HFA02(HFA02 hfa);
-HFADLL_API FLOATTYPE sum_HFA03(HFA03 hfa);
-HFADLL_API FLOATTYPE sum_HFA05(HFA05 hfa);
-HFADLL_API FLOATTYPE sum_HFA08(HFA08 hfa);
-HFADLL_API FLOATTYPE sum_HFA11(HFA11 hfa);
-HFADLL_API FLOATTYPE sum_HFA19(HFA19 hfa);
-
-HFADLL_API FLOATTYPE sum3_HFA01(float v1, __int64 v2, HFA01 hfa);
-HFADLL_API FLOATTYPE sum3_HFA02(float v1, __int64 v2, HFA02 hfa);
-HFADLL_API FLOATTYPE sum3_HFA03(float v1, __int64 v2, HFA03 hfa);
-HFADLL_API FLOATTYPE sum3_HFA05(float v1, __int64 v2, HFA05 hfa);
-HFADLL_API FLOATTYPE sum3_HFA08(float v1, __int64 v2, HFA08 hfa);
-HFADLL_API FLOATTYPE sum3_HFA11(float v1, __int64 v2, HFA11 hfa);
-HFADLL_API FLOATTYPE sum3_HFA19(float v1, __int64 v2, HFA19 hfa);
-
-HFADLL_API FLOATTYPE sum5_HFA01(__int64 v1, double v2, short v3, signed char v4, HFA01 hfa);
-HFADLL_API FLOATTYPE sum5_HFA02(__int64 v1, double v2, short v3, signed char v4, HFA02 hfa);
-HFADLL_API FLOATTYPE sum5_HFA03(__int64 v1, double v2, short v3, signed char v4, HFA03 hfa);
-HFADLL_API FLOATTYPE sum5_HFA05(__int64 v1, double v2, short v3, signed char v4, HFA05 hfa);
-HFADLL_API FLOATTYPE sum5_HFA08(__int64 v1, double v2, short v3, signed char v4, HFA08 hfa);
-HFADLL_API FLOATTYPE sum5_HFA11(__int64 v1, double v2, short v3, signed char v4, HFA11 hfa);
-HFADLL_API FLOATTYPE sum5_HFA19(__int64 v1, double v2, short v3, signed char v4, HFA19 hfa);
-
-HFADLL_API FLOATTYPE sum8_HFA01(float v1, double v2, __int64 v3, signed char v4, double v5, HFA01 hfa);
-HFADLL_API FLOATTYPE sum8_HFA02(float v1, double v2, __int64 v3, signed char v4, double v5, HFA02 hfa);
-HFADLL_API FLOATTYPE sum8_HFA03(float v1, double v2, __int64 v3, signed char v4, double v5, HFA03 hfa);
-HFADLL_API FLOATTYPE sum8_HFA05(float v1, double v2, __int64 v3, signed char v4, double v5, HFA05 hfa);
-HFADLL_API FLOATTYPE sum8_HFA08(float v1, double v2, __int64 v3, signed char v4, double v5, HFA08 hfa);
-HFADLL_API FLOATTYPE sum8_HFA11(float v1, double v2, __int64 v3, signed char v4, double v5, HFA11 hfa);
-HFADLL_API FLOATTYPE sum8_HFA19(float v1, double v2, __int64 v3, signed char v4, double v5, HFA19 hfa);
-
-HFADLL_API FLOATTYPE sum11_HFA01(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA01 hfa);
-HFADLL_API FLOATTYPE sum11_HFA02(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA02 hfa);
-HFADLL_API FLOATTYPE sum11_HFA03(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA03 hfa);
-HFADLL_API FLOATTYPE sum11_HFA05(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA05 hfa);
-HFADLL_API FLOATTYPE sum11_HFA08(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA08 hfa);
-HFADLL_API FLOATTYPE sum11_HFA11(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA11 hfa);
-HFADLL_API FLOATTYPE sum11_HFA19(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA19 hfa);
-
-HFADLL_API FLOATTYPE sum19_HFA01(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA01 hfa);
-HFADLL_API FLOATTYPE sum19_HFA02(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA02 hfa);
-HFADLL_API FLOATTYPE sum19_HFA03(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA03 hfa);
-HFADLL_API FLOATTYPE sum19_HFA05(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA05 hfa);
-HFADLL_API FLOATTYPE sum19_HFA08(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA08 hfa);
-HFADLL_API FLOATTYPE sum19_HFA11(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA11 hfa);
-HFADLL_API FLOATTYPE sum19_HFA19(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA19 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA01(HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA02(HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA03(HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA05(HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA08(HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA11(HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum_HFA19(HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA01(float v1, __int64 v2, HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA02(float v1, __int64 v2, HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA03(float v1, __int64 v2, HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA05(float v1, __int64 v2, HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA08(float v1, __int64 v2, HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA11(float v1, __int64 v2, HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum3_HFA19(float v1, __int64 v2, HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA01(__int64 v1, double v2, short v3, signed char v4, HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA02(__int64 v1, double v2, short v3, signed char v4, HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA03(__int64 v1, double v2, short v3, signed char v4, HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA05(__int64 v1, double v2, short v3, signed char v4, HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA08(__int64 v1, double v2, short v3, signed char v4, HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA11(__int64 v1, double v2, short v3, signed char v4, HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum5_HFA19(__int64 v1, double v2, short v3, signed char v4, HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA01(float v1, double v2, __int64 v3, signed char v4, double v5, HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA02(float v1, double v2, __int64 v3, signed char v4, double v5, HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA03(float v1, double v2, __int64 v3, signed char v4, double v5, HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA05(float v1, double v2, __int64 v3, signed char v4, double v5, HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA08(float v1, double v2, __int64 v3, signed char v4, double v5, HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA11(float v1, double v2, __int64 v3, signed char v4, double v5, HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum8_HFA19(float v1, double v2, __int64 v3, signed char v4, double v5, HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA01(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA02(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA03(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA05(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA08(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA11(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum11_HFA19(double v1, float v2, float v3, int v4, float v5, __int64 v6, double v7, float v8, HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA01(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA02(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA03(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA05(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA08(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA11(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV sum19_HFA19(float v1, double v2, float v3, double v4, float v5, double v6, float v7, double v8, float v9, double v10, float v11, double v12, float v13, HFA19 hfa);
@@ -212,53 +221,53 @@ HFADLL_API FLOATTYPE sum19_HFA19(float v1, double v2, float v3, double v4, floa
// sverage Methods
// ---------------------------------------------------
-HFADLL_API FLOATTYPE average_HFA01(HFA01 hfa);
-HFADLL_API FLOATTYPE average_HFA02(HFA02 hfa);
-HFADLL_API FLOATTYPE average_HFA03(HFA03 hfa);
-HFADLL_API FLOATTYPE average_HFA05(HFA05 hfa);
-HFADLL_API FLOATTYPE average_HFA08(HFA08 hfa);
-HFADLL_API FLOATTYPE average_HFA11(HFA11 hfa);
-HFADLL_API FLOATTYPE average_HFA19(HFA19 hfa);
-
-HFADLL_API FLOATTYPE average3_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3);
-HFADLL_API FLOATTYPE average3_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3);
-HFADLL_API FLOATTYPE average3_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3);
-HFADLL_API FLOATTYPE average3_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3);
-HFADLL_API FLOATTYPE average3_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3);
-HFADLL_API FLOATTYPE average3_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3);
-HFADLL_API FLOATTYPE average3_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3);
-
-HFADLL_API FLOATTYPE average5_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5);
-HFADLL_API FLOATTYPE average5_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5);
-HFADLL_API FLOATTYPE average5_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5);
-HFADLL_API FLOATTYPE average5_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5);
-HFADLL_API FLOATTYPE average5_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5);
-HFADLL_API FLOATTYPE average5_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5);
-HFADLL_API FLOATTYPE average5_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5);
-
-HFADLL_API FLOATTYPE average8_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8);
-HFADLL_API FLOATTYPE average8_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8);
-HFADLL_API FLOATTYPE average8_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8);
-HFADLL_API FLOATTYPE average8_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8);
-HFADLL_API FLOATTYPE average8_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8);
-HFADLL_API FLOATTYPE average8_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8);
-HFADLL_API FLOATTYPE average8_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8);
-
-HFADLL_API FLOATTYPE average11_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11);
-HFADLL_API FLOATTYPE average11_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11);
-HFADLL_API FLOATTYPE average11_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11);
-HFADLL_API FLOATTYPE average11_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11);
-HFADLL_API FLOATTYPE average11_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11);
-HFADLL_API FLOATTYPE average11_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11);
-HFADLL_API FLOATTYPE average11_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11);
-
-HFADLL_API FLOATTYPE average19_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11, HFA01 hfa12, HFA01 hfa13, HFA01 hfa14, HFA01 hfa15, HFA01 hfa16, HFA01 hfa17, HFA01 hfa18, HFA01 hfa19);
-HFADLL_API FLOATTYPE average19_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11, HFA02 hfa12, HFA02 hfa13, HFA02 hfa14, HFA02 hfa15, HFA02 hfa16, HFA02 hfa17, HFA02 hfa18, HFA02 hfa19);
-HFADLL_API FLOATTYPE average19_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11, HFA03 hfa12, HFA03 hfa13, HFA03 hfa14, HFA03 hfa15, HFA03 hfa16, HFA03 hfa17, HFA03 hfa18, HFA03 hfa19);
-HFADLL_API FLOATTYPE average19_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11, HFA05 hfa12, HFA05 hfa13, HFA05 hfa14, HFA05 hfa15, HFA05 hfa16, HFA05 hfa17, HFA05 hfa18, HFA05 hfa19);
-HFADLL_API FLOATTYPE average19_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11, HFA08 hfa12, HFA08 hfa13, HFA08 hfa14, HFA08 hfa15, HFA08 hfa16, HFA08 hfa17, HFA08 hfa18, HFA08 hfa19);
-HFADLL_API FLOATTYPE average19_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11, HFA11 hfa12, HFA11 hfa13, HFA11 hfa14, HFA11 hfa15, HFA11 hfa16, HFA11 hfa17, HFA11 hfa18, HFA11 hfa19);
-HFADLL_API FLOATTYPE average19_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11, HFA19 hfa12, HFA19 hfa13, HFA19 hfa14, HFA19 hfa15, HFA19 hfa16, HFA19 hfa17, HFA19 hfa18, HFA19 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA01(HFA01 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA02(HFA02 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA03(HFA03 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA05(HFA05 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA08(HFA08 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA11(HFA11 hfa);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average_HFA19(HFA19 hfa);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average3_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average5_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average8_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average11_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA01(HFA01 hfa1, HFA01 hfa2, HFA01 hfa3, HFA01 hfa4, HFA01 hfa5, HFA01 hfa6, HFA01 hfa7, HFA01 hfa8, HFA01 hfa9, HFA01 hfa10, HFA01 hfa11, HFA01 hfa12, HFA01 hfa13, HFA01 hfa14, HFA01 hfa15, HFA01 hfa16, HFA01 hfa17, HFA01 hfa18, HFA01 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA02(HFA02 hfa1, HFA02 hfa2, HFA02 hfa3, HFA02 hfa4, HFA02 hfa5, HFA02 hfa6, HFA02 hfa7, HFA02 hfa8, HFA02 hfa9, HFA02 hfa10, HFA02 hfa11, HFA02 hfa12, HFA02 hfa13, HFA02 hfa14, HFA02 hfa15, HFA02 hfa16, HFA02 hfa17, HFA02 hfa18, HFA02 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA03(HFA03 hfa1, HFA03 hfa2, HFA03 hfa3, HFA03 hfa4, HFA03 hfa5, HFA03 hfa6, HFA03 hfa7, HFA03 hfa8, HFA03 hfa9, HFA03 hfa10, HFA03 hfa11, HFA03 hfa12, HFA03 hfa13, HFA03 hfa14, HFA03 hfa15, HFA03 hfa16, HFA03 hfa17, HFA03 hfa18, HFA03 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA05(HFA05 hfa1, HFA05 hfa2, HFA05 hfa3, HFA05 hfa4, HFA05 hfa5, HFA05 hfa6, HFA05 hfa7, HFA05 hfa8, HFA05 hfa9, HFA05 hfa10, HFA05 hfa11, HFA05 hfa12, HFA05 hfa13, HFA05 hfa14, HFA05 hfa15, HFA05 hfa16, HFA05 hfa17, HFA05 hfa18, HFA05 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA08(HFA08 hfa1, HFA08 hfa2, HFA08 hfa3, HFA08 hfa4, HFA08 hfa5, HFA08 hfa6, HFA08 hfa7, HFA08 hfa8, HFA08 hfa9, HFA08 hfa10, HFA08 hfa11, HFA08 hfa12, HFA08 hfa13, HFA08 hfa14, HFA08 hfa15, HFA08 hfa16, HFA08 hfa17, HFA08 hfa18, HFA08 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA11(HFA11 hfa1, HFA11 hfa2, HFA11 hfa3, HFA11 hfa4, HFA11 hfa5, HFA11 hfa6, HFA11 hfa7, HFA11 hfa8, HFA11 hfa9, HFA11 hfa10, HFA11 hfa11, HFA11 hfa12, HFA11 hfa13, HFA11 hfa14, HFA11 hfa15, HFA11 hfa16, HFA11 hfa17, HFA11 hfa18, HFA11 hfa19);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV average19_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19 hfa4, HFA19 hfa5, HFA19 hfa6, HFA19 hfa7, HFA19 hfa8, HFA19 hfa9, HFA19 hfa10, HFA19 hfa11, HFA19 hfa12, HFA19 hfa13, HFA19 hfa14, HFA19 hfa15, HFA19 hfa16, HFA19 hfa17, HFA19 hfa18, HFA19 hfa19);
@@ -267,29 +276,29 @@ HFADLL_API FLOATTYPE average19_HFA19(HFA19 hfa1, HFA19 hfa2, HFA19 hfa3, HFA19
// add Methods
// ---------------------------------------------------
-HFADLL_API FLOATTYPE add01_HFA01(HFA01 hfa1, float v1, HFA01 hfa2, int v2, HFA01 hfa3, short v3, double v4, HFA01 hfa4, HFA01 hfa5, float v5, __int64 v6, float v7, HFA01 hfa6, float v8, HFA01 hfa7);
-HFADLL_API FLOATTYPE add01_HFA02(HFA02 hfa1, float v1, HFA02 hfa2, int v2, HFA02 hfa3, short v3, double v4, HFA02 hfa4, HFA02 hfa5, float v5, __int64 v6, float v7, HFA02 hfa6, float v8, HFA02 hfa7);
-HFADLL_API FLOATTYPE add01_HFA03(HFA03 hfa1, float v1, HFA03 hfa2, int v2, HFA03 hfa3, short v3, double v4, HFA03 hfa4, HFA03 hfa5, float v5, __int64 v6, float v7, HFA03 hfa6, float v8, HFA03 hfa7);
-HFADLL_API FLOATTYPE add01_HFA05(HFA05 hfa1, float v1, HFA05 hfa2, int v2, HFA05 hfa3, short v3, double v4, HFA05 hfa4, HFA05 hfa5, float v5, __int64 v6, float v7, HFA05 hfa6, float v8, HFA05 hfa7);
-HFADLL_API FLOATTYPE add01_HFA08(HFA08 hfa1, float v1, HFA08 hfa2, int v2, HFA08 hfa3, short v3, double v4, HFA08 hfa4, HFA08 hfa5, float v5, __int64 v6, float v7, HFA08 hfa6, float v8, HFA08 hfa7);
-HFADLL_API FLOATTYPE add01_HFA11(HFA11 hfa1, float v1, HFA11 hfa2, int v2, HFA11 hfa3, short v3, double v4, HFA11 hfa4, HFA11 hfa5, float v5, __int64 v6, float v7, HFA11 hfa6, float v8, HFA11 hfa7);
-HFADLL_API FLOATTYPE add01_HFA19(HFA19 hfa1, float v1, HFA19 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA19 hfa4, HFA19 hfa5, float v5, __int64 v6, float v7, HFA19 hfa6, float v8, HFA19 hfa7);
-HFADLL_API FLOATTYPE add01_HFA00(HFA03 hfa1, float v1, HFA02 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA05 hfa4, HFA08 hfa5, float v5, __int64 v6, float v7, HFA11 hfa6, float v8, HFA01 hfa7);
-
-HFADLL_API FLOATTYPE add02_HFA01(HFA01 hfa1, HFA01 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA01 hfa3, double v7, float v8, HFA01 hfa4, short v9, HFA01 hfa5, float v10, HFA01 hfa6, HFA01 hfa7);
-HFADLL_API FLOATTYPE add02_HFA02(HFA02 hfa1, HFA02 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA02 hfa3, double v7, float v8, HFA02 hfa4, short v9, HFA02 hfa5, float v10, HFA02 hfa6, HFA02 hfa7);
-HFADLL_API FLOATTYPE add02_HFA03(HFA03 hfa1, HFA03 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA03 hfa4, short v9, HFA03 hfa5, float v10, HFA03 hfa6, HFA03 hfa7);
-HFADLL_API FLOATTYPE add02_HFA05(HFA05 hfa1, HFA05 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA05 hfa3, double v7, float v8, HFA05 hfa4, short v9, HFA05 hfa5, float v10, HFA05 hfa6, HFA05 hfa7);
-HFADLL_API FLOATTYPE add02_HFA08(HFA08 hfa1, HFA08 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA08 hfa3, double v7, float v8, HFA08 hfa4, short v9, HFA08 hfa5, float v10, HFA08 hfa6, HFA08 hfa7);
-HFADLL_API FLOATTYPE add02_HFA11(HFA11 hfa1, HFA11 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA11 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA11 hfa5, float v10, HFA11 hfa6, HFA11 hfa7);
-HFADLL_API FLOATTYPE add02_HFA19(HFA19 hfa1, HFA19 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA19 hfa3, double v7, float v8, HFA19 hfa4, short v9, HFA19 hfa5, float v10, HFA19 hfa6, HFA19 hfa7);
-HFADLL_API FLOATTYPE add02_HFA00(HFA01 hfa1, HFA05 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA19 hfa5, float v10, HFA08 hfa6, HFA02 hfa7);
-
-HFADLL_API FLOATTYPE add03_HFA01(float v1, signed char v2, HFA01 hfa1, double v3, signed char v4, HFA01 hfa2, __int64 v5, short v6, int v7, HFA01 hfa3, HFA01 hfa4, float v8, HFA01 hfa5, float v9, HFA01 hfa6, float v10, HFA01 hfa7);
-HFADLL_API FLOATTYPE add03_HFA02(float v1, signed char v2, HFA02 hfa1, double v3, signed char v4, HFA02 hfa2, __int64 v5, short v6, int v7, HFA02 hfa3, HFA02 hfa4, float v8, HFA02 hfa5, float v9, HFA02 hfa6, float v10, HFA02 hfa7);
-HFADLL_API FLOATTYPE add03_HFA03(float v1, signed char v2, HFA03 hfa1, double v3, signed char v4, HFA03 hfa2, __int64 v5, short v6, int v7, HFA03 hfa3, HFA03 hfa4, float v8, HFA03 hfa5, float v9, HFA03 hfa6, float v10, HFA03 hfa7);
-HFADLL_API FLOATTYPE add03_HFA05(float v1, signed char v2, HFA05 hfa1, double v3, signed char v4, HFA05 hfa2, __int64 v5, short v6, int v7, HFA05 hfa3, HFA05 hfa4, float v8, HFA05 hfa5, float v9, HFA05 hfa6, float v10, HFA05 hfa7);
-HFADLL_API FLOATTYPE add03_HFA08(float v1, signed char v2, HFA08 hfa1, double v3, signed char v4, HFA08 hfa2, __int64 v5, short v6, int v7, HFA08 hfa3, HFA08 hfa4, float v8, HFA08 hfa5, float v9, HFA08 hfa6, float v10, HFA08 hfa7);
-HFADLL_API FLOATTYPE add03_HFA11(float v1, signed char v2, HFA11 hfa1, double v3, signed char v4, HFA11 hfa2, __int64 v5, short v6, int v7, HFA11 hfa3, HFA11 hfa4, float v8, HFA11 hfa5, float v9, HFA11 hfa6, float v10, HFA11 hfa7);
-HFADLL_API FLOATTYPE add03_HFA19(float v1, signed char v2, HFA19 hfa1, double v3, signed char v4, HFA19 hfa2, __int64 v5, short v6, int v7, HFA19 hfa3, HFA19 hfa4, float v8, HFA19 hfa5, float v9, HFA19 hfa6, float v10, HFA19 hfa7);
-HFADLL_API FLOATTYPE add03_HFA00(float v1, signed char v2, HFA08 hfa1, double v3, signed char v4, HFA19 hfa2, __int64 v5, short v6, int v7, HFA03 hfa3, HFA01 hfa4, float v8, HFA11 hfa5, float v9, HFA02 hfa6, float v10, HFA05 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA01(HFA01 hfa1, float v1, HFA01 hfa2, int v2, HFA01 hfa3, short v3, double v4, HFA01 hfa4, HFA01 hfa5, float v5, __int64 v6, float v7, HFA01 hfa6, float v8, HFA01 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA02(HFA02 hfa1, float v1, HFA02 hfa2, int v2, HFA02 hfa3, short v3, double v4, HFA02 hfa4, HFA02 hfa5, float v5, __int64 v6, float v7, HFA02 hfa6, float v8, HFA02 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA03(HFA03 hfa1, float v1, HFA03 hfa2, int v2, HFA03 hfa3, short v3, double v4, HFA03 hfa4, HFA03 hfa5, float v5, __int64 v6, float v7, HFA03 hfa6, float v8, HFA03 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA05(HFA05 hfa1, float v1, HFA05 hfa2, int v2, HFA05 hfa3, short v3, double v4, HFA05 hfa4, HFA05 hfa5, float v5, __int64 v6, float v7, HFA05 hfa6, float v8, HFA05 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA08(HFA08 hfa1, float v1, HFA08 hfa2, int v2, HFA08 hfa3, short v3, double v4, HFA08 hfa4, HFA08 hfa5, float v5, __int64 v6, float v7, HFA08 hfa6, float v8, HFA08 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA11(HFA11 hfa1, float v1, HFA11 hfa2, int v2, HFA11 hfa3, short v3, double v4, HFA11 hfa4, HFA11 hfa5, float v5, __int64 v6, float v7, HFA11 hfa6, float v8, HFA11 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA19(HFA19 hfa1, float v1, HFA19 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA19 hfa4, HFA19 hfa5, float v5, __int64 v6, float v7, HFA19 hfa6, float v8, HFA19 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add01_HFA00(HFA03 hfa1, float v1, HFA02 hfa2, int v2, HFA19 hfa3, short v3, double v4, HFA05 hfa4, HFA08 hfa5, float v5, __int64 v6, float v7, HFA11 hfa6, float v8, HFA01 hfa7);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA01(HFA01 hfa1, HFA01 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA01 hfa3, double v7, float v8, HFA01 hfa4, short v9, HFA01 hfa5, float v10, HFA01 hfa6, HFA01 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA02(HFA02 hfa1, HFA02 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA02 hfa3, double v7, float v8, HFA02 hfa4, short v9, HFA02 hfa5, float v10, HFA02 hfa6, HFA02 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA03(HFA03 hfa1, HFA03 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA03 hfa4, short v9, HFA03 hfa5, float v10, HFA03 hfa6, HFA03 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA05(HFA05 hfa1, HFA05 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA05 hfa3, double v7, float v8, HFA05 hfa4, short v9, HFA05 hfa5, float v10, HFA05 hfa6, HFA05 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA08(HFA08 hfa1, HFA08 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA08 hfa3, double v7, float v8, HFA08 hfa4, short v9, HFA08 hfa5, float v10, HFA08 hfa6, HFA08 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA11(HFA11 hfa1, HFA11 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA11 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA11 hfa5, float v10, HFA11 hfa6, HFA11 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA19(HFA19 hfa1, HFA19 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA19 hfa3, double v7, float v8, HFA19 hfa4, short v9, HFA19 hfa5, float v10, HFA19 hfa6, HFA19 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add02_HFA00(HFA01 hfa1, HFA05 hfa2, __int64 v1, short v2, float v3, int v4, double v5, float v6, HFA03 hfa3, double v7, float v8, HFA11 hfa4, short v9, HFA19 hfa5, float v10, HFA08 hfa6, HFA02 hfa7);
+
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA01(float v1, signed char v2, HFA01 hfa1, double v3, signed char v4, HFA01 hfa2, __int64 v5, short v6, int v7, HFA01 hfa3, HFA01 hfa4, float v8, HFA01 hfa5, float v9, HFA01 hfa6, float v10, HFA01 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA02(float v1, signed char v2, HFA02 hfa1, double v3, signed char v4, HFA02 hfa2, __int64 v5, short v6, int v7, HFA02 hfa3, HFA02 hfa4, float v8, HFA02 hfa5, float v9, HFA02 hfa6, float v10, HFA02 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA03(float v1, signed char v2, HFA03 hfa1, double v3, signed char v4, HFA03 hfa2, __int64 v5, short v6, int v7, HFA03 hfa3, HFA03 hfa4, float v8, HFA03 hfa5, float v9, HFA03 hfa6, float v10, HFA03 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA05(float v1, signed char v2, HFA05 hfa1, double v3, signed char v4, HFA05 hfa2, __int64 v5, short v6, int v7, HFA05 hfa3, HFA05 hfa4, float v8, HFA05 hfa5, float v9, HFA05 hfa6, float v10, HFA05 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA08(float v1, signed char v2, HFA08 hfa1, double v3, signed char v4, HFA08 hfa2, __int64 v5, short v6, int v7, HFA08 hfa3, HFA08 hfa4, float v8, HFA08 hfa5, float v9, HFA08 hfa6, float v10, HFA08 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA11(float v1, signed char v2, HFA11 hfa1, double v3, signed char v4, HFA11 hfa2, __int64 v5, short v6, int v7, HFA11 hfa3, HFA11 hfa4, float v8, HFA11 hfa5, float v9, HFA11 hfa6, float v10, HFA11 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA19(float v1, signed char v2, HFA19 hfa1, double v3, signed char v4, HFA19 hfa2, __int64 v5, short v6, int v7, HFA19 hfa3, HFA19 hfa4, float v8, HFA19 hfa5, float v9, HFA19 hfa6, float v10, HFA19 hfa7);
+HFADLL_API FLOATTYPE HFADLL_CALLCONV add03_HFA00(float v1, signed char v2, HFA08 hfa1, double v3, signed char v4, HFA19 hfa2, __int64 v5, short v6, int v7, HFA03 hfa3, HFA01 hfa4, float v8, HFA11 hfa5, float v9, HFA02 hfa6, float v10, HFA05 hfa7);
diff --git a/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj b/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj
index 1ebf6ee..0f191d1 100644
--- a/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj
+++ b/tests/src/Loader/classloader/methodoverriding/regressions/549411/exploit.csproj
@@ -12,7 +12,6 @@
<OutputType>Exe</OutputType>
<CLRTestKind>BuildAndRun</CLRTestKind>
<CLRTestPriority>0</CLRTestPriority>
- <GCStressIncompatible Condition="'$(Platform)' == 'x86'">true</GCStressIncompatible>
</PropertyGroup>
<ItemGroup>
diff --git a/tests/src/NuGet.Config b/tests/src/NuGet.Config
index 51701f0..0922300 100644
--- a/tests/src/NuGet.Config
+++ b/tests/src/NuGet.Config
@@ -7,7 +7,7 @@
<clear/>
<add key="myget.org dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="myget.org nugetbuild" value="https://www.myget.org/F/nugetbuild/api/v3/index.json" />
- <add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
+ <add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
diff --git a/tests/src/Regressions/coreclr/GitHub_7685/test7685.cs b/tests/src/Regressions/coreclr/GitHub_7685/test7685.cs
index a1d35bc..77b25dc 100644
--- a/tests/src/Regressions/coreclr/GitHub_7685/test7685.cs
+++ b/tests/src/Regressions/coreclr/GitHub_7685/test7685.cs
@@ -6,28 +6,100 @@ using System.Reflection;
public class Test7685
{
- static RectangleF argumentInDStuff;
-
+ static RectangleF passedFloatStruct;
+ static RectangleD passedDoubleStruct;
+ static RectangleI passedIntStruct;
+ static RectangleLLarge passedLongLargeStruct;
+ static RectangleLSmall passedLongSmallStruct;
+ static RectangleNestedF passedNestedSmallFStruct;
+
public static int Main()
{
int iRetVal = 100;
- var r = new RectangleF(1.2f, 3.4f, 5.6f, 7.8f);
- typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuff").Invoke(null, new object[] { r });
+ var rF = new RectangleF(1.2f, 3.4f, 5.6f, 7.8f);
+ var rD = new RectangleD(1.7E+3d, 4.5d, 500.1d, 60.0d);
+ var rI = new RectangleI(100, -2, 3, 64);
+ var rLSmall = new RectangleLSmall(11231L);
+ var rLLarge = new RectangleLLarge(1L, 20041L, 22L, 88L);
+ var rNestedFSmall = new RectangleNestedF(1.2f, 3.4f, 5.6f, 7.8f);
+
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffF").Invoke(null, new object[] { rF });
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffD").Invoke(null, new object[] { rD });
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffI").Invoke(null, new object[] { rI });
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffLSmall").Invoke(null, new object[] { rLSmall });
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffLLarge").Invoke(null, new object[] { rLLarge });
+ typeof(Test7685).GetTypeInfo().GetDeclaredMethod("DoStuffNestedF").Invoke(null, new object[] { rNestedFSmall });
- if (!RectangleF.Equals(ref argumentInDStuff, ref r))
+ if (!RectangleF.Equals(ref passedFloatStruct, ref rF))
{
- TestLibrary.Logging.WriteLine($"Error: passing struct with floats via reflection. Callee received {argumentInDStuff} instead of {r}");
+ TestLibrary.Logging.WriteLine($"Error: passing struct with floats via reflection. Callee received {passedFloatStruct} instead of {rF}");
iRetVal = 0;
}
+
+ if (!RectangleD.Equals(ref passedDoubleStruct, ref rD))
+ {
+ TestLibrary.Logging.WriteLine($"Error: passing struct with doubles via reflection. Callee received {passedDoubleStruct} instead of {rD}");
+ iRetVal = 1;
+ }
+
+ if (!RectangleI.Equals(ref passedIntStruct, ref rI))
+ {
+ TestLibrary.Logging.WriteLine($"Error: passing struct with ints via reflection. Callee received {passedIntStruct} instead of {rI}");
+ iRetVal = 2;
+ }
+
+ if (!RectangleLSmall.Equals(ref passedLongSmallStruct, ref rLSmall))
+ {
+ TestLibrary.Logging.WriteLine($"Error: passing struct with a long via reflection. Callee received {passedLongSmallStruct} instead of {rLSmall}");
+ iRetVal = 3;
+ }
+
+ if (!RectangleLLarge.Equals(ref passedLongLargeStruct, ref rLLarge))
+ {
+ TestLibrary.Logging.WriteLine($"Error: passing struct with longs via reflection. Callee received {passedLongLargeStruct} instead of {rLLarge}");
+ iRetVal = 4;
+ }
+
+ if (!RectangleNestedF.Equals(ref passedNestedSmallFStruct, ref rNestedFSmall))
+ {
+ TestLibrary.Logging.WriteLine($"Error: passing struct with longs via reflection. Callee received {passedNestedSmallFStruct} instead of {rNestedFSmall}");
+ iRetVal = 5;
+ }
return iRetVal;
}
- public static void DoStuff(RectangleF r)
+ public static void DoStuffF(RectangleF r)
+ {
+ passedFloatStruct = r;
+ }
+
+ public static void DoStuffD(RectangleD r)
+ {
+ passedDoubleStruct = r;
+ }
+
+ public static void DoStuffI(RectangleI r)
+ {
+ passedIntStruct = r;
+ }
+
+ public static void DoStuffLSmall(RectangleLSmall r)
{
- argumentInDStuff = r;
+ passedLongSmallStruct = r;
}
+
+ public static void DoStuffLLarge(RectangleLLarge r)
+ {
+ passedLongLargeStruct = r;
+ }
+
+ public static void DoStuffNestedF(RectangleNestedF r)
+ {
+ passedNestedSmallFStruct = r;
+ }
+
}
public struct RectangleF
@@ -46,3 +118,106 @@ public struct RectangleF
public override string ToString() => $"[{_x}, {_y}, {_width}, {_height}]";
}
+
+public struct RectangleFSmall
+{
+ public float _x, _y;
+
+ public RectangleFSmall(float x, float y)
+ {
+ _x = x; _y = y;
+ }
+
+ public static bool Equals(ref RectangleFSmall r1, ref RectangleFSmall r2)
+ {
+ return (r2._x == r1._x) && (r2._y == r1._y);
+ }
+
+ public override string ToString() => $"[{_x}, {_y}]";
+}
+
+public struct RectangleD
+{
+ private double _x, _y, _width, _height;
+
+ public RectangleD(double x, double y, double width, double height)
+ {
+ _x = x; _y = y; _width = width; _height = height;
+ }
+
+ public static bool Equals(ref RectangleD r1, ref RectangleD r2)
+ {
+ return (r2._x == r1._x) && (r2._y == r1._y) && (r2._width == r1._width) && (r2._height == r1._height);
+ }
+
+ public override string ToString() => $"[{_x}, {_y}, {_width}, {_height}]";
+}
+
+public struct RectangleI
+{
+ private int _x, _y, _width, _height;
+
+ public RectangleI(int x, int y, int width, int height)
+ {
+ _x = x; _y = y; _width = width; _height = height;
+ }
+
+ public static bool Equals(ref RectangleI r1, ref RectangleI r2)
+ {
+ return (r2._x == r1._x) && (r2._y == r1._y) && (r2._width == r1._width) && (r2._height == r1._height);
+ }
+
+ public override string ToString() => $"[{_x}, {_y}, {_width}, {_height}]";
+}
+
+public struct RectangleLSmall
+{
+ private long _x;
+
+ public RectangleLSmall(long x)
+ {
+ _x = x;
+ }
+
+ public static bool Equals(ref RectangleLSmall r1, ref RectangleLSmall r2)
+ {
+ return (r2._x == r1._x);
+ }
+
+ public override string ToString() => $"[{_x}]";
+}
+
+public struct RectangleLLarge
+{
+ private long _x, _y, _width, _height;
+
+ public RectangleLLarge(long x, long y, long width, long height)
+ {
+ _x = x; _y = y; _width = width; _height = height;
+ }
+
+ public static bool Equals(ref RectangleLLarge r1, ref RectangleLLarge r2)
+ {
+ return (r2._x == r1._x) && (r2._y == r1._y) && (r2._width == r1._width) && (r2._height == r1._height);
+ }
+
+ public override string ToString() => $"[{_x}, {_y}, {_width}, {_height}]";
+}
+
+public struct RectangleNestedF
+{
+ private RectangleFSmall first, second;
+
+ public RectangleNestedF(float x, float y, float width, float height)
+ {
+ first = new RectangleFSmall(x, y);
+ second = new RectangleFSmall(width, height);
+ }
+
+ public static bool Equals(ref RectangleNestedF r1, ref RectangleNestedF r2)
+ {
+ return (r1.first._x == r2.first._x) && (r1.first._y == r2.first._y) && (r1.second._x == r2.second._x) && (r1.second._y == r2.second._y);
+ }
+
+ public override string ToString() => $"[{first._x}, {first._y}, {second._x}, {second._y}]";
+} \ No newline at end of file
diff --git a/tests/src/TestWrappersConfig/project.json b/tests/src/TestWrappersConfig/project.json
index 93e7388..56585e1 100644
--- a/tests/src/TestWrappersConfig/project.json
+++ b/tests/src/TestWrappersConfig/project.json
@@ -1,6 +1,6 @@
{
"dependencies": {
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"xunit": "2.2.0-beta2-build3300",
"xunit.assert": "2.2.0-beta2-build3300",
"xunit.core": "2.2.0-beta2-build3300",
diff --git a/tests/src/baseservices/multidimmarray/rank1array.il b/tests/src/baseservices/multidimmarray/rank1array.il
new file mode 100644
index 0000000..3f36483
--- /dev/null
+++ b/tests/src/baseservices/multidimmarray/rank1array.il
@@ -0,0 +1,160 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+// Tests that SzArray is castable to multidimensional array of rank 1 with zero lower bounds
+// and that the MdArray methods can operate on such `this`.
+// We cast an SzArray to MdArray, call methods on it, and validate the SzArray was updated
+// at the expected memory locations.
+
+.assembly extern mscorlib { }
+
+.assembly rank1array
+{
+}
+
+.module rank1array.exe
+.subsystem 0x0003
+.corflags 0x00000001
+
+.method public hidebysig static int32 Main () cil managed
+{
+ .locals init(
+ [0] int32[] szArray,
+ [1] int32[0...] mdArray
+ )
+
+ .maxstack 8
+ .entrypoint
+
+ ldc.i4.2
+ newarr int32
+ stloc.0
+
+ // SzArray is castable to MdArray rank 1 with zero lower bounds
+ ldloc.0
+ castclass int32[0...]
+ stloc.1
+
+ ldloc.1
+ ldc.i4.0
+ ldc.i4 0x4d2
+ call instance void int32[0...]::Set(int32, int32)
+
+ // The call to Set had better updated the memory location we expect
+ ldloc.0
+ ldc.i4.0
+ ldelem.i4
+ ldc.i4 0x4d2
+ ceq
+ brtrue SetOK
+ ldc.i4.1
+ ret
+
+SetOK:
+ ldloc.1
+ ldc.i4.0
+ call instance int32 int32[0...]::Get(int32)
+ ldc.i4 0x4d2
+ ceq
+ brtrue GetOK
+ ldc.i4.2
+ ret
+
+GetOK:
+ ldloc.1
+ ldc.i4.1
+ call instance int32& int32[0...]::Address(int32)
+ ldc.i4 42
+ stind.i4
+
+ // The call to Address had better given us the memory location we expect
+ ldloc.0
+ ldc.i4.1
+ ldelem.i4
+ ldc.i4 42
+ ceq
+ brtrue AddressOK
+ ldc.i4.3
+ ret
+
+AddressOK:
+
+ // We can also cast through type-size-equivalence
+ ldc.i4.0
+ newarr int32
+ isinst uint32[0...]
+ brtrue SizeEquivalenceOK
+ ldc.i4.4
+ ret
+
+SizeEquivalenceOK:
+
+ // We follow all the size equivalence rules though
+ ldc.i4.0
+ newarr float32
+ isinst uint32[0...]
+ brfalse SizeEquivalenceNegativeOK
+ ldc.i4.5
+ ret
+
+SizeEquivalenceNegativeOK:
+
+ // String -> object casts
+ ldc.i4.0
+ newarr string
+ isinst object[0...]
+ brtrue StringObjectCastOK
+ ldc.i4.6
+ ret
+
+StringObjectCastOK:
+
+ // Object -> string negative cast
+ ldc.i4.0
+ newarr object
+ isinst string[0...]
+ brfalse ObjectStringNegativeOK
+ ldc.i4.7
+ ret
+
+ObjectStringNegativeOK:
+
+ // MdArray of rank 1 is also castable to SzArray
+ ldc.i4.0
+ newobj instance void int32[0...]::.ctor(int32)
+ isinst int32[]
+ brtrue MdSzArrayOK
+ ldc.i4.8
+ ret
+
+MdSzArrayOK:
+
+ // "newobj instance void int32[0...]::.ctor(int32)" actually gives you int[]
+ ldc.i4.1
+ newobj instance void int32[0...]::.ctor(int32)
+ call instance class [mscorlib]System.Type class [mscorlib]System.Object::GetType()
+ ldtoken int32[]
+ call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
+ ceq
+ brtrue Int32ArrayRank1IsInt32SzArray
+ ldc.i4 9
+ ret
+
+Int32ArrayRank1IsInt32SzArray:
+
+ // int32[] and int32[0..] are still different types though
+ ldtoken int32[]
+ call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
+ ldtoken int32[0...]
+ call class [mscorlib]System.Type class [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
+ ceq
+ brfalse DifferentTypes
+ ldc.i4 10
+ ret
+
+DifferentTypes:
+
+ ldc.i4 100
+ ret
+}
diff --git a/tests/src/baseservices/multidimmarray/rank1array.ilproj b/tests/src/baseservices/multidimmarray/rank1array.ilproj
new file mode 100644
index 0000000..6679689
--- /dev/null
+++ b/tests/src/baseservices/multidimmarray/rank1array.ilproj
@@ -0,0 +1,31 @@
+<?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>
+ <AssemblyName>rank1array</AssemblyName>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{405DB174-DAB1-4095-BC2D-B64E38E94B8B}</ProjectGuid>
+ <ProjectTypeGuids>{786C830F-07A1-408B-BD7F-6EE04809D6DB};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
+ <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+ <OutputType>Exe</OutputType>
+ <CLRTestKind>BuildAndRun</CLRTestKind>
+ <CLRTestPriority>0</CLRTestPriority>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+
+ <ItemGroup>
+ <Compile Include="rank1array.il" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), dir.targets))\dir.targets" />
+</Project>
diff --git a/tests/src/performance/linkbench/assets/MusicStore/MusicStoreReflection.xml b/tests/src/performance/linkbench/assets/MusicStore/MusicStoreReflection.xml
new file mode 100644
index 0000000..3673c65
--- /dev/null
+++ b/tests/src/performance/linkbench/assets/MusicStore/MusicStoreReflection.xml
@@ -0,0 +1,27 @@
+<linker>
+ <!--- Called by Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions:.cctor -->
+ <assembly fullname="System.Linq.Queryable">
+ <type fullname="System.Linq.Queryable" required="true" />
+ </assembly>
+
+ <assembly fullname="System.Linq.Expressions">
+ <!--- Called by System.Linq.Expressions.Expression:CreateLambda -->
+ <type fullname="System.Linq.Expressions.Expression`1" required="true" />
+ <!--- Called by [System.Linq.Expressions]System.Runtime.CompilerServices.CallSite<>.CreateCustomNoMatchDelegate and [System.Linq.Expressions]System.Runtime.CompilerServices.CallSite<>.CreateCustomUpdateDelegate-->
+ <type fullname="System.Runtime.CompilerServices.CallSiteOps" required="true" />
+ <!--- Called by [System.Linq.Expressions]System.Runtime.CompilerServices.CallSiteBinder.Stitch -->
+ <type fullname="System.Runtime.CompilerServices.CallSite" required="true" />
+ <!--- Called by [System.Linq.Expressions]System.Runtime.CompilerServices.CallSiteBinder.Stitch -->
+ <type fullname="System.Runtime.CompilerServices.CallSite`1" required="true" />
+ <!--- Called by [System.Linq.Expressions]System.Runtime.CompilerServices.CallSite`1.MakeUpdateDelegate -->
+ <type fullname="System.Dynamic.UpdateDelegates" required="true" />
+ <!--- Called by [System.Linq.Expressions]System.Dynamic.DynamicObject.MetaDynamic.BindBinaryOperation -->
+ <type fullname="System.Dynamic.DynamicObject" required="true" />
+ </assembly>
+
+ <assembly fullname="System.ComponentModel.TypeConverter">
+ <type fullname="System.ComponentModel.StringConverter" required="true" />
+ <type fullname="System.ComponentModel.BooleanConverter" required="true" />
+ <type fullname="System.ComponentModel.CollectionConverter" required="true" />
+ </assembly>
+</linker>
diff --git a/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.txt b/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.txt
new file mode 100644
index 0000000..10f149e
--- /dev/null
+++ b/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.txt
@@ -0,0 +1,3 @@
+Microsoft.CodeAnalysis
+Microsoft.CodeAnalysis.CSharp
+System.Private.CoreLib
diff --git a/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.xml b/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.xml
new file mode 100644
index 0000000..afc1ce6
--- /dev/null
+++ b/tests/src/performance/linkbench/assets/Roslyn/RoslynRoots.xml
@@ -0,0 +1,5 @@
+<linker>
+ <assembly fullname="csc">
+ <type fullname="*" required="true" />
+ </assembly>
+</linker>
diff --git a/tests/src/performance/linkbench/assets/Roslyn/illinkcsproj b/tests/src/performance/linkbench/assets/Roslyn/illinkcsproj
new file mode 100644
index 0000000..1247c5e
--- /dev/null
+++ b/tests/src/performance/linkbench/assets/Roslyn/illinkcsproj
@@ -0,0 +1,9 @@
+<Project Sdk="Microsoft.NET.Sdk">
+ <PropertyGroup>
+ <TargetFramework>netcoreapp2.0</TargetFramework>
+ <RuntimeIdentifiers>win7-x86;win7-x64</RuntimeIdentifiers>
+ </PropertyGroup>
+ <ItemGroup>
+ <PackageReference Include="ILLink.Tasks" Version="0.1.0-preview" />
+ </ItemGroup>
+</Project>
diff --git a/tests/src/performance/linkbench/linkbench.cs b/tests/src/performance/linkbench/linkbench.cs
new file mode 100644
index 0000000..3d29957
--- /dev/null
+++ b/tests/src/performance/linkbench/linkbench.cs
@@ -0,0 +1,372 @@
+using System;
+using System.Diagnostics;
+using System.Collections.Generic;
+using System.IO;
+using System.Reflection;
+using System.Runtime.Loader;
+using System.Text;
+using System.Globalization;
+using System.Linq;
+using System.Xml.Linq;
+using Microsoft.Xunit.Performance;
+using Microsoft.Xunit.Performance.Api;
+using Xunit;
+using Xunit.Abstractions;
+
+namespace LinkBench
+{
+ public class Benchmark
+ {
+ public string Name;
+
+ public string UnlinkedDir;
+ public string LinkedDir;
+ public double UnlinkedMsilSize;
+ public double LinkedMsilSize;
+ public double UnlinkedDirSize;
+ public double LinkedDirSize;
+ public double MsilSizeReduction;
+ public double DirSizeReduction;
+
+ private DirectoryInfo unlinkedDirInfo;
+ private DirectoryInfo linkedDirInfo;
+ private double certDiff;
+ const double MB = 1024 * 1024;
+
+ public Benchmark(string _Name, string _UnlinkedDir, string _LinkedDir)
+ {
+ Name = _Name;
+ UnlinkedDir = _UnlinkedDir;
+ LinkedDir = _LinkedDir;
+ unlinkedDirInfo = new DirectoryInfo(UnlinkedDir);
+ linkedDirInfo = new DirectoryInfo(LinkedDir);
+ }
+
+ public void Compute()
+ {
+ ComputeCertDiff();
+ UnlinkedMsilSize = GetMSILSize(UnlinkedDir);
+ LinkedMsilSize = GetMSILSize(LinkedDir);
+ UnlinkedDirSize = GetDirSize(unlinkedDirInfo);
+ LinkedDirSize = GetDirSize(linkedDirInfo);
+
+ MsilSizeReduction = (UnlinkedMsilSize - LinkedMsilSize) / UnlinkedMsilSize * 100;
+ DirSizeReduction = (UnlinkedDirSize - LinkedDirSize) / UnlinkedDirSize * 100;
+ }
+
+ // Compute total size of a directory, in MegaBytes
+ // Includes all files and subdirectories recursively
+ private double GetDirSize(DirectoryInfo dir)
+ {
+ double size = 0;
+ FileInfo[] files = dir.GetFiles();
+ foreach (FileInfo fileInfo in files)
+ {
+ size += fileInfo.Length;
+ }
+ DirectoryInfo[] subDirs = dir.GetDirectories();
+ foreach (DirectoryInfo dirInfo in subDirs)
+ {
+ size += GetDirSize(dirInfo);
+ }
+
+ return size / MB;
+ }
+
+ // Compute the size of MSIL files in a directory, in MegaBytes
+ // Top level only, excludes crossgen files.
+ private double GetMSILSize(string dir)
+ {
+ string[] files = Directory.GetFiles(dir);
+ long msilSize = 0;
+
+ foreach (string file in files)
+ {
+ if (file.EndsWith(".ni.dll") || file.EndsWith(".ni.exe"))
+ {
+ continue;
+ }
+ try
+ {
+ AssemblyLoadContext.GetAssemblyName(file);
+ }
+ catch (BadImageFormatException)
+ {
+ continue;
+ }
+
+ msilSize += new FileInfo(file).Length;
+ }
+
+ return msilSize / MB;
+ }
+
+ // Gets the size of the Certificate header in a MSIL or ReadyToRun binary.
+ private long GetCertSize(string file)
+ {
+ Process p = new Process();
+ p.StartInfo.UseShellExecute = false;
+ p.StartInfo.RedirectStandardOutput = true;
+ p.StartInfo.FileName = LinkBench.ScriptDir + "GetCert.cmd";
+ p.StartInfo.Arguments = file;
+ p.Start();
+ string output = p.StandardOutput.ReadToEnd();
+ p.WaitForExit();
+ long size = Int32.Parse(output.Substring(18, 8),
+ NumberStyles.AllowLeadingWhite | NumberStyles.AllowTrailingWhite | NumberStyles.HexNumber);
+ return size;
+ }
+
+ // Get the total size difference for all certificates in all managed binaries
+ // in the unlinked and linked directories.
+ private double ComputeCertDiff()
+ {
+ string[] files = Directory.GetFiles(LinkedDir);
+ long totalDiff = 0;
+
+ foreach (string file in files)
+ {
+ try
+ {
+ AssemblyLoadContext.GetAssemblyName(file);
+ }
+ catch (BadImageFormatException)
+ {
+ continue;
+ }
+
+ FileInfo fileInfo = new FileInfo(file);
+ long linkedCert = GetCertSize(file);
+ long unlinkedCert = GetCertSize(UnlinkedDir + "\\" + fileInfo.Name);
+ totalDiff += (unlinkedCert - linkedCert);
+ }
+
+ return totalDiff / MB;
+ }
+ }
+
+ public class LinkBench
+ {
+ private static ScenarioConfiguration scenarioConfiguration = new ScenarioConfiguration(new TimeSpan(2000000));
+ private static MetricModel SizeMetric = new MetricModel { Name = "Size", DisplayName = "File Size", Unit = "MB" };
+ private static MetricModel PercMetric = new MetricModel { Name = "Perc", DisplayName = "% Reduction", Unit = "%" };
+ public static string Workspace;
+ public static string ScriptDir;
+ public static string AssetsDir;
+ private static Benchmark CurrentBenchmark;
+
+ public static int Main(String [] args)
+ {
+ // Workspace is the ROOT of the coreclr tree.
+ // If CORECLR_REPO is not set, the script assumes that the location of sandbox
+ // is <path>\coreclr\sandbox.
+ bool doClone = true;
+ bool doBuild = true;
+
+ for(int i=0; i < args.Length; i++)
+ {
+ if (String.Compare(args[i], "noclone", true) == 0)
+ {
+ doClone = false;
+ }
+ else if (String.Compare(args[i], "nobuild", true) == 0)
+ {
+ doClone = false;
+ doBuild = false;
+ }
+ else
+ {
+ Console.WriteLine("Unknown argument");
+ return -4;
+ }
+ }
+
+ Workspace = Environment.GetEnvironmentVariable("CORECLR_REPO");
+ if (Workspace == null)
+ {
+ Workspace = Directory.GetParent(Directory.GetCurrentDirectory()).FullName;
+ }
+ if (Workspace == null)
+ {
+ Console.WriteLine("CORECLR_REPO not found");
+ return -1;
+ }
+
+ string LinkBenchDir = Workspace + "\\tests\\src\\performance\\linkbench\\";
+ ScriptDir = LinkBenchDir + "scripts\\";
+ AssetsDir = LinkBenchDir + "assets\\";
+
+ Benchmark[] Benchmarks =
+ {
+ new Benchmark("HelloWorld",
+ "LinkBench\\HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\publish",
+ "LinkBench\\HelloWorld\\bin\\release\\netcoreapp2.0\\win10-x64\\linked"),
+ new Benchmark("WebAPI",
+ "LinkBench\\WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\publish",
+ "LinkBench\\WebAPI\\bin\\release\\netcoreapp2.0\\win10-x64\\linked"),
+ new Benchmark("MusicStore",
+ "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\publish",
+ "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\linked"),
+ new Benchmark("MusicStore_R2R",
+ "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\publish_r2r",
+ "LinkBench\\JitBench\\src\\MusicStore\\bin\\release\\netcoreapp2.0\\win10-x64\\linked_r2r"),
+ new Benchmark("Corefx",
+ "LinkBench\\corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\pretrimmed",
+ "LinkBench\\corefx\\bin\\ILLinkTrimAssembly\\netcoreapp-Windows_NT-Release-x64\\trimmed"),
+ new Benchmark("Roslyn",
+ "LinkBench\\roslyn\\Binaries\\Release\\Exes\\CscCore",
+ "LinkBench\\roslyn\\Binaries\\Release\\Exes\\Linked"),
+ };
+
+ // Update the build files to facilitate the link step
+ if(doClone)
+ {
+ if(!Setup())
+ {
+ return -2;
+ }
+ }
+
+ if (doBuild)
+ {
+ // Run the setup Script, which clones, builds and links the benchmarks.
+ using (var setup = new Process())
+ {
+ setup.StartInfo.FileName = ScriptDir + "build.cmd";
+ setup.StartInfo.Arguments = AssetsDir;
+ setup.Start();
+ setup.WaitForExit();
+ if (setup.ExitCode != 0)
+ {
+ Console.WriteLine("Setup failed");
+ return -3;
+ }
+ }
+ }
+
+ // Since this is a size measurement scenario, there are no iterations
+ // to perform. So, create a process that does nothing, to satisfy XUnit.
+ // All size measurements are performed PostRun()
+ var emptyCmd = new ProcessStartInfo()
+ {
+ FileName = ScriptDir + "empty.cmd"
+ };
+
+ for (int i = 0; i < Benchmarks.Length; i++)
+ {
+ CurrentBenchmark = Benchmarks[i];
+ string[] scriptArgs = { "--perf:runid", CurrentBenchmark.Name };
+
+ using (var h = new XunitPerformanceHarness(scriptArgs))
+ {
+ h.RunScenario(emptyCmd, null, null, PostRun, scenarioConfiguration);
+ }
+ }
+
+ return 0;
+ }
+
+ private static ScenarioBenchmark PostRun()
+ {
+ // The XUnit output doesn't print the benchmark name, so print it now.
+ Console.WriteLine("{0}", CurrentBenchmark.Name);
+
+ var scenario = new ScenarioBenchmark(CurrentBenchmark.Name)
+ {
+ Namespace = "LinkBench"
+ };
+
+ CurrentBenchmark.Compute();
+
+ addMeasurement(ref scenario, "MSIL Unlinked", SizeMetric, CurrentBenchmark.UnlinkedMsilSize);
+ addMeasurement(ref scenario, "MSIL Linked", SizeMetric, CurrentBenchmark.LinkedMsilSize);
+ addMeasurement(ref scenario, "MSIL %Reduction", PercMetric, CurrentBenchmark.MsilSizeReduction);
+ addMeasurement(ref scenario, "Total Uninked", SizeMetric, CurrentBenchmark.UnlinkedDirSize);
+ addMeasurement(ref scenario, "Total Linked", SizeMetric, CurrentBenchmark.LinkedDirSize);
+ addMeasurement(ref scenario, "Total %Reduction", PercMetric, CurrentBenchmark.DirSizeReduction);
+
+ return scenario;
+ }
+
+ private static bool Setup()
+ {
+ // Clone the benchmarks
+ using (var setup = new Process())
+ {
+ setup.StartInfo.FileName = ScriptDir + "clone.cmd";
+ Console.WriteLine("Run {0}", setup.StartInfo.FileName);
+ setup.Start();
+ setup.WaitForExit();
+ if (setup.ExitCode != 0)
+ {
+ Console.WriteLine("clone failed");
+ return false;
+ }
+ }
+
+ //Update the project files
+ AddLinkerReference("LinkBench\\HelloWorld\\HelloWorld.csproj");
+ AddLinkerReference("LinkBench\\WebAPI\\WebAPI.csproj");
+ AddLinkerReference("LinkBench\\JitBench\\src\\MusicStore\\MusicStore.csproj");
+ RemoveCrossgenTarget("LinkBench\\JitBench\\src\\MusicStore\\MusicStore.csproj");
+
+ return true;
+ }
+
+ private static void AddLinkerReference(string csproj)
+ {
+ var xdoc = XDocument.Load(csproj);
+ var ns = xdoc.Root.GetDefaultNamespace();
+ bool added = false;
+ foreach (var el in xdoc.Root.Elements(ns + "ItemGroup"))
+ {
+ if (el.Elements(ns + "PackageReference").Any())
+ {
+ el.Add(new XElement(ns + "PackageReference",
+ new XAttribute("Include", "ILLink.Tasks"),
+ new XAttribute("Version", "0.1.0-preview")));
+ added = true;
+ break;
+ }
+ }
+ if (!added)
+ {
+ xdoc.Root.Add(new XElement(ns + "ItemGroup",
+ new XElement(ns + "PackageReference",
+ new XAttribute("Include", "ILLink.Tasks"),
+ new XAttribute("Version", "0.1.0-preview"))));
+ added = true;
+ }
+ using (var fs = new FileStream(csproj, FileMode.Create))
+ {
+ xdoc.Save(fs);
+ }
+ }
+
+ private static void RemoveCrossgenTarget(string csproj)
+ {
+ var xdoc = XDocument.Load(csproj);
+ var ns = xdoc.Root.GetDefaultNamespace();
+ var target = xdoc.Root.Element(ns + "Target");
+ target.Remove();
+ using (var fs = new FileStream(csproj, FileMode.Create))
+ {
+ xdoc.Save(fs);
+ }
+ }
+
+ private static void addMeasurement(ref ScenarioBenchmark scenario, string name, MetricModel metric, double value)
+ {
+ var iteration = new IterationModel
+ {
+ Iteration = new Dictionary<string, double>()
+ };
+ iteration.Iteration.Add(metric.Name, value);
+
+ var size = new ScenarioTestModel(name);
+ size.Performance.Metrics.Add(metric);
+ size.Performance.IterationModels.Add(iteration);
+ scenario.Tests.Add(size);
+ }
+ }
+}
diff --git a/tests/src/performance/linkbench/linkbench.csproj b/tests/src/performance/linkbench/linkbench.csproj
new file mode 100644
index 0000000..2a3048a
--- /dev/null
+++ b/tests/src/performance/linkbench/linkbench.csproj
@@ -0,0 +1,41 @@
+<?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>LinkBench</AssemblyName>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{507E3CC2-5D95-414D-9F01-2A106FC177DC}</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\11.0\UITestExtensionPackages</ReferencePath>
+ <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\..\</SolutionDir>
+ <NuGetPackageImportStamp>7a9bfb7d</NuGetPackageImportStamp>
+ <DefineConstants>$(DefineConstants);STATIC</DefineConstants>
+ <NuGetTargetMoniker>.NETStandard,Version=v1.4</NuGetTargetMoniker>
+ </PropertyGroup>
+ <!-- Default configurations to help VS understand the configurations -->
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
+ </PropertyGroup>
+ <PropertyGroup>
+ <ProjectJson>..\project.json</ProjectJson>
+ <ProjectLockJson>..\project.lock.json</ProjectLockJson>
+ </PropertyGroup>
+ <ItemGroup>
+ <CodeAnalysisDependentAssemblyPaths Condition=" '$(VS100COMNTOOLS)' != '' " Include="$(VS100COMNTOOLS)..\IDE\PrivateAssemblies">
+ <Visible>False</Visible>
+ </CodeAnalysisDependentAssemblyPaths>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="linkbench.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
+ </ItemGroup>
+ <Import Project="$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), performance.targets))\performance.targets" />
+</Project>
diff --git a/tests/src/performance/linkbench/scripts/build.cmd b/tests/src/performance/linkbench/scripts/build.cmd
new file mode 100644
index 0000000..88b7eb1
--- /dev/null
+++ b/tests/src/performance/linkbench/scripts/build.cmd
@@ -0,0 +1,116 @@
+@echo off
+
+REM Usage: Build.cmd <LinkBench assets directory>
+setlocal
+call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools\VsDevCmd.bat"
+
+set ROOT=%cd%\LinkBench
+set AssetDir=%1
+set ExitCode=0
+mkdir LinkBench 2> nul
+pushd %ROOT%
+
+echo Build ** HelloWorld **
+cd %ROOT%\HelloWorld
+dotnet restore -r win10-x64
+dotnet publish -c release -r win10-x64
+dotnet msbuild /t:Link /p:LinkerMode=sdk /p:RuntimeIdentifier=win10-x64 /v:n /p:Configuration=release
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+
+echo Build ** WebAPI **
+cd %ROOT%\WebAPI
+dotnet restore -r win10-x64
+dotnet publish -c release -r win10-x64
+dotnet msbuild /t:Link /p:LinkerMode=sdk /p:RuntimeIdentifier=win10-x64 /v:n /p:Configuration=release
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+
+echo Build ** MusicStore **
+cd %ROOT%\JitBench\src\MusicStore
+copy %AssetDir%\MusicStore\MusicStoreReflection.xml .
+dotnet restore -r win10-x64
+dotnet publish -c release -r win10-x64
+dotnet msbuild /t:Link /p:LinkerMode=sdk /p:RuntimeIdentifier=win10-x64 /v:n /p:LinkerRootFiles=MusicStoreReflection.xml /p:Configuration=release
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+
+echo Build ** MusicStore Ready2Run **
+cd %ROOT%\JitBench\src\MusicStore
+powershell -noprofile -executionPolicy RemoteSigned -file Get-Crossgen.ps1
+pushd bin\release\netcoreapp2.0\win10-x64\
+call :SetupR2R publish
+if errorlevel 1 set ExitCode=1
+call :SetupR2R linked
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+
+echo Build ** CoreFX **
+cd %ROOT%\corefx
+set BinPlaceILLinkTrimAssembly=true
+call build.cmd -release
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+
+echo Build ** Roslyn **
+cd %ROOT%\roslyn
+copy %AssetDir%\Roslyn\RoslynRoots.txt .
+copy %AssetDir%\Roslyn\RoslynRoots.xml .
+set RoslynRoot=%cd%
+REM Build Roslyn
+call restore.cmd
+msbuild /m Roslyn.sln /p:Configuration=Release
+REM Fetch ILLink
+mkdir illink
+cd illink
+copy %AssetDir%\Roslyn\illinkcsproj illink.csproj
+dotnet restore illink.csproj -r win10-x64 --packages bin
+cd ..
+REM Create Linker Directory
+cd Binaries\Release\Exes
+mkdir Linked
+cd CscCore
+REM Copy Unmanaged Assets
+FOR /F "delims=" %%I IN ('DIR /b *') DO (
+ corflags %%I >nul 2> nul
+ if errorlevel 1 copy %%I ..\Linked >nul
+)
+copy *.ni.dll ..\Linked
+REM Run Linker
+dotnet %RoslynRoot%\illink\bin\illink.tasks\0.1.0-preview\tools\illink.dll -t -c link -a @%RoslynRoot%\RoslynRoots.txt -x %RoslynRoot%\RoslynRoots.xml -l none -out ..\Linked
+if errorlevel 1 set ExitCode=1
+echo -- Done --
+popd
+
+:Done
+exit /b %ExitCode%
+
+:SetupR2R
+REM Create R2R directory and copy all contents from MSIL to R2R directory
+mkdir %1_r2r
+xcopy /E /Y /Q %1 %1_r2r
+REM Generate Ready2Run images for all MSIL files by running crossgen
+cd %1_r2r
+copy ..\..\..\..\..\crossgen.exe
+FOR /F %%I IN ('dir /b *.dll ^| find /V /I ".ni.dll" ^| find /V /I "System.Private.CoreLib" ^| find /V /I "mscorlib.dll"') DO (
+ REM Don't crossgen Corlib, since the native image already exists.
+ REM For all other MSIL files (corflags returns 0), run crossgen
+ corflags %%I >nul 2>nul
+ if not errorlevel 1 (
+ crossgen /Platform_Assemblies_Paths . %%I >nul 2>nul
+ if errorlevel 1 (
+ exit /b 1
+ )
+ )
+)
+del crossgen.exe
+
+REM Remove the original MSIL files, rename the Ready2Run files .ni.dll --> .dll
+FOR /F "delims=" %%I IN ('dir /b *.dll') DO (
+ if exist %%~nI.ni.dll (
+ del %%I
+ ren %%~nI.ni.dll %%I
+ )
+)
+cd ..
+exit /b 0
diff --git a/tests/src/performance/linkbench/scripts/clone.cmd b/tests/src/performance/linkbench/scripts/clone.cmd
new file mode 100644
index 0000000..ae28d41
--- /dev/null
+++ b/tests/src/performance/linkbench/scripts/clone.cmd
@@ -0,0 +1,30 @@
+@echo off
+
+rmdir /s /q LinkBench
+
+set ROOT=%cd%\LinkBench
+mkdir LinkBench 2> nul
+pushd %ROOT%
+
+mkdir HelloWorld
+cd HelloWorld
+dotnet new console
+if errorlevel 1 exit /b 1
+cd ..
+
+mkdir WebAPI
+cd WebAPI
+dotnet new webapi
+if errorlevel 1 exit /b 1
+cd ..
+
+git clone https://github.com/aspnet/JitBench -b dev
+if errorlevel 1 exit /b 1
+
+git clone http://github.com/dotnet/corefx
+if errorlevel 1 exit /b 1
+
+git clone https://github.com/dotnet/roslyn.git
+if errorlevel 1 exit /b 1
+
+popd \ No newline at end of file
diff --git a/tests/src/performance/linkbench/scripts/empty.cmd b/tests/src/performance/linkbench/scripts/empty.cmd
new file mode 100644
index 0000000..83cb140
--- /dev/null
+++ b/tests/src/performance/linkbench/scripts/empty.cmd
@@ -0,0 +1 @@
+@echo off
diff --git a/tests/src/performance/linkbench/scripts/getcert.cmd b/tests/src/performance/linkbench/scripts/getcert.cmd
new file mode 100644
index 0000000..e02f72d
--- /dev/null
+++ b/tests/src/performance/linkbench/scripts/getcert.cmd
@@ -0,0 +1,2 @@
+@echo off
+"%VS140COMNTOOLS%\..\..\VC\bin\amd64\dumpbin.exe" /headers %1 | findstr /C:"Certificates Directory
diff --git a/tests/src/performance/project.json b/tests/src/performance/project.json
index 1d0eb6d..86a42f2 100644
--- a/tests/src/performance/project.json
+++ b/tests/src/performance/project.json
@@ -1,22 +1,23 @@
{
"dependencies": {
- "xunit.performance.api": "1.0.0-alpha-build0049",
- "xunit.performance.core": "1.0.0-alpha-build0049",
- "xunit.performance.execution": "1.0.0-alpha-build0049",
- "xunit.performance.metrics": "1.0.0-alpha-build0049",
+ "xunit.performance.api": "1.0.0-beta-build0003",
+ "xunit.performance.core": "1.0.0-beta-build0003",
+ "xunit.performance.execution": "1.0.0-beta-build0003",
+ "xunit.performance.metrics": "1.0.0-beta-build0003",
"Microsoft.Diagnostics.Tracing.TraceEvent": "1.0.3-alpha-experimental",
- "Microsoft.NETCore.Platforms": "2.0.0-preview1-25210-01",
+ "Microsoft.NETCore.Platforms": "2.0.0-preview1-25221-01",
"System.Collections.NonGeneric": "4.4.0-beta-24913-02",
"System.Console": "4.4.0-beta-24913-02",
"System.IO.FileSystem": "4.4.0-beta-24913-02",
"System.Linq": "4.4.0-beta-24913-02",
"System.Linq.Expressions": "4.4.0-beta-24913-02",
- "System.Numerics.Vectors": "4.4.0-preview1-25210-01",
+ "System.Numerics.Vectors": "4.4.0-preview1-25221-01",
"System.Reflection": "4.4.0-beta-24913-02",
"System.Reflection.Extensions": "4.4.0-beta-24913-02",
- "System.Reflection.TypeExtensions": "4.4.0-preview1-25210-01",
+ "System.Reflection.TypeExtensions": "4.4.0-preview1-25221-01",
"System.Runtime": "4.4.0-beta-24913-02",
"System.Runtime.Extensions": "4.4.0-beta-24913-02",
+ "System.Runtime.Loader": "4.0.0",
"System.Runtime.Numerics": "4.4.0-beta-24913-02",
"System.Text.RegularExpressions": "4.4.0-beta-24913-02",
"System.Threading": "4.4.0-beta-24913-02",
@@ -31,7 +32,7 @@
"xunit.runner.utility": "2.2.0-beta2-build3300"
},
"frameworks": {
- "netstandard1.4": {
+ "netstandard1.5": {
"imports": [
"dnxcore50",
"portable-net45+win8"
diff --git a/tests/src/readytorun/fieldgetter.il b/tests/src/readytorun/tests/fieldgetter.il
index c2eff20..c2eff20 100644
--- a/tests/src/readytorun/fieldgetter.il
+++ b/tests/src/readytorun/tests/fieldgetter.il
diff --git a/tests/src/readytorun/fieldgetter.ilproj b/tests/src/readytorun/tests/fieldgetter.ilproj
index b3f2aa9..b3f2aa9 100644
--- a/tests/src/readytorun/fieldgetter.ilproj
+++ b/tests/src/readytorun/tests/fieldgetter.ilproj
diff --git a/tests/src/readytorun/generics.cs b/tests/src/readytorun/tests/generics.cs
index 4c41756..4c41756 100644
--- a/tests/src/readytorun/generics.cs
+++ b/tests/src/readytorun/tests/generics.cs
diff --git a/tests/src/readytorun/generics.csproj b/tests/src/readytorun/tests/generics.csproj
index 4ea64b3..4ea64b3 100644
--- a/tests/src/readytorun/generics.csproj
+++ b/tests/src/readytorun/tests/generics.csproj
diff --git a/tests/src/readytorun/genericsload/callgenericctor.cs b/tests/src/readytorun/tests/genericsload/callgenericctor.cs
index 05e16af..05e16af 100644
--- a/tests/src/readytorun/genericsload/callgenericctor.cs
+++ b/tests/src/readytorun/tests/genericsload/callgenericctor.cs
diff --git a/tests/src/readytorun/genericsload/callgenericctor.csproj b/tests/src/readytorun/tests/genericsload/callgenericctor.csproj
index 0f73092..0f73092 100644
--- a/tests/src/readytorun/genericsload/callgenericctor.csproj
+++ b/tests/src/readytorun/tests/genericsload/callgenericctor.csproj
diff --git a/tests/src/readytorun/genericsload/genericslib.il b/tests/src/readytorun/tests/genericsload/genericslib.il
index fdc2f40..fdc2f40 100644
--- a/tests/src/readytorun/genericsload/genericslib.il
+++ b/tests/src/readytorun/tests/genericsload/genericslib.il
diff --git a/tests/src/readytorun/genericsload/genericslib.ilproj b/tests/src/readytorun/tests/genericsload/genericslib.ilproj
index 0454854..0454854 100644
--- a/tests/src/readytorun/genericsload/genericslib.ilproj
+++ b/tests/src/readytorun/tests/genericsload/genericslib.ilproj
diff --git a/tests/src/readytorun/genericsload/usegenericfield.cs b/tests/src/readytorun/tests/genericsload/usegenericfield.cs
index 770334c..770334c 100644
--- a/tests/src/readytorun/genericsload/usegenericfield.cs
+++ b/tests/src/readytorun/tests/genericsload/usegenericfield.cs
diff --git a/tests/src/readytorun/genericsload/usegenericfield.csproj b/tests/src/readytorun/tests/genericsload/usegenericfield.csproj
index 6b9e15a..6b9e15a 100644
--- a/tests/src/readytorun/genericsload/usegenericfield.csproj
+++ b/tests/src/readytorun/tests/genericsload/usegenericfield.csproj
diff --git a/tests/src/readytorun/main.cs b/tests/src/readytorun/tests/main.cs
index 783c1fd..783c1fd 100644
--- a/tests/src/readytorun/main.cs
+++ b/tests/src/readytorun/tests/main.cs
diff --git a/tests/src/readytorun/mainv1.csproj b/tests/src/readytorun/tests/mainv1.csproj
index cca0b41..cca0b41 100644
--- a/tests/src/readytorun/mainv1.csproj
+++ b/tests/src/readytorun/tests/mainv1.csproj
diff --git a/tests/src/readytorun/mainv2.csproj b/tests/src/readytorun/tests/mainv2.csproj
index acf898e..acf898e 100644
--- a/tests/src/readytorun/mainv2.csproj
+++ b/tests/src/readytorun/tests/mainv2.csproj
diff --git a/tests/src/readytorun/test.cs b/tests/src/readytorun/tests/test.cs
index 8a6beae..8a6beae 100644
--- a/tests/src/readytorun/test.cs
+++ b/tests/src/readytorun/tests/test.cs
diff --git a/tests/src/readytorun/testv1/test.csproj b/tests/src/readytorun/tests/testv1/test.csproj
index c56c53c..c56c53c 100644
--- a/tests/src/readytorun/testv1/test.csproj
+++ b/tests/src/readytorun/tests/testv1/test.csproj
diff --git a/tests/src/readytorun/testv2/test.csproj b/tests/src/readytorun/tests/testv2/test.csproj
index 058a0d6..058a0d6 100644
--- a/tests/src/readytorun/testv2/test.csproj
+++ b/tests/src/readytorun/tests/testv2/test.csproj