Vector abi tests and reverse pinvoke fixes (#32034)
authorDavid Wrighton <davidwr@microsoft.com>
Thu, 13 Feb 2020 23:44:41 +0000 (15:44 -0800)
committerGitHub <noreply@github.com>
Thu, 13 Feb 2020 23:44:41 +0000 (15:44 -0800)
commit3a844ad951fda36fe3b570cc3af10738d898a7b3
tree2ea5c5b9dd75b7457594f70f14dd2a147069ecc6
parent93282844dd712af0edb5731fc30f593aa499cddd
Vector abi tests and reverse pinvoke fixes (#32034)

- Fix issues noted in returning structures from reverse p/invokes

* Add tests for marshalling Vector2/3/4
- Anticipated work on Windows Amd64 calling conventions may affect this, so this needs testing
* Updates to add return struct marshalling tests/fixes
- Adjust some reverse p/invoke struct marshalling tests to add coverage for returning structures
  - Coverage includes a 3 byte, 4 byte struct, 8 byte struct, and a large struct
  - Note: There is a code in mlinfo.cpp which explicitly makes support for returning 3, 5, 6, and 7 on X86 follow the wrong calling convention by rounding the size to a 4 byte boundary. I've left this unfortunate detail in place.
* Re-encode ReversePInvokeTest.cs to utf8 to reduce future diffing burden
14 files changed:
src/coreclr/src/vm/dllimport.cpp
src/coreclr/tests/src/Interop/CMakeLists.txt
src/coreclr/tests/src/Interop/PInvoke/Vector2_3_4/CMakeLists.txt [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Vector2_3_4/Vector2_3_4.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Vector2_3_4/Vector2_3_4.csproj [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Vector2_3_4/Vector2_3_4TestNative.cpp [new file with mode: 0644]
src/coreclr/tests/src/Interop/PInvoke/Vector2_3_4/Vector2_3_4TestNative.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/Helper.cs
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest.cs [deleted file]
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest.csproj
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs [new file with mode: 0644]
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.cpp
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/SeqStructDelRevPInvokeNative.h
src/coreclr/tests/src/Interop/StructMarshalling/ReversePInvoke/Struct.cs