import Data.Int
import Data.Word
+#if darwin_TARGET_OS || linux_TARGET_OS
+import BasicTypes
+import FastString
+#endif
+
-- -----------------------------------------------------------------------------
-- Top-level of the instruction selector
getRegisterReg (CmmGlobal mid)
= case get_GlobalReg_reg_or_addr mid of
- Left (RealReg rrno) -> RealReg rrno
+ Left reg@(RegReal _) -> reg
_other -> pprPanic "getRegisterReg-memory" (ppr $ CmmGlobal mid)
-- By this stage, the only MagicIds remaining should be the
-- ones which map to a real machine register on this
do
dflags <- getDynFlagsNat
mopExpr <- cmmMakeDynamicReference dflags addImportNat CallReference $
- mkForeignLabel functionName Nothing True
+ mkForeignLabel functionName Nothing True IsFunction
let mopLabelOrExpr = case mopExpr of
CmmLit (CmmLabel lbl) -> Left lbl
_ -> Right mopExpr