Explicitly handle unsupported Cmm prim ops.
authorDavid Terei <davidterei@gmail.com>
Tue, 22 Nov 2011 20:05:52 +0000 (12:05 -0800)
committerDavid Terei <davidterei@gmail.com>
Tue, 22 Nov 2011 20:05:52 +0000 (12:05 -0800)
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen/CCall.hs
compiler/nativeGen/X86/CodeGen.hs

index 4bde8ef..607e05d 100644 (file)
@@ -1146,9 +1146,10 @@ genCCall' gcp target dest_regs argsAndHints
 
                     MO_PopCnt w  -> (fsLit $ popCntLabel w, False)
 
-                    other -> pprPanic "genCCall(ppc): unknown callish op"
-                                    (pprCallishMachOp other)
-
+                    MO_WriteBarrier ->
+                        panic $ "outOfLineCmmOp: MO_WriteBarrier not supported"
+                    MO_Touch ->
+                        panic $ "outOfLineCmmOp: MO_Touch not supported"
 
 -- -----------------------------------------------------------------------------
 -- Generating a table-branch
index 5b26667..d4f1506 100644 (file)
@@ -342,5 +342,8 @@ outOfLineMachOp_table mop
 
         MO_PopCnt w  -> fsLit $ popCntLabel w
 
-       _ -> pprPanic "outOfLineMachOp(sparc): Unknown callish mach op "
-                       (pprCallishMachOp mop)
+        MO_WriteBarrier ->
+            panic $ "outOfLineCmmOp: MO_WriteBarrier not supported here"
+        MO_Touch ->
+            panic $ "outOfLineCmmOp: MO_Touch not supported here"
+
index adf199c..97baeec 100644 (file)
@@ -2048,8 +2048,10 @@ outOfLineCmmOp mop res args
 
               MO_PopCnt _  -> fsLit "popcnt"
 
-              other -> panic $ "outOfLineCmmOp: unmatched op! (" ++ show other ++ ")"
-
+              MO_WriteBarrier ->
+                  panic $ "outOfLineCmmOp: MO_WriteBarrier not supported here"
+              MO_Touch ->
+                  panic $ "outOfLineCmmOp: MO_Touch not supported here"
 
 -- -----------------------------------------------------------------------------
 -- Generating a table-branch