summaryrefslogtreecommitdiff
path: root/src/inc/gcinfo.h
diff options
context:
space:
mode:
authorJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
committerJiyoung Yun <jy910.yun@samsung.com>2016-12-27 07:46:08 (GMT)
commitdb20f3f1bb8595633a7e16c8900fd401a453a6b5 (patch)
treee5435159cd1bf0519276363a6fe1663d1721bed3 /src/inc/gcinfo.h
parent4b4aad7217d3292650e77eec2cf4c198ea9c3b4b (diff)
downloadcoreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.zip
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.gz
coreclr-db20f3f1bb8595633a7e16c8900fd401a453a6b5.tar.bz2
Imported Upstream version 1.0.0.9127upstream/1.0.0.9127
Diffstat (limited to 'src/inc/gcinfo.h')
-rw-r--r--src/inc/gcinfo.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/inc/gcinfo.h b/src/inc/gcinfo.h
index 8d249a3..e5537e0 100644
--- a/src/inc/gcinfo.h
+++ b/src/inc/gcinfo.h
@@ -32,15 +32,21 @@ const unsigned this_OFFSET_FLAG = 0x2; // the offset is "this"
// The current GCInfo Version
//-----------------------------------------------------------------------------
-#ifdef _TARGET_X86_
-// X86 GcInfo encoding is yet to be changed.
-#define GCINFO_VERSION 1
-#else
#define GCINFO_VERSION 2
-#endif // _TARGET_X86_
#define MIN_GCINFO_VERSION_WITH_RETURN_KIND 2
#define MIN_GCINFO_VERSION_WITH_REV_PINVOKE_FRAME 2
+
+inline BOOL GCInfoEncodesReturnKind(UINT32 version=GCINFO_VERSION)
+{
+ return version >= MIN_GCINFO_VERSION_WITH_RETURN_KIND;
+}
+
+inline BOOL GCInfoEncodesRevPInvokeFrame(UINT32 version=GCINFO_VERSION)
+{
+ return version >= MIN_GCINFO_VERSION_WITH_REV_PINVOKE_FRAME;
+}
+
//-----------------------------------------------------------------------------
// GCInfoToken: A wrapper that contains the GcInfo data and version number.
//
@@ -62,11 +68,11 @@ struct GCInfoToken
BOOL IsReturnKindAvailable()
{
- return (Version >= MIN_GCINFO_VERSION_WITH_RETURN_KIND);
+ return GCInfoEncodesReturnKind(Version);
}
BOOL IsReversePInvokeFrameAvailable()
{
- return (Version >= MIN_GCINFO_VERSION_WITH_REV_PINVOKE_FRAME);
+ return GCInfoEncodesRevPInvokeFrame(Version);
}
static UINT32 ReadyToRunVersionToGcInfoVersion(UINT32 readyToRunMajorVersion)