Support !JitDoOldStructRetyping on other platforms. (#35943)
authorSergey Andreenko <seandree@microsoft.com>
Wed, 20 May 2020 22:52:13 +0000 (15:52 -0700)
committerGitHub <noreply@github.com>
Wed, 20 May 2020 22:52:13 +0000 (15:52 -0700)
commit41882cbf086270042f65445dc54cfec9a4b54c50
treecc988a02e29e341f4ef17ea6f8293f2d89a24795
parentfa99dbad0d7687fe86b5f80ad610e92f0bf6c9a9
Support !JitDoOldStructRetyping on  other platforms. (#35943)

* Add more test cases.

* Initialize `ReturnTypeDesc` when we keep struct types.

* Add a few const modifiers.

* Additional checks in `LowerRet`

* Support `return double(cnst int)`.

* Optimize `LowerRetStruct`: no need for bitcast when read from memory.

* Prepare `LowerNode` for store local and local field to multireg.

* Compile the new methods with FEATURE_MULTIREG_RET.

* Improve `LowerRetStructLclVar`.

Don't use bitcast if the source is in memory or has the same type.

* Extract `LowerStoreLocCommon`.

* Support 3, 5. 6, 7 bytes structs in `LowerCallStruct`.

Move call handling to the users.

* Disable `JitDoOldStructRetyping` for x86 and x64.

Windows  x64 was supported in a previous PR, this adds x86 (Windows and Linux) and x64 Unix.

* Fix suggestions.

* Disable by default for the merge.
src/coreclr/src/jit/importer.cpp
src/coreclr/src/jit/jitconfigvalues.h
src/coreclr/src/jit/lower.cpp
src/coreclr/src/jit/lower.h
src/coreclr/src/jit/lowerarmarch.cpp
src/coreclr/src/jit/lowerxarch.cpp
src/coreclr/tests/src/JIT/Directed/StructABI/structreturn.cs