[commit: ghc] master: Revert "rts/sm/Storage.c: tweak __clear_cache proto for clang" (7040660)

git at git.haskell.org git at git.haskell.org
Wed Jul 5 08:15:48 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/7040660528f597c12f8bc49ca87f3697ab3d3653/ghc

>---------------------------------------------------------------

commit 7040660528f597c12f8bc49ca87f3697ab3d3653
Author: Sergei Trofimovich <slyfox at gentoo.org>
Date:   Wed Jul 5 09:13:09 2017 +0100

    Revert "rts/sm/Storage.c: tweak __clear_cache proto for clang"
    
    This reverts commit 9492703a5862ee8623455209e50344cf8c4de077.
    
    Incomplete patch (missing begin, end assignments).


>---------------------------------------------------------------

7040660528f597c12f8bc49ca87f3697ab3d3653
 rts/sm/Storage.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index f518856..e243517 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -1341,13 +1341,7 @@ StgWord calcTotalCompactW (void)
 #include <libkern/OSCacheControl.h>
 #endif
 
-#if defined(__CLANG__)
-/* clang defines __clear_cache as a builtin on some platforms.
- * For example on armv7-linux-androideabi. The type slightly
- * differs from gcc.
- */
-extern void __clear_cache(void * begin, void * end);
-#elif defined(__GNUC__)
+#if defined(__GNUC__)
 /* __clear_cache is a libgcc function.
  * It existed before __builtin___clear_cache was introduced.
  * See Trac #8562.
@@ -1366,16 +1360,11 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
 #elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
   /* On iOS we need to use the special 'sys_icache_invalidate' call. */
   sys_icache_invalidate(exec_addr, len);
-#elif defined(__CLANG__)
-# if __has_builtin(__builtin___clear_cache)
-  __builtin___clear_cache((void*)begin, (void*)end);
-# else
-  __clear_cache((void*)begin, (void*)end);
-# endif
 #elif defined(__GNUC__)
   /* For all other platforms, fall back to a libgcc builtin. */
   unsigned char* begin = (unsigned char*)exec_addr;
   unsigned char* end   = begin + len;
+
   /* __builtin___clear_cache is supported since GNU C 4.3.6.
    * We pick 4.4 to simplify condition a bit.
    */



More information about the ghc-commits mailing list