First steps towards x86 compatible crossgen2 (#42471)
authorDavid Wrighton <davidwr@microsoft.com>
Tue, 22 Sep 2020 17:54:17 +0000 (10:54 -0700)
committerGitHub <noreply@github.com>
Tue, 22 Sep 2020 17:54:17 +0000 (10:54 -0700)
commitab05dc85ad34a20cf21260ad2c70c7278c562cc9
tree86cef50e68581c6dab736b2c8dac68cefedcf2d9
parent2483700909f03107c4219def40e48671fa250e5c
First steps towards x86 compatible crossgen2 (#42471)

- Fix bug in crossgen2 around compilation of type forwarder only assemblies
- Use 64bit x86 crossgen2 when running crossgen2 as part of test build
- Disable inlined pinvoke generation on X86 until failures are understood
- Autolayout alignment should align to 4 byte offsets on X86 platforms
- Convert ArgIterator to use CoreCLR ABI instead of ProjectN ABI
- Align instance fields of classes to the start of the fields of the object, not the start of the object
- Fix hardware intrinsic support for X86
- MDArray address method uses custom calling convention on X86
- X86 JIT expects VM to normalize some single element structures to int, and inptr types
- Enable crossgen2smoke test for x86

With this change the crossgen2smoke test passes when compiled with crossgen2, as do simpler tests which use a crossgen2 compiled variant of the framework libraries. crossgen2smoke + libraries compiled with crossgen2 does not pass due to issues in resource handling.
23 files changed:
src/coreclr/src/tools/Common/Compiler/InstructionSetSupport.cs
src/coreclr/src/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs
src/coreclr/src/tools/Common/JitInterface/CorInfoImpl.cs
src/coreclr/src/tools/Common/JitInterface/CorInfoInstructionSet.cs
src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/InstructionSetGenerator.cs
src/coreclr/src/tools/Common/JitInterface/ThunkGenerator/Program.cs
src/coreclr/src/tools/Common/TypeSystem/Common/LayoutInt.cs
src/coreclr/src/tools/Common/TypeSystem/Common/MetadataFieldLayoutAlgorithm.cs
src/coreclr/src/tools/Common/TypeSystem/Common/TargetDetails.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ArgIterator.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/GCRefMapBuilder.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/HeaderNode.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/ImportThunk.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilationModuleGroupBase.cs
src/coreclr/src/tools/aot/ILCompiler.ReadyToRun/Compiler/ReadyToRunCompilerContext.cs
src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/ArchitectureSpecificFieldLayoutTests.cs
src/coreclr/src/tools/aot/ILCompiler.TypeSystem.ReadyToRun.Tests/UniversalGenericFieldLayoutTests.cs
src/tests/Common/Directory.Build.targets
src/tests/build.cmd
src/tests/build.sh
src/tests/readytorun/crossgen2/Program.cs
src/tests/readytorun/crossgen2/crossgen2smoke.csproj