diff options
author | Ian Lynagh <ian@well-typed.com> | 2013-04-23 20:53:06 +0100 |
---|---|---|
committer | Ian Lynagh <ian@well-typed.com> | 2013-04-24 01:06:33 +0100 |
commit | be0b1dffb0a3aa73720b4de8887b837430bffcce (patch) | |
tree | d771a3eac2881c71eea1e687f4b4e4e38e1b3b9f /compiler/codeGen/StgCmmPrim.hs | |
parent | dbd964513941f1247ff6cbf28ad3154b229ecb00 (diff) | |
download | haskell-be0b1dffb0a3aa73720b4de8887b837430bffcce.tar.gz |
In CMM, only allow foreign calls to labels, not arbitrary expressions
I'm not sure if we want to make this change permanently, but for now it
fixes the unreg build.
I've also removed some redundant special-case code that generated
prototypes for foreign functions. The standard pprTempAndExternDecls
now generates them.
Diffstat (limited to 'compiler/codeGen/StgCmmPrim.hs')
-rw-r--r-- | compiler/codeGen/StgCmmPrim.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmPrim.hs b/compiler/codeGen/StgCmmPrim.hs index fb5acde956..54002e8171 100644 --- a/compiler/codeGen/StgCmmPrim.hs +++ b/compiler/codeGen/StgCmmPrim.hs @@ -36,7 +36,6 @@ import CLabel import CmmUtils import PrimOp import SMRep -import Module import FastString import Outputable import Util @@ -214,7 +213,7 @@ emitPrimOp _ [res] ParOp [arg] -- later, we might want to inline it. emitCCall [(res,NoHint)] - (CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "newSpark")))) + (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction))) [(CmmReg (CmmGlobal BaseReg), AddrHint), (arg,AddrHint)] emitPrimOp dflags [res] SparkOp [arg] @@ -226,7 +225,7 @@ emitPrimOp dflags [res] SparkOp [arg] tmp2 <- newTemp (bWord dflags) emitCCall [(tmp2,NoHint)] - (CmmLit (CmmLabel (mkCmmCodeLabel rtsPackageId (fsLit "newSpark")))) + (CmmLit (CmmLabel (mkForeignLabel (fsLit "newSpark") Nothing ForeignLabelInExternalPackage IsFunction))) [(CmmReg (CmmGlobal BaseReg), AddrHint), ((CmmReg (CmmLocal tmp)), AddrHint)] emitAssign (CmmLocal res) (CmmReg (CmmLocal tmp)) |