[Git][ghc/ghc][wip/angerman/aarch64-ncg] 3 commits: [AArch64] Aarch64 Always PIC
Moritz Angermann
gitlab at gitlab.haskell.org
Mon Oct 26 05:15:12 UTC 2020
Moritz Angermann pushed to branch wip/angerman/aarch64-ncg at Glasgow Haskell Compiler / GHC
Commits:
92127659 by Moritz Angermann at 2020-10-26T10:46:14+08:00
[AArch64] Aarch64 Always PIC
- - - - -
42f4c7de by Moritz Angermann at 2020-10-26T10:46:52+08:00
[Adjustors] Proper allocator handling.
- - - - -
5764bca3 by Moritz Angermann at 2020-10-26T13:11:48+08:00
[CmmSized Int] fix haddock
- - - - -
4 changed files:
- compiler/GHC/Builtin/primops.txt.pp
- includes/rts/Flags.h
- rts/RtsSymbols.c
- rts/sm/Storage.c
Changes:
=====================================
compiler/GHC/Builtin/primops.txt.pp
=====================================
@@ -412,6 +412,8 @@ section "Int32#"
{Operations on 32-bit integers.}
------------------------------------------------------------------------
+primtype Int32#
+
primop Int32ExtendOp "extendInt32#" GenPrimOp Int32# -> Int#
primop Int32NarrowOp "narrowInt32#" GenPrimOp Int# -> Int32#
=====================================
includes/rts/Flags.h
=====================================
@@ -202,7 +202,7 @@ typedef struct _CONCURRENT_FLAGS {
* Note that there is no 32bit darwin system we can realistically expect to
* run on or compile for.
*/
-#if defined(darwin_HOST_OS)
+#if defined(darwin_HOST_OS) || defined(aarch64_HOST_ARCH)
#define DEFAULT_LINKER_ALWAYS_PIC true
#else
#define DEFAULT_LINKER_ALWAYS_PIC false
=====================================
rts/RtsSymbols.c
=====================================
@@ -958,6 +958,9 @@
SymI_HasProto(allocateExec) \
SymI_HasProto(flushExec) \
SymI_HasProto(freeExec) \
+ SymI_HasProto(allocateWrite) \
+ SymI_HasProto(markExec) \
+ SymI_HasProto(freeWrite) \
SymI_HasProto(getAllocations) \
SymI_HasProto(revertCAFs) \
SymI_HasProto(RtsFlags) \
=====================================
rts/sm/Storage.c
=====================================
@@ -1700,6 +1700,20 @@ void flushExec (W_ len, AdjustorExecutable exec_addr)
#endif
}
+#if RTS_LINKER_USE_MMAP
+AdjustorWritable allocateWrite(W_ bytes) {
+ return mmapForLinker(bytes, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, -1, 0);
+}
+
+void markExec(W_ bytes, AdjustorWritable writ) {
+ mmapForLinkerMarkExecutable(writ, bytes);
+}
+
+void freeWrite(W_ bytes, AdjustorWritable writ) {
+ munmap(writ, bytes);
+}
+#endif
+
#if defined(linux_HOST_OS) || defined(netbsd_HOST_OS)
// On Linux we need to use libffi for allocating executable memory,
@@ -1749,20 +1763,6 @@ AdjustorWritable allocateExec(W_ bytes, AdjustorExecutable *exec_ret)
return writ;
}
-#if RTS_LINKER_USE_MMAP
-AdjustorWritable allocateWrite(W_ bytes) {
- return mmapForLinker(bytes, PROT_READ | PROT_WRITE, MAP_ANONYMOUS, -1, 0);
-}
-
-void markExec(W_ bytes, AdjustorWritable writ) {
- mmapForLinkerMarkExecutable(writ, bytes);
-}
-
-void freeWrite(W_ bytes, AdjustorWritable writ) {
- munmap(writ, bytes);
-}
-#endif
-
AdjustorWritable execToWritable(AdjustorExecutable exec)
{
AdjustorWritable writ;
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0f47da637496321c0d0bdf34a34d22093d6c0236...5764bca329c18619598fbe99433f581a119a5898
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/0f47da637496321c0d0bdf34a34d22093d6c0236...5764bca329c18619598fbe99433f581a119a5898
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20201026/68867164/attachment-0001.html>
More information about the ghc-commits
mailing list