module GHC.Platform.Reg.Class
( RegClass (..) )
where
import GHC.Prelude
import GHC.Utils.Outputable as Outputable
import GHC.Types.Unique
import GHC.Builtin.Uniques
data RegClass
= RcInteger
| RcFloat
| RcDouble
deriving RegClass -> RegClass -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: RegClass -> RegClass -> Bool
$c/= :: RegClass -> RegClass -> Bool
== :: RegClass -> RegClass -> Bool
$c== :: RegClass -> RegClass -> Bool
Eq
instance Uniquable RegClass where
getUnique :: RegClass -> Unique
getUnique RegClass
RcInteger = Int -> Unique
mkRegClassUnique Int
0
getUnique RegClass
RcFloat = Int -> Unique
mkRegClassUnique Int
1
getUnique RegClass
RcDouble = Int -> Unique
mkRegClassUnique Int
2
instance Outputable RegClass where
ppr :: RegClass -> SDoc
ppr RegClass
RcInteger = String -> SDoc
Outputable.text String
"I"
ppr RegClass
RcFloat = String -> SDoc
Outputable.text String
"F"
ppr RegClass
RcDouble = String -> SDoc
Outputable.text String
"D"