-----------------------------------------------------------------------------
module PPC.RegInfo (
- mkVReg,
-
- JumpDest,
+ JumpDest( DestBlockId ),
canShortcut,
shortcutJump,
- shortcutStatic,
- regDotColor
+ shortcutStatic
)
where
import PPC.Regs
import PPC.Instr
-import RegClass
-import Reg
-import Size
import BlockId
import Cmm
import CLabel
import Outputable
-import Unique
-
-mkVReg :: Unique -> Size -> Reg
-mkVReg u size
- | not (isFloatSize size) = RegVirtual $ VirtualRegI u
- | otherwise
- = case size of
- FF32 -> RegVirtual $ VirtualRegD u
- FF64 -> RegVirtual $ VirtualRegD u
- _ -> panic "mkVReg"
-
-
-
data JumpDest = DestBlockId BlockId | DestImm Imm
Just (DestImm (ImmCLbl lbl)) -> lbl
_other -> panic "shortBlockId"
-
-
-regDotColor :: Reg -> SDoc
-regDotColor reg
- = case regClass reg of
- RcInteger -> text "blue"
- RcFloat -> text "red"
- RcDouble -> text "green"