From faa8d785c64ce394d9f83fb50e547037cd21c594 Mon Sep 17 00:00:00 2001 From: panne Date: Sat, 21 May 2005 15:39:00 +0000 Subject: [PATCH] [project @ 2005-05-21 15:39:00 by panne] Warning police: Removed overlapped patterns. In general, taking compiler warnings about unmatched patterns seriously when they come up later might be better than writing catch-all patterns right from the start. Otherwise readers are confused and wonder which patterns might be missing when there are none. --- ghc/compiler/cmm/PprC.hs | 6 +++--- ghc/compiler/cmm/PprCmm.hs | 4 ---- ghc/compiler/nativeGen/MachCodeGen.hs | 2 -- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/ghc/compiler/cmm/PprC.hs b/ghc/compiler/cmm/PprC.hs index f2c607b..72a3cb1 100644 --- a/ghc/compiler/cmm/PprC.hs +++ b/ghc/compiler/cmm/PprC.hs @@ -738,9 +738,10 @@ pprGlobalRegName gr = case gr of VanillaReg n -> char 'R' <> int n -- without the .w suffix _ -> pprGlobalReg gr +-- Currently we only have these two calling conventions, but this might +-- change in the future... is_cish CCallConv = True is_cish StdCallConv = True -is_cish _ = False -- --------------------------------------------------------------------- -- Find and print local and external declarations for a list of @@ -822,11 +823,10 @@ te_Stmt _ = return () te_Expr :: CmmExpr -> TE () te_Expr (CmmLit lit) = te_Lit lit -te_Expr (CmmReg r) = te_Reg r te_Expr (CmmLoad e _) = te_Expr e +te_Expr (CmmReg r) = te_Reg r te_Expr (CmmMachOp _ es) = mapM_ te_Expr es te_Expr (CmmRegOff r _) = te_Reg r -te_Expr _ = return () te_Reg :: CmmReg -> TE () te_Reg (CmmLocal l) = te_temp l diff --git a/ghc/compiler/cmm/PprCmm.hs b/ghc/compiler/cmm/PprCmm.hs index f38eb30..3c3e976 100644 --- a/ghc/compiler/cmm/PprCmm.hs +++ b/ghc/compiler/cmm/PprCmm.hs @@ -317,7 +317,6 @@ pprExpr9 e = CmmReg reg -> ppr reg CmmRegOff reg off -> parens (ppr reg <+> char '+' <+> int off) CmmMachOp mop args -> genMachOp mop args - e -> parens (pprExpr e) genMachOp :: MachOp -> [CmmExpr] -> SDoc genMachOp mop args @@ -351,7 +350,6 @@ infixMachOp mop MO_Xor _ -> Just $ char '^' MO_Not _ -> Just $ char '~' MO_S_Neg _ -> Just $ char '-' -- there is no unsigned neg :) - MO_Not _ -> Just $ char '~' _ -> Nothing -- -------------------------------------------------------------------------- @@ -434,8 +432,6 @@ pprGlobalReg gr BaseReg -> ptext SLIT("BaseReg") PicBaseReg -> ptext SLIT("PicBaseReg") - _ -> panic $ "PprCmm.pprGlobalReg: unknown global reg" - -- -------------------------------------------------------------------------- -- data sections -- diff --git a/ghc/compiler/nativeGen/MachCodeGen.hs b/ghc/compiler/nativeGen/MachCodeGen.hs index 26e86f3..24e8b04 100644 --- a/ghc/compiler/nativeGen/MachCodeGen.hs +++ b/ghc/compiler/nativeGen/MachCodeGen.hs @@ -3255,8 +3255,6 @@ outOfLineFloatOp mop res args vols MO_F64_Tanh -> FSLIT("tanh") MO_F64_Pwr -> FSLIT("pow") - other -> pprPanic "outOfLineFloatOp" (pprCallishMachOp mop) - #endif /* i386_TARGET_ARCH || x86_64_TARGET_ARCH */ -- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- 1.7.10.4