diff options
Diffstat (limited to 'rts')
-rw-r--r-- | rts/Adjustor.c | 2 | ||||
-rw-r--r-- | rts/StgCRun.c | 4 | ||||
-rw-r--r-- | rts/linker/elf_plt_aarch64.c | 4 | ||||
-rw-r--r-- | rts/linker/elf_reloc.c | 2 | ||||
-rw-r--r-- | rts/package.conf.in | 2 | ||||
-rw-r--r-- | rts/rts.cabal.in | 2 | ||||
-rw-r--r-- | rts/sm/Storage.c | 8 |
7 files changed, 12 insertions, 12 deletions
diff --git a/rts/Adjustor.c b/rts/Adjustor.c index d360cfe87b..7fc931344c 100644 --- a/rts/Adjustor.c +++ b/rts/Adjustor.c @@ -99,7 +99,7 @@ freeHaskellFunctionPtr(void* ptr) { ffi_closure *cl; -#if defined(ios_HOST_OS) +#if defined(ios_HOST_OS) || defined(darwin_HOST_OS) cl = execToWritable(ptr); #else cl = (ffi_closure*)ptr; diff --git a/rts/StgCRun.c b/rts/StgCRun.c index 31dc9dd42a..536ee45835 100644 --- a/rts/StgCRun.c +++ b/rts/StgCRun.c @@ -932,7 +932,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { "br %1\n\t" ".globl " STG_RETURN "\n\t" -#if !defined(ios_HOST_OS) +#if !defined(ios_HOST_OS) && !defined(darwin_HOST_OS) ".type " STG_RETURN ", %%function\n" #endif STG_RETURN ":\n\t" @@ -941,7 +941,7 @@ StgRun(StgFunPtr f, StgRegTable *basereg) { */ "add sp, sp, %3\n\t" /* - * Return the new register table, taking it from Stg's R1 (ARM64's R22). + * Return the new register table, taking it from Stg's R1 (AArch64's R22). */ "mov %0, x22\n\t" /* diff --git a/rts/linker/elf_plt_aarch64.c b/rts/linker/elf_plt_aarch64.c index 6a9d1ddd94..11354a63db 100644 --- a/rts/linker/elf_plt_aarch64.c +++ b/rts/linker/elf_plt_aarch64.c @@ -46,8 +46,8 @@ bool needStubForRelaAarch64(Elf_Rela * rela) { bool makeStubAarch64(Stub * s) { // We (the linker) may corrupt registers x16 (IP0) and x17 (IP1) [AAPCS64] - // and the condition flags, according to the "ELF for the ARM64 - // Architecture". + // and the condition flags, according to the "ELF for the ARM 64-bit + // Architecture (AArch64)". // // [Special purpose regs] // X16 and X17 are IP0 and IP1, intra-procedure-call temporary registers. diff --git a/rts/linker/elf_reloc.c b/rts/linker/elf_reloc.c index 410a23607b..c2271b6e60 100644 --- a/rts/linker/elf_reloc.c +++ b/rts/linker/elf_reloc.c @@ -4,7 +4,7 @@ #if defined(OBJFORMAT_ELF) -/* we currently only use this abstraction for elf/arm64 */ +/* we currently only use this abstraction for elf/aarch64 */ #if defined(aarch64_HOST_ARCH) bool diff --git a/rts/package.conf.in b/rts/package.conf.in index 8b7390865b..718fa1b203 100644 --- a/rts/package.conf.in +++ b/rts/package.conf.in @@ -318,7 +318,7 @@ ld-options: , "-Wl,-search_paths_first" #endif -#if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH) +#if defined(darwin_HOST_OS) && !defined(x86_64_HOST_ARCH) && !defined(aarch64_HOST_ARCH) , "-read_only_relocs", "warning" #endif diff --git a/rts/rts.cabal.in b/rts/rts.cabal.in index 12a4d68e4a..6c7e68d28a 100644 --- a/rts/rts.cabal.in +++ b/rts/rts.cabal.in @@ -398,7 +398,7 @@ library if os(osx) ld-options: "-Wl,-search_paths_first" - if !arch(x86_64) + if !arch(x86_64) && !arch(aarch64) ld-options: -read_only_relocs warning cmm-sources: Apply.cmm 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; |