GcInfo: Report Struct containing one GcPointer correctly
authorSwaroop Sridhar <swaroops@microsoft.com>
Wed, 31 Aug 2016 23:04:30 +0000 (16:04 -0700)
committerSwaroop Sridhar <swaroops@microsoft.com>
Thu, 1 Sep 2016 02:31:53 +0000 (19:31 -0700)
commitfb0cecb660b9a672f8d497b1e23341a89af6deb1
treed3967975e859c08ed1285ee2426886817730581e
parent344c34035433e41b55148c49eadae04982f37844
GcInfo: Report Struct containing one GcPointer correctly

This change fixes a bug in the the GcInfo header,
where the ReturnKind is reported incorrectly for certain structs.

Structs that contain only one GCPointer or ByRef, can be returned
in a single register (Windows/Unix/OSX). The ReturnKind for these
struct-returns should be RT_Object/RT_ByRef, but they are currently
incorrectly reported as RT_Scalar. This change fixes the problem.

Fixes: dotnet/corefxdotnet/coreclr#11260

Commit migrated from https://github.com/dotnet/coreclr/commit/060e0c660decc4a694765bd1133fe1e5a59536be
src/coreclr/src/jit/compiler.cpp
src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/gcencode.cpp