[commit: ghc] master: nativeGen: detabify/dewhitespace SPARC/Imm (b80249d)

git at git.haskell.org git at git.haskell.org
Sun Jul 20 21:57:37 UTC 2014


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b80249d7af7c5588d69519d543f346fe212f4ab7/ghc

>---------------------------------------------------------------

commit b80249d7af7c5588d69519d543f346fe212f4ab7
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Jul 18 22:26:33 2014 -0500

    nativeGen: detabify/dewhitespace SPARC/Imm
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

b80249d7af7c5588d69519d543f346fe212f4ab7
 compiler/nativeGen/SPARC/Imm.hs | 74 ++++++++++++++++++-----------------------
 1 file changed, 32 insertions(+), 42 deletions(-)

diff --git a/compiler/nativeGen/SPARC/Imm.hs b/compiler/nativeGen/SPARC/Imm.hs
index 844a088..cb53ba4 100644
--- a/compiler/nativeGen/SPARC/Imm.hs
+++ b/compiler/nativeGen/SPARC/Imm.hs
@@ -1,16 +1,8 @@
-
-{-# OPTIONS_GHC -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://ghc.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#TabsvsSpaces
--- for details
-
 module SPARC.Imm (
-	-- immediate values
-	Imm(..),
-	strImmLit,
-	litToImm
+        -- immediate values
+        Imm(..),
+        strImmLit,
+        litToImm
 )
 
 where
@@ -21,29 +13,29 @@ import CLabel
 import Outputable
 
 -- | An immediate value.
---	Not all of these are directly representable by the machine. 
---	Things like ImmLit are slurped out and put in a data segment instead.
+--      Not all of these are directly representable by the machine.
+--      Things like ImmLit are slurped out and put in a data segment instead.
 --
 data Imm
-	= ImmInt	Int
+        = ImmInt        Int
 
-	-- Sigh.
-	| ImmInteger	Integer	    
+        -- Sigh.
+        | ImmInteger    Integer
 
-	-- AbstractC Label (with baggage)
-	| ImmCLbl	CLabel	    
+        -- AbstractC Label (with baggage)
+        | ImmCLbl       CLabel
 
-	-- Simple string
-	| ImmLit	SDoc
-	| ImmIndex	CLabel Int
-	| ImmFloat	Rational
-	| ImmDouble	Rational
+        -- Simple string
+        | ImmLit        SDoc
+        | ImmIndex      CLabel Int
+        | ImmFloat      Rational
+        | ImmDouble     Rational
 
-	| ImmConstantSum  Imm Imm
-	| ImmConstantDiff Imm Imm
+        | ImmConstantSum  Imm Imm
+        | ImmConstantDiff Imm Imm
 
-	| LO 	Imm		   
-	| HI 	Imm
+        | LO    Imm
+        | HI    Imm
 
 
 -- | Create a ImmLit containing this string.
@@ -52,24 +44,22 @@ strImmLit s = ImmLit (text s)
 
 
 -- | Convert a CmmLit to an Imm.
--- 	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.
+--      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 :: CmmLit -> Imm
 litToImm lit
  = case lit of
- 	CmmInt i w		-> ImmInteger (narrowS w i)
-	CmmFloat f W32		-> ImmFloat f
-	CmmFloat f W64		-> ImmDouble f
-	CmmLabel l		-> ImmCLbl l
-	CmmLabelOff l off	-> ImmIndex l off
+        CmmInt i w              -> ImmInteger (narrowS w i)
+        CmmFloat f W32          -> ImmFloat f
+        CmmFloat f W64          -> ImmDouble f
+        CmmLabel l              -> ImmCLbl l
+        CmmLabelOff l off       -> ImmIndex l off
 
-	CmmLabelDiffOff l1 l2 off
-	 -> ImmConstantSum
-		(ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))
-		(ImmInt off)
+        CmmLabelDiffOff l1 l2 off
+         -> ImmConstantSum
+                (ImmConstantDiff (ImmCLbl l1) (ImmCLbl l2))
+                (ImmInt off)
 
         _               -> panic "SPARC.Regs.litToImm: no match"
-
-



More information about the ghc-commits mailing list