summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorBartosz Nitka <niteria@gmail.com>2018-05-03 10:43:38 -0700
committerBartosz Nitka <niteria@gmail.com>2018-05-11 04:02:03 -0700
commitcb5c2fe875965b7aedbc189012803fc62e48fb3f (patch)
treebc5d65def3de1b2a08b569f9661a0db602a719ac /includes
parent40a76c99624ae82e960bad0f1c832ddec4aece16 (diff)
downloadhaskell-cb5c2fe875965b7aedbc189012803fc62e48fb3f.tar.gz
Fix unwinding of C -> Haskell FFI calls with -threaded
See the new note. Test Plan: manual testing with patched gdb Reviewers: bgamari, simonmar, erikd Subscribers: rwbarton, thomie, carter Differential Revision: https://phabricator.haskell.org/D4666
Diffstat (limited to 'includes')
-rw-r--r--includes/rts/Constants.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/includes/rts/Constants.h b/includes/rts/Constants.h
index 5774bd7a0e..2f0ee5b10d 100644
--- a/includes/rts/Constants.h
+++ b/includes/rts/Constants.h
@@ -127,6 +127,19 @@
# endif
#endif
+/* -----------------------------------------------------------------------------
+ StgRun related labels shared between StgCRun.c and StgStartup.cmm.
+ -------------------------------------------------------------------------- */
+
+#if defined(LEADING_UNDERSCORE)
+#define STG_RUN "_StgRun"
+#define STG_RUN_JMP _StgRunJmp
+#define STG_RETURN "_StgReturn"
+#else
+#define STG_RUN "StgRun"
+#define STG_RUN_JMP StgRunJmp
+#define STG_RETURN "StgReturn"
+#endif
/* -----------------------------------------------------------------------------
How much Haskell stack space to reserve for the saving of registers