Commit 214ad2d2 authored by Peter Trommler's avatar Peter Trommler Committed by Simon Marlow
Browse files

Fix globalRegMaybe for unregisterised build.

In commit 83a003fc globalRegMaybe will be called but panics
for unregisterised compilers.

In an unregisterised compiler there are no global registers
so always return `Nothing`.

Fixes #9055.
parent 21f17d06
......@@ -742,6 +742,8 @@ globalRegMaybe CurrentTSO = Just (RealRegSingle REG_CurrentTSO)
globalRegMaybe CurrentNursery = Just (RealRegSingle REG_CurrentNursery)
# endif
globalRegMaybe _ = Nothing
#elif MACHREGS_NO_REGS
globalRegMaybe _ = Nothing
#else
globalRegMaybe = panic "globalRegMaybe not defined for this platform"
#endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment