summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToCmm/Prim.hs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/GHC/StgToCmm/Prim.hs')
-rw-r--r--compiler/GHC/StgToCmm/Prim.hs19
1 files changed, 1 insertions, 18 deletions
diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs
index 0db42f04e0..e469e15a5d 100644
--- a/compiler/GHC/StgToCmm/Prim.hs
+++ b/compiler/GHC/StgToCmm/Prim.hs
@@ -17,8 +17,6 @@
module GHC.StgToCmm.Prim (
cgOpApp,
- cgPrimOp, -- internal(ish), used by cgCase to get code for a
- -- comparison without also turning it into a Bool.
shouldInlinePrimOp
) where
@@ -110,7 +108,7 @@ cgOpApp (StgPrimOp primop) args res_ty = do
f regs
emitReturn (map (CmmReg . CmmLocal) regs)
- | otherwise -> panic "cgPrimop"
+ | otherwise -> panic "cgOpApp"
where
result_info = getPrimOpResultInfo primop
@@ -134,21 +132,6 @@ cgOpApp (StgPrimCallOp primcall) args _res_ty
asUnsigned :: Width -> Integer -> Integer
asUnsigned w n = n .&. (bit (widthInBits w) - 1)
----------------------------------------------------
-cgPrimOp :: [LocalReg] -- where to put the results
- -> PrimOp -- the op
- -> [StgArg] -- arguments
- -> FCode ()
-
-cgPrimOp results op args = do
- dflags <- getDynFlags
- arg_exprs <- getNonVoidArgAmodes args
- case emitPrimOp dflags op arg_exprs of
- PrimopCmmEmit_External -> panic "External prim op"
- PrimopCmmEmit_Raw _ -> panic "caller should handle TagToEnum themselves"
- PrimopCmmEmit_IntoRegs f -> f results
-
-
------------------------------------------------------------------------
-- Emitting code for a primop
------------------------------------------------------------------------