Implement SSE2 floating-point support in the x86 native code generator (#594)
[ghc-hetmet.git] / compiler / nativeGen / SPARC / Regs.hs
index 1c41e88..cd19138 100644 (file)
@@ -54,7 +54,7 @@ import FastBool
        prepared for any eventuality.
 
        The whole fp-register pairing thing on sparcs is a huge nuisance.  See
-       fptools/ghc/includes/MachRegs.h for a description of what's going on
+       includes/stg/MachRegs.h for a description of what's going on
        here.
 -}
 
@@ -95,22 +95,21 @@ virtualRegSqueeze cls vr
         -> case vr of
                VirtualRegI{}           -> _ILIT(1)
                VirtualRegHi{}          -> _ILIT(1)
-               VirtualRegF{}           -> _ILIT(0)
-               VirtualRegD{}           -> _ILIT(0)
+                _other                  -> _ILIT(0)
 
        RcFloat
         -> case vr of
-               VirtualRegI{}           -> _ILIT(0)
-               VirtualRegHi{}          -> _ILIT(0)
                VirtualRegF{}           -> _ILIT(1)
                VirtualRegD{}           -> _ILIT(2)
+                _other                  -> _ILIT(0)
 
        RcDouble
         -> case vr of
-               VirtualRegI{}           -> _ILIT(0)
-               VirtualRegHi{}          -> _ILIT(0)
                VirtualRegF{}           -> _ILIT(1)
                VirtualRegD{}           -> _ILIT(1)
+                _other                  -> _ILIT(0)
+
+        _other -> _ILIT(0)
 
 {-# INLINE realRegSqueeze #-}
 realRegSqueeze :: RegClass -> RealReg -> FastInt
@@ -141,6 +140,7 @@ realRegSqueeze cls rr
                        
                RealRegPair{}           -> _ILIT(1)
                                        
+        _other -> _ILIT(0)
        
 -- | All the allocatable registers in the machine, 
 --     including register pairs.
@@ -283,18 +283,20 @@ regDotColor reg
  = case classOfRealReg reg of
        RcInteger       -> text "blue"
        RcFloat         -> text "red"
-       RcDouble        -> text "green"
+       _other          -> text "green"
 
 
 
 
 -- Hard coded freeReg / globalRegMaybe -----------------------------------------
 -- This isn't being used at the moment because we're generating
---     these functions from the information in includes/MachRegs.hs via RegPlate.hs
+--     these functions from the information in
+--     includes/stg/MachRegs.hs via RegPlate.hs
        
 -- | Check whether a machine register is free for allocation.
---     This needs to match the info in includes/MachRegs.h otherwise modules
---     compiled with the NCG won't be compatible with via-C ones.
+--     This needs to match the info in includes/stg/MachRegs.h
+--     otherwise modules compiled with the NCG won't be compatible
+--     with via-C ones.
 --
 {-
 freeReg :: RegNo -> FastBool