pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

corert-git: Add more hacks for storing ptrs to functions in void*



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Sun Jan 24 22:44:54 2016 +0100
Changeset:	052a68d24e4f4530c5c9b2560976015fab0c2af2

Modified Files:
	corert-git/distinfo
Added Files:
	corert-git/patches/patch-src_Native_Runtime_gcrhenv.cpp
	corert-git/patches/patch-src_Native_Runtime_gcrhscan.cpp
	corert-git/patches/patch-src_Native_Runtime_thread.cpp
	corert-git/patches/patch-src_Native_gc_env_gcenv.interlocked.inl

Log Message:
corert-git: Add more hacks for storing ptrs to functions in void*

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=052a68d24e4f4530c5c9b2560976015fab0c2af2

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 corert-git/distinfo                                |  4 +++
 .../patches/patch-src_Native_Runtime_gcrhenv.cpp   | 22 ++++++++++++++++
 .../patches/patch-src_Native_Runtime_gcrhscan.cpp  | 22 ++++++++++++++++
 .../patches/patch-src_Native_Runtime_thread.cpp    | 30 ++++++++++++++++++++++
 .../patch-src_Native_gc_env_gcenv.interlocked.inl  | 13 ++++++++++
 5 files changed, 91 insertions(+)

diffs:
diff --git a/corert-git/distinfo b/corert-git/distinfo
index 3fc4830..6168987 100644
--- a/corert-git/distinfo
+++ b/corert-git/distinfo
@@ -2,3 +2,7 @@ $NetBSD$
 
 SHA1 (patch-src_Native_Runtime_CachedInterfaceDispatch.cpp) = 1485afd92ab2748e8d5f97708124e06aebd592f2
 SHA1 (patch-src_Native_Runtime_EHHelpers.cpp) = 2f64d4d24096fe6e36ef79aa80f1600bd96eda58
+SHA1 (patch-src_Native_Runtime_gcrhenv.cpp) = d76cb47a9e0e8e35c9512d61e2ddfc23c0dccbc9
+SHA1 (patch-src_Native_Runtime_gcrhscan.cpp) = 9326e04f09a35cf435a4d38e70cb02f9f59df351
+SHA1 (patch-src_Native_Runtime_thread.cpp) = 90cc0624800bba44cb798b7623ecfbc618853cd8
+SHA1 (patch-src_Native_gc_env_gcenv.interlocked.inl) = 0dc2cc6aa827a84e91360976d9217c6e69adb328
diff --git a/corert-git/patches/patch-src_Native_Runtime_gcrhenv.cpp b/corert-git/patches/patch-src_Native_Runtime_gcrhenv.cpp
new file mode 100644
index 0000000..0ec7be9
--- /dev/null
+++ b/corert-git/patches/patch-src_Native_Runtime_gcrhenv.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/Native/Runtime/gcrhenv.cpp.orig	2016-01-23 11:26:49.000000000 +0000
++++ src/Native/Runtime/gcrhenv.cpp
+@@ -717,7 +717,7 @@ void RedhawkGCInterface::ScanStackRoots(
+     sContext.m_pfnCallback = pfnScanCallback;
+     sContext.m_pContext = pContext;
+ 
+-    pThread->GcScanRoots(ScanRootsCallbackWrapper, &sContext);
++    pThread->GcScanRoots(reinterpret_cast<void*>(ScanRootsCallbackWrapper), &sContext);
+ #else
+     UNREFERENCED_PARAMETER(pThread);
+     UNREFERENCED_PARAMETER(pfnScanCallback);
+@@ -735,7 +735,7 @@ void RedhawkGCInterface::ScanStaticRoots
+     sContext.m_pfnCallback = pfnScanCallback;
+     sContext.m_pContext = pContext;
+ 
+-    GetRuntimeInstance()->EnumAllStaticGCRefs(ScanRootsCallbackWrapper, &sContext);
++    GetRuntimeInstance()->EnumAllStaticGCRefs(reinterpret_cast<void*>(ScanRootsCallbackWrapper), &sContext);
+ #else
+     UNREFERENCED_PARAMETER(pfnScanCallback);
+     UNREFERENCED_PARAMETER(pContext);
diff --git a/corert-git/patches/patch-src_Native_Runtime_gcrhscan.cpp b/corert-git/patches/patch-src_Native_Runtime_gcrhscan.cpp
new file mode 100644
index 0000000..953695a
--- /dev/null
+++ b/corert-git/patches/patch-src_Native_Runtime_gcrhscan.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+--- src/Native/Runtime/gcrhscan.cpp.orig	2016-01-23 11:26:49.000000000 +0000
++++ src/Native/Runtime/gcrhscan.cpp
+@@ -30,7 +30,7 @@
+ 
+ void EnumAllStaticGCRefs(EnumGcRefCallbackFunc * fn, EnumGcRefScanContext * sc)
+ {
+-    GetRuntimeInstance()->EnumAllStaticGCRefs(fn, sc);
++    GetRuntimeInstance()->EnumAllStaticGCRefs(reinterpret_cast<void*>(fn), sc);
+ }
+ 
+ /*
+@@ -65,7 +65,7 @@ VOID GCToEEInterface::GcScanRoots(EnumGc
+ #if defined(FEATURE_EVENT_TRACE) && !defined(DACCESS_COMPILE)
+             sc->dwEtwRootKind = kEtwGCRootKindStack;
+ #endif
+-            pThread->GcScanRoots(fn, sc);
++            pThread->GcScanRoots(reinterpret_cast<void*>(fn), sc);
+ 
+ #if defined(FEATURE_EVENT_TRACE) && !defined(DACCESS_COMPILE)
+             sc->dwEtwRootKind = kEtwGCRootKindOther;
diff --git a/corert-git/patches/patch-src_Native_Runtime_thread.cpp b/corert-git/patches/patch-src_Native_Runtime_thread.cpp
new file mode 100644
index 0000000..081a345
--- /dev/null
+++ b/corert-git/patches/patch-src_Native_Runtime_thread.cpp
@@ -0,0 +1,30 @@
+$NetBSD$
+
+--- src/Native/Runtime/thread.cpp.orig	2016-01-23 11:26:49.000000000 +0000
++++ src/Native/Runtime/thread.cpp
+@@ -540,9 +540,9 @@ EXTERN_C void FASTCALL RhpGcProbeHijackB
+ 
+ static void* NormalHijackTargets[3]     = 
+ {
+-    RhpGcProbeHijackScalar, // GCRK_Scalar = 0,
+-    RhpGcProbeHijackObject, // GCRK_Object  = 1,
+-    RhpGcProbeHijackByref   // GCRK_Byref  = 2,
++    reinterpret_cast<void*>(RhpGcProbeHijackScalar), // GCRK_Scalar = 0,
++    reinterpret_cast<void*>(RhpGcProbeHijackObject), // GCRK_Object  = 1,
++    reinterpret_cast<void*>(RhpGcProbeHijackByref)   // GCRK_Byref  = 2,
+ };
+ 
+ #ifdef FEATURE_GC_STRESS
+@@ -552,9 +552,9 @@ EXTERN_C void FASTCALL RhpGcStressHijack
+ 
+ static void* GcStressHijackTargets[3]   = 
+ { 
+-    RhpGcStressHijackScalar, // GCRK_Scalar = 0,
+-    RhpGcStressHijackObject, // GCRK_Object  = 1,
+-    RhpGcStressHijackByref   // GCRK_Byref  = 2,
++    reinterpret_cast<void*>(RhpGcStressHijackScalar), // GCRK_Scalar = 0,
++    reinterpret_cast<void*>(RhpGcStressHijackObject), // GCRK_Object  = 1,
++    reinterpret_cast<void*>(RhpGcStressHijackByref)   // GCRK_Byref  = 2,
+ };
+ #endif // FEATURE_GC_STRESS
+ 
diff --git a/corert-git/patches/patch-src_Native_gc_env_gcenv.interlocked.inl b/corert-git/patches/patch-src_Native_gc_env_gcenv.interlocked.inl
new file mode 100644
index 0000000..65b99f0
--- /dev/null
+++ b/corert-git/patches/patch-src_Native_gc_env_gcenv.interlocked.inl
@@ -0,0 +1,13 @@
+$NetBSD$
+
+--- src/Native/gc/env/gcenv.interlocked.inl.orig	2016-01-23 11:26:49.000000000 +0000
++++ src/Native/gc/env/gcenv.interlocked.inl
+@@ -193,7 +193,7 @@ __forceinline T Interlocked::CompareExch
+     return (T)(TADDR)_InterlockedCompareExchange((long volatile *)(void* volatile *)destination, (long)(void*)exchange, (long)(void*)comparand);
+ #endif
+ #else
+-    return (T)(TADDR)__sync_val_compare_and_swap((void* volatile *)destination, comparand, exchange);
++    return (T)(TADDR)__sync_val_compare_and_swap((void* volatile *)destination, comparand, reinterpret_cast<void*>(exchange));
+ #endif
+ }
+ 


Home | Main Index | Thread Index | Old Index