Fix ARM64 HFA arguments passing via reflection (dotnet/coreclr#26174)
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 15 Aug 2019 23:52:25 +0000 (01:52 +0200)
committerGitHub <noreply@github.com>
Thu, 15 Aug 2019 23:52:25 +0000 (01:52 +0200)
commit978129cc23e47267a7cdebf8df58684f2102491d
tree50501a7f385202c0b82a281b89843a7c09900c00
parentcc236a5c8e445ec21b25bc28db76c11876c1fb46
Fix ARM64 HFA arguments passing via reflection (dotnet/coreclr#26174)

* Fix ARM64 HFA arguments passing via reflection

There was an issue happening in case there were not enough floating point
registers for passing a HFA argument. The argument iterator was returning
confusing result for such argument. The offset was correctly pointing to
stack, but the state indicated that the arguments should be passed in
registers. That caused the argument to be passed incorrectly.

The fix is to not set m_hasArgLocDescForStructInRegs when the HFA doesn't
fit into registers.

Commit migrated from https://github.com/dotnet/coreclr/commit/230c33193842d28c8d6c2a341563f7defd4febc4
src/coreclr/src/vm/callingconvention.h
src/coreclr/tests/src/JIT/Stress/ABI/Program.cs