summaryrefslogtreecommitdiff
path: root/src/inc
diff options
context:
space:
mode:
authorSergey Andreenko <seandree@microsoft.com>2019-05-23 21:24:44 -0700
committerGitHub <noreply@github.com>2019-05-23 21:24:44 -0700
commitd5d18896900561b7aaf38ba9501a8525a4b9caea (patch)
tree60f975b42a41b38562b2cb0324f2dcc923036ecf /src/inc
parent267f8299ac1fd97430284fa6d44e5e9c6ed26850 (diff)
downloadcoreclr-d5d18896900561b7aaf38ba9501a8525a4b9caea.tar.gz
coreclr-d5d18896900561b7aaf38ba9501a8525a4b9caea.tar.bz2
coreclr-d5d18896900561b7aaf38ba9501a8525a4b9caea.zip
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.
Diffstat (limited to 'src/inc')
-rw-r--r--src/inc/gcinfotypes.h14
1 files changed, 14 insertions, 0 deletions
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