From d5d18896900561b7aaf38ba9501a8525a4b9caea Mon Sep 17 00:00:00 2001 From: Sergey Andreenko Date: Thu, 23 May 2019 21:24:44 -0700 Subject: Delete RETURNTYPE and change how we get ReturnKind for gccover. (#24600) * Move GetReturnKindFromMethodTable to method.hpp. We would need this in other places in the next commits. * Delete unnecessary checks from callhelpers. * Do not check return types in CanDeduplicateCode. GC info v.2 has this information and it is checked in another place. * Change ComPlusMethodFrame to use the new function. * Change gccover.cpp to use GetReturnKindFromMethodTable. * Delete RETURNTYPE. * Add check to ComPlusMethodFrame. * Delete check from threadsuspend. codeInfo->GetCodeManager()->GetReturnKind(gcInfoToken) must always return a valid kind nowdays (it could return an invalid lind only when GC Info v2 was not available). * Rename functions/arguments. * Add check for IsValidReturnKind. * delete unused var. --- src/inc/gcinfotypes.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/inc') diff --git a/src/inc/gcinfotypes.h b/src/inc/gcinfotypes.h index 6abf0890c8..652ab9fbff 100644 --- a/src/inc/gcinfotypes.h +++ b/src/inc/gcinfotypes.h @@ -267,6 +267,20 @@ inline bool IsStructReturnKind(ReturnKind returnKind) return returnKind > 3; } +inline bool IsScalarReturnKind(ReturnKind returnKind) +{ + return (returnKind == RT_Scalar) +#ifdef _TARGET_X86_ + || (returnKind == RT_Float) +#endif // _TARGET_X86_ + ; +} + +inline bool IsPointerReturnKind(ReturnKind returnKind) +{ + return IsValidReturnKind(returnKind) && !IsScalarReturnKind(returnKind); +} + // Helpers for combining/extracting individual ReturnKinds from/to Struct ReturnKinds. // Encoding is two bits per register -- cgit v1.2.3