X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FMachRegs.lhs;h=0c21f21c097fead0e96bf8d58a24a633dda1580c;hb=7fbdd9e0bccec89c958e2a1e36d5ec058fc69a3d;hp=2e578c085b2b9a83cb41fffdfd14cb4e1a656678;hpb=176fa33f17dd78355cc572e006d2ab26898e2c69;p=ghc-hetmet.git diff --git a/compiler/nativeGen/MachRegs.lhs b/compiler/nativeGen/MachRegs.lhs index 2e578c0..0c21f21 100644 --- a/compiler/nativeGen/MachRegs.lhs +++ b/compiler/nativeGen/MachRegs.lhs @@ -96,6 +96,7 @@ module MachRegs ( #include "../includes/MachRegs.h" +import BlockId import Cmm import CgUtils ( get_GlobalReg_addr ) import CLabel ( CLabel, mkMainCapabilityLabel ) @@ -228,7 +229,10 @@ data Imm strImmLit s = ImmLit (text s) litToImm :: CmmLit -> Imm -litToImm (CmmInt i _) = ImmInteger i +litToImm (CmmInt i w) = ImmInteger (narrowS w i) + -- narrow to the width: a CmmInt might be out of + -- range, but we assume that ImmInteger only contains + -- in-range values. A signed value should be fine here. litToImm (CmmFloat f W32) = ImmFloat f litToImm (CmmFloat f W64) = ImmDouble f litToImm (CmmLabel l) = ImmCLbl l @@ -237,6 +241,7 @@ litToImm (CmmLabelDiffOff l1 l2 off) = ImmConstantSum (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2)) (ImmInt off) +litToImm (CmmBlock id) = ImmCLbl (infoTblLbl id) -- ----------------------------------------------------------------------------- -- Addressing modes @@ -614,7 +619,6 @@ trivColorable :: RegClass -> UniqSet Reg -> UniqSet Reg -> Bool trivColorable classN conflicts exclusions = {-# SCC "trivColorable" #-} let - {-# INLINE isSqueesed #-} isSqueesed cI cF ufm = case ufm of NodeUFM _ _ left right