module PPC.Cond (
Cond(..),
condNegate,
condUnsigned,
condToSigned,
condToUnsigned,
)
where
import GhcPrelude
import Panic
data Cond
= ALWAYS
| EQQ
| GE
| GEU
| GTT
| GU
| LE
| LEU
| LTT
| LU
| NE
deriving Cond -> Cond -> Bool
(Cond -> Cond -> Bool) -> (Cond -> Cond -> Bool) -> Eq Cond
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Cond -> Cond -> Bool
$c/= :: Cond -> Cond -> Bool
== :: Cond -> Cond -> Bool
$c== :: Cond -> Cond -> Bool
Eq
condNegate :: Cond -> Cond
condNegate :: Cond -> Cond
condNegate Cond
ALWAYS = String -> Cond
forall a. String -> a
panic String
"condNegate: ALWAYS"
condNegate Cond
EQQ = Cond
NE
condNegate Cond
GE = Cond
LTT
condNegate Cond
GEU = Cond
LU
condNegate Cond
GTT = Cond
LE
condNegate Cond
GU = Cond
LEU
condNegate Cond
LE = Cond
GTT
condNegate Cond
LEU = Cond
GU
condNegate Cond
LTT = Cond
GE
condNegate Cond
LU = Cond
GEU
condNegate Cond
NE = Cond
EQQ
condUnsigned :: Cond -> Bool
condUnsigned :: Cond -> Bool
condUnsigned Cond
GU = Bool
True
condUnsigned Cond
LU = Bool
True
condUnsigned Cond
GEU = Bool
True
condUnsigned Cond
LEU = Bool
True
condUnsigned Cond
_ = Bool
False
condToSigned :: Cond -> Cond
condToSigned :: Cond -> Cond
condToSigned Cond
GU = Cond
GTT
condToSigned Cond
LU = Cond
LTT
condToSigned Cond
GEU = Cond
GE
condToSigned Cond
LEU = Cond
LE
condToSigned Cond
x = Cond
x
condToUnsigned :: Cond -> Cond
condToUnsigned :: Cond -> Cond
condToUnsigned Cond
GTT = Cond
GU
condToUnsigned Cond
LTT = Cond
LU
condToUnsigned Cond
GE = Cond
GEU
condToUnsigned Cond
LE = Cond
LEU
condToUnsigned Cond
x = Cond
x