Add missing StgPrimCallOp case to isSimpleOp
[ghc-hetmet.git] / compiler / codeGen / StgCmmExpr.hs
index df6e8a1..96b9e31 100644 (file)
@@ -322,6 +322,7 @@ isSimpleOp :: StgOp -> Bool
 isSimpleOp (StgFCallOp (CCall (CCallSpec _ _ safe)) _) = not (playSafe safe)
 isSimpleOp (StgFCallOp (DNCall _) _)                   = False         -- Safe!
 isSimpleOp (StgPrimOp op)                                     = not (primOpOutOfLine op)
+isSimpleOp (StgPrimCallOp _)                           = False
 
 -----------------
 chooseReturnBndrs :: Id -> AltType -> [StgAlt] -> [NonVoid Id]
@@ -464,8 +465,9 @@ cgTailCall fun_id fun_info args = do
                do { let fun' = CmmLoad fun (cmmExprType fun)
                    ; [ret,call] <- forkAlts [
                        getCode $ emitReturn [fun],     -- Is tagged; no need to untag
-                       getCode $ do emit (mkAssign nodeReg fun)
-                                     emitCall Native (entryCode fun') []]  -- Not tagged
+                       getCode $ do -- emit (mkAssign nodeReg fun)
+                         emitCall (NativeNodeCall, NativeReturn)
+                                  (entryCode fun') [fun]]  -- Not tagged
                   ; emit (mkCmmIfThenElse (cmmIsTagged fun) ret call) }
 
        SlowCall -> do      -- A slow function call via the RTS apply routines
@@ -480,8 +482,6 @@ cgTailCall fun_id fun_info args = do
                     do emit $ mkComment $ mkFastString "directEntry"
                        emit (mkAssign nodeReg fun)
                        directCall lbl arity args
-                    -- directCall lbl (arity+1) (StgVarArg fun_id : args))
-                    -- >>= (emit . (mkComment (mkFastString "DirectEntry") <*>))
                  else do emit $ mkComment $ mkFastString "directEntry else"
                           directCall lbl arity args }