[commit: ghc] master: StgCRun: Disable unwinding on Darwin (1ebe843)
git at git.haskell.org
git at git.haskell.org
Mon Dec 17 17:45:17 UTC 2018
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/1ebe8438cd29448291229d5ce23c9f73216e9650/ghc
>---------------------------------------------------------------
commit 1ebe8438cd29448291229d5ce23c9f73216e9650
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sun Dec 16 19:10:07 2018 -0500
StgCRun: Disable unwinding on Darwin
See #15207.
>---------------------------------------------------------------
1ebe8438cd29448291229d5ce23c9f73216e9650
rts/StgCRun.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/rts/StgCRun.c b/rts/StgCRun.c
index 92b0696..e1b9a09 100644
--- a/rts/StgCRun.c
+++ b/rts/StgCRun.c
@@ -405,9 +405,13 @@ StgRunIsImplementedInAssembler(void)
"movq %%xmm15,136(%%rax)\n\t"
#endif
+#if !defined(darwin_HOST_OS)
/*
* Let the unwinder know where we saved the registers
* See Note [Unwinding foreign exports on x86-64].
+ *
+ * N.B. We don't support unwinding on Darwin due to
+ * various toolchain insanity.
*/
".cfi_def_cfa rsp, 0\n\t"
".cfi_offset rbx, %c2\n\t"
@@ -440,6 +444,7 @@ StgRunIsImplementedInAssembler(void)
#error "RSP_DELTA too big"
#endif
"\n\t"
+#endif /* !defined(darwin_HOST_OS) */
/*
* Set BaseReg
@@ -512,8 +517,10 @@ StgRunIsImplementedInAssembler(void)
"i"(RESERVED_C_STACK_BYTES + 32 /* r14 relative to cfa (rsp) */),
"i"(RESERVED_C_STACK_BYTES + 40 /* r15 relative to cfa (rsp) */),
"i"(RESERVED_C_STACK_BYTES + STG_RUN_STACK_FRAME_SIZE
- /* rip relative to cfa */),
- "i"((RSP_DELTA & 127) | (128 * ((RSP_DELTA >> 7) > 0)))
+ /* rip relative to cfa */)
+
+#if !defined(darwin_HOST_OS)
+ , "i"((RSP_DELTA & 127) | (128 * ((RSP_DELTA >> 7) > 0)))
/* signed LEB128-encoded delta from rsp - byte 1 */
#if (RSP_DELTA >> 7) > 0
, "i"(((RSP_DELTA >> 7) & 127) | (128 * ((RSP_DELTA >> 14) > 0)))
@@ -530,6 +537,9 @@ StgRunIsImplementedInAssembler(void)
/* signed LEB128-encoded delta from rsp - byte 4 */
#endif
#undef RSP_DELTA
+
+#endif /* !defined(darwin_HOST_OS) */
+
);
/*
* See Note [Stack Alignment on X86]
More information about the ghc-commits
mailing list