summaryrefslogtreecommitdiff
path: root/includes/CodeGen.Platform.hs
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2015-08-27 00:36:59 +0200
committerBen Gamari <ben@smart-cactus.org>2015-11-01 15:19:47 +0100
commit159a1a2b7501b149fadfc0cd1940fab6bf030691 (patch)
tree8f62c8322dfe7118c901438fa735e170963438f4 /includes/CodeGen.Platform.hs
parent76611d750247c1f6fd1323ef5564af16b97e8157 (diff)
downloadhaskell-159a1a2b7501b149fadfc0cd1940fab6bf030691.tar.gz
cmm: Expose machine's stack and return address register
We will need to use these to setup proper unwinding information for the stg_stop_thread closure. This pokes a hole in the STG abstraction, exposing the machine's stack pointer register so that we can accomplish this. We also expose a dummy return address register, which corresponds to the register used to hold the DWARF return address. Differential Revision: https://phabricator.haskell.org/D1225
Diffstat (limited to 'includes/CodeGen.Platform.hs')
-rw-r--r--includes/CodeGen.Platform.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/includes/CodeGen.Platform.hs b/includes/CodeGen.Platform.hs
index b41ad54349..46550af213 100644
--- a/includes/CodeGen.Platform.hs
+++ b/includes/CodeGen.Platform.hs
@@ -815,6 +815,9 @@ globalRegMaybe CurrentTSO = Just (RealRegSingle REG_CurrentTSO)
# ifdef REG_CurrentNursery
globalRegMaybe CurrentNursery = Just (RealRegSingle REG_CurrentNursery)
# endif
+# ifdef REG_MachSp
+globalRegMaybe MachSp = Just (RealRegSingle REG_MachSp)
+# endif
globalRegMaybe _ = Nothing
#elif MACHREGS_NO_REGS
globalRegMaybe _ = Nothing