summaryrefslogtreecommitdiff
path: root/rts/sm
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2020-11-13 02:51:54 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-11-15 03:36:56 -0500
commit8887102fc4ed8ed1089c1aafd19bab424ad706f3 (patch)
treee1c3dfc5d2262efbc6dc6ccb902b288766566d90 /rts/sm
parent645444af9eb185684c750c95e4740d301352b2b9 (diff)
downloadhaskell-8887102fc4ed8ed1089c1aafd19bab424ad706f3.tar.gz
AArch64/arm64 adjustments
This addes the necessary logic to support aarch64 on elf, as well as aarch64 on mach-o, which Apple calls arm64. We change architecture name to AArch64, which is the official arm naming scheme.
Diffstat (limited to 'rts/sm')
-rw-r--r--rts/sm/Storage.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/rts/sm/Storage.c b/rts/sm/Storage.c
index f5419abc9c..b9ae97af4c 100644
--- a/rts/sm/Storage.c
+++ b/rts/sm/Storage.c
@@ -30,7 +30,7 @@
#include "GC.h"
#include "Evac.h"
#include "NonMoving.h"
-#if defined(ios_HOST_OS)
+#if defined(ios_HOST_OS) || defined(darwin_HOST_OS)
#include "Hash.h"
#endif
@@ -1648,7 +1648,7 @@ StgWord calcTotalCompactW (void)
should be modified to use allocateExec instead of VirtualAlloc.
------------------------------------------------------------------------- */
-#if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
+#if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && (defined(ios_HOST_OS) || defined(darwin_HOST_OS))
#include <libkern/OSCacheControl.h>
#endif
@@ -1679,7 +1679,7 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
/* x86 doesn't need to do anything, so just suppress some warnings. */
(void)len;
(void)exec_addr;
-#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && defined(ios_HOST_OS)
+#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && (defined(ios_HOST_OS) || defined(darwin_HOST_OS))
/* On iOS we need to use the special 'sys_icache_invalidate' call. */
sys_icache_invalidate(exec_addr, len);
#elif defined(__clang__)
@@ -1734,7 +1734,7 @@ void freeExec (AdjustorExecutable addr)
RELEASE_SM_LOCK
}
-#elif defined(ios_HOST_OS)
+#elif (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && (defined(ios_HOST_OS) || defined(darwin_HOST_OS))
static HashTable* allocatedExecs;