[commit: ghc] master: Whitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs (7252309)
Ian Lynagh
igloo at earth.li
Tue Aug 21 22:04:12 CEST 2012
Repository : ssh://darcs.haskell.org//srv/darcs/ghc
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/7252309ce59b2f558bc4581cb25ff262434062de
>---------------------------------------------------------------
commit 7252309ce59b2f558bc4581cb25ff262434062de
Author: Ian Lynagh <ian at well-typed.com>
Date: Tue Aug 21 19:53:04 2012 +0100
Whitespace only in nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
>---------------------------------------------------------------
compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs | 31 +++++++------------
1 files changed, 12 insertions(+), 19 deletions(-)
diff --git a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
index 03c27f4..6309b24 100644
--- a/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/X86/FreeRegs.hs
@@ -1,11 +1,4 @@
-{-# OPTIONS -fno-warn-tabs #-}
--- The above warning supression flag is a temporary kludge.
--- While working on this module you are encouraged to remove it and
--- detab the module (please do the detabbing in a separate patch). See
--- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
-- | Free regs map for i386 and x86_64
module RegAlloc.Linear.X86.FreeRegs
where
@@ -21,9 +14,9 @@ import Data.Bits
type FreeRegs
#ifdef i386_TARGET_ARCH
- = Word32
+ = Word32
#else
- = Word64
+ = Word64
#endif
noFreeRegs :: FreeRegs
@@ -31,33 +24,33 @@ noFreeRegs = 0
releaseReg :: RealReg -> FreeRegs -> FreeRegs
releaseReg (RealRegSingle n) f
- = f .|. (1 `shiftL` n)
+ = f .|. (1 `shiftL` n)
releaseReg _ _
- = panic "RegAlloc.Linear.X86.FreeRegs.realeaseReg: no reg"
+ = panic "RegAlloc.Linear.X86.FreeRegs.realeaseReg: no reg"
initFreeRegs :: Platform -> FreeRegs
initFreeRegs platform
- = foldr releaseReg noFreeRegs (allocatableRegs platform)
+ = foldr releaseReg noFreeRegs (allocatableRegs platform)
getFreeRegs :: Platform -> RegClass -> FreeRegs -> [RealReg] -- lazilly
getFreeRegs platform cls f = go f 0
where go 0 _ = []
go n m
- | n .&. 1 /= 0 && classOfRealReg platform (RealRegSingle m) == cls
- = RealRegSingle m : (go (n `shiftR` 1) $! (m+1))
+ | n .&. 1 /= 0 && classOfRealReg platform (RealRegSingle m) == cls
+ = RealRegSingle m : (go (n `shiftR` 1) $! (m+1))
- | otherwise
- = go (n `shiftR` 1) $! (m+1)
- -- ToDo: there's no point looking through all the integer registers
- -- in order to find a floating-point one.
+ | otherwise
+ = go (n `shiftR` 1) $! (m+1)
+ -- ToDo: there's no point looking through all the integer registers
+ -- in order to find a floating-point one.
allocateReg :: RealReg -> FreeRegs -> FreeRegs
allocateReg (RealRegSingle r) f
= f .&. complement (1 `shiftL` r)
allocateReg _ _
- = panic "RegAlloc.Linear.X86.FreeRegs.allocateReg: no reg"
+ = panic "RegAlloc.Linear.X86.FreeRegs.allocateReg: no reg"
More information about the Cvs-ghc
mailing list