diff options
author | John Ericson <John.Ericson@Obsidian.Systems> | 2019-11-07 13:45:44 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-16 06:00:16 -0500 |
commit | 1ff552265bbbcc0dba272d4742e8be79baad2c51 (patch) | |
tree | ce1348c66ff60a7eff6bf3242b8a457bc5fb3312 /compiler/GHC/StgToCmm/Prim.hs | |
parent | ee5d63f40c2f507d09a16377a5b35c4c8669a028 (diff) | |
download | haskell-1ff552265bbbcc0dba272d4742e8be79baad2c51.tar.gz |
Remove special case case of bool during STG -> C--
Allow removing the no longer needed cgPrimOp, getting rid of a small a
small layer violation too.
Change which made the special case no longer needed was #6135 /
6579a6c73082387f82b994305011f011d9d8382b, which dates back to 2013,
making me feel better.
Diffstat (limited to 'compiler/GHC/StgToCmm/Prim.hs')
-rw-r--r-- | compiler/GHC/StgToCmm/Prim.hs | 19 |
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 ------------------------------------------------------------------------ |