diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2020-11-13 02:51:54 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-11-15 03:36:56 -0500 |
commit | 8887102fc4ed8ed1089c1aafd19bab424ad706f3 (patch) | |
tree | e1c3dfc5d2262efbc6dc6ccb902b288766566d90 /includes | |
parent | 645444af9eb185684c750c95e4740d301352b2b9 (diff) | |
download | haskell-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 'includes')
-rw-r--r-- | includes/CodeGen.Platform.hs | 3 | ||||
-rw-r--r-- | includes/rts/Flags.h | 2 | ||||
-rw-r--r-- | includes/rts/storage/GC.h | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs index 2ae86d303b..b00acfa38a 100644 --- a/includes/CodeGen.Platform.hs +++ b/includes/CodeGen.Platform.hs @@ -94,7 +94,7 @@ import GHC.Platform.Reg # define zmm14 30 # define zmm15 31 --- Note: these are only needed for ARM/ARM64 because globalRegMaybe is now used in CmmSink.hs. +-- Note: these are only needed for ARM/AArch64 because globalRegMaybe is now used in CmmSink.hs. -- Since it's only used to check 'isJust', the actual values don't matter, thus -- I'm not sure if these are the correct numberings. -- Normally, the register names are just stringified as part of the REG() macro @@ -1096,4 +1096,3 @@ freeReg _ = True freeReg = panic "freeReg not defined for this platform" #endif - diff --git a/includes/rts/Flags.h b/includes/rts/Flags.h index dcaf0d8bd2..9455892cdb 100644 --- a/includes/rts/Flags.h +++ b/includes/rts/Flags.h @@ -199,6 +199,8 @@ typedef struct _CONCURRENT_FLAGS { * When linkerAlwaysPic is true, the runtime linker assume that all object * files were compiled with -fPIC -fexternal-dynamic-refs and load them * anywhere in the address space. + * Note that there is no 32bit darwin system we can realistically expect to + * run on or compile for. */ #if defined(darwin_HOST_OS) || defined(aarch64_HOST_ARCH) #define DEFAULT_LINKER_ALWAYS_PIC true diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index a364682741..6bc7157bd6 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -202,7 +202,7 @@ typedef void* AdjustorExecutable; AdjustorWritable allocateExec(W_ len, AdjustorExecutable *exec_addr); void flushExec(W_ len, AdjustorExecutable exec_addr); -#if defined(ios_HOST_OS) +#if (defined(arm_HOST_ARCH) || defined(aarch64_HOST_ARCH)) && (defined(ios_HOST_OS) || defined(darwin_HOST_OS)) AdjustorWritable execToWritable(AdjustorExecutable exec); #endif void freeExec (AdjustorExecutable p); |