summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMoritz Angermann <moritz.angermann@gmail.com>2021-02-12 04:06:22 +0000
committerMoritz Angermann <moritz.angermann@gmail.com>2021-02-12 04:06:22 +0000
commitf34159eedc0072c4bcf569580e270a93537548fd (patch)
treee90fd9c26ff2e37fac5ef418e6d2d084fab4d24b
parentc374e9ef99748cf4093136f1caebedffe7c052f4 (diff)
downloadhaskell-wip/angerman/ghc-8.10.3-macOS-arm64.tar.gz
-rw-r--r--compiler/deSugar/DsForeign.hs8
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs24
2 files changed, 24 insertions, 8 deletions
diff --git a/compiler/deSugar/DsForeign.hs b/compiler/deSugar/DsForeign.hs
index 93b36c5e30..b8e6947d2b 100644
--- a/compiler/deSugar/DsForeign.hs
+++ b/compiler/deSugar/DsForeign.hs
@@ -173,9 +173,13 @@ dsCImport id co (CLabel cid) cconv _ _ = do
return ([(id, rhs')], empty, empty)
dsCImport id co (CFunction target) cconv@PrimCallConv safety _
- = dsPrimCall id co (CCall (mkCCallSpec target cconv safety undefined undefined))
+ = dsPrimCall id co (CCall (mkCCallSpec target cconv safety
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps")))
dsCImport id co (CFunction target) cconv safety mHeader
- = dsFCall id co (CCall (mkCCallSpec target cconv safety undefined undefined)) mHeader
+ = dsFCall id co (CCall (mkCCallSpec target cconv safety
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))) mHeader
dsCImport id co CWrapper cconv _ _
= dsFExportDynamic id co cconv
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 1586bcae86..9f844f080f 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -2440,7 +2440,9 @@ genCCall' dflags is32Bit (PrimTarget (MO_PopCnt width)) dest_regs@[dst]
CallReference lbl
let target = ForeignTarget targetExpr (ForeignConvention CCallConv
[NoHint] [NoHint]
- CmmMayReturn undefined undefined)
+ CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
genCCall' dflags is32Bit target dest_regs args bid
where
format = intFormat width
@@ -2473,7 +2475,9 @@ genCCall' dflags is32Bit (PrimTarget (MO_Pdep width)) dest_regs@[dst]
CallReference lbl
let target = ForeignTarget targetExpr (ForeignConvention CCallConv
[NoHint] [NoHint]
- CmmMayReturn undefined undefined)
+ CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
genCCall' dflags is32Bit target dest_regs args bid
where
format = intFormat width
@@ -2506,7 +2510,9 @@ genCCall' dflags is32Bit (PrimTarget (MO_Pext width)) dest_regs@[dst]
CallReference lbl
let target = ForeignTarget targetExpr (ForeignConvention CCallConv
[NoHint] [NoHint]
- CmmMayReturn undefined undefined)
+ CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
genCCall' dflags is32Bit target dest_regs args bid
where
format = intFormat width
@@ -2518,7 +2524,9 @@ genCCall' dflags is32Bit (PrimTarget (MO_Clz width)) dest_regs@[dst] args@[src]
targetExpr <- cmmMakeDynamicReference dflags CallReference lbl
let target = ForeignTarget targetExpr (ForeignConvention CCallConv
[NoHint] [NoHint]
- CmmMayReturn undefined undefined)
+ CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
genCCall' dflags is32Bit target dest_regs args bid
| otherwise = do
@@ -2561,7 +2569,9 @@ genCCall' dflags is32Bit (PrimTarget (MO_UF_Conv width)) dest_regs args bid = do
CallReference lbl
let target = ForeignTarget targetExpr (ForeignConvention CCallConv
[NoHint] [NoHint]
- CmmMayReturn undefined undefined)
+ CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
genCCall' dflags is32Bit target dest_regs args bid
where
lbl = mkCmmCodeLabel primUnitId (fsLit (word2FloatLabel width))
@@ -3274,7 +3284,9 @@ outOfLineCmmOp bid mop res args
dflags <- getDynFlags
targetExpr <- cmmMakeDynamicReference dflags CallReference lbl
let target = ForeignTarget targetExpr
- (ForeignConvention CCallConv [] [] CmmMayReturn undefined undefined)
+ (ForeignConvention CCallConv [] [] CmmMayReturn
+ (panic "Missing Return PrimRep")
+ (panic "Missing Argument PrimReps"))
-- We know foreign calls results in no new basic blocks, so we can ignore
-- the returned block id.