Skip to content
Snippets Groups Projects
Commit 71c19ee0 authored by sheaf's avatar sheaf
Browse files

test: Eq/Ord RealRegUsage

parent 342cc709
No related branches found
No related tags found
No related merge requests found
Pipeline #97141 failed
......@@ -39,6 +39,8 @@ import GHC.Cmm.Dataflow.Label
import GHC.CmmToAsm.Reg.Utils
import GHC.CmmToAsm.Format
import Data.Function ( on )
data ReadingOrWriting = Reading | Writing deriving (Eq,Ord)
-- | Used to store the register assignment on entry to a basic block.
......@@ -105,13 +107,18 @@ data Loc
-- | vreg is held in both a register and stack slots
| InBoth {-# UNPACK #-} !RealRegUsage
{-# UNPACK #-} !StackSlot
deriving (Eq, Show, Ord)
deriving (Eq, Ord, Show)
data RealRegUsage
= RealRegUsage
{ realReg :: !RealReg
, realRegFormat :: !Format
} deriving (Eq, Show, Ord)
} deriving Show
instance Eq RealRegUsage where
(==) = (==) `on` realReg
instance Ord RealRegUsage where
compare = compare `on` realReg
instance Outputable Loc where
ppr l = text (show l)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment