[commit: ghc] master: nativeGen: detabify/dewhitespace SPARC/CodeGen/CondCode (9924de2)

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


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

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

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

commit 9924de2e752e738c82aa3a9c7ee4b50b00dcf3e2
Author: Austin Seipp <austin at well-typed.com>
Date:   Fri Jul 18 22:28:40 2014 -0500

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


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

9924de2e752e738c82aa3a9c7ee4b50b00dcf3e2
 compiler/nativeGen/SPARC/CodeGen/CondCode.hs | 48 ++++++++++++----------------
 1 file changed, 20 insertions(+), 28 deletions(-)

diff --git a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
index 2c3dbe6..cb10830 100644
--- a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
@@ -1,15 +1,7 @@
-
-{-# 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.CodeGen.CondCode (
-	getCondCode,
-	condIntCode,
-	condFltCode
+        getCondCode,
+        condIntCode,
+        condFltCode
 )
 
 where
@@ -86,8 +78,8 @@ condIntCode cond x y = do
     (src1, code1) <- getSomeReg x
     (src2, code2) <- getSomeReg y
     let
-	code__2 = code1 `appOL` code2 `snocOL`
-    	    	  SUB False True src1 (RIReg src2) g0
+        code__2 = code1 `appOL` code2 `snocOL`
+                  SUB False True src1 (RIReg src2) g0
     return (CondCode False cond code__2)
 
 
@@ -98,19 +90,19 @@ condFltCode cond x y = do
     (src2, code2) <- getSomeReg y
     tmp <- getNewRegNat FF64
     let
-   	promote x = FxTOy FF32 FF64 x tmp
-
-    	pk1   = cmmExprType dflags x
-    	pk2   = cmmExprType dflags y
-
-    	code__2 =
-		if pk1 `cmmEqType` pk2 then
-    	            code1 `appOL` code2 `snocOL`
-    	    	    FCMP True (cmmTypeSize pk1) src1 src2
-    	    	else if typeWidth pk1 == W32 then
-    	    	    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
-    	    	    FCMP True FF64 tmp src2
-    	    	else
-    	    	    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
-    	    	    FCMP True FF64 src1 tmp
+        promote x = FxTOy FF32 FF64 x tmp
+
+        pk1   = cmmExprType dflags x
+        pk2   = cmmExprType dflags y
+
+        code__2 =
+                if pk1 `cmmEqType` pk2 then
+                    code1 `appOL` code2 `snocOL`
+                    FCMP True (cmmTypeSize pk1) src1 src2
+                else if typeWidth pk1 == W32 then
+                    code1 `snocOL` promote src1 `appOL` code2 `snocOL`
+                    FCMP True FF64 tmp src2
+                else
+                    code1 `appOL` code2 `snocOL` promote src2 `snocOL`
+                    FCMP True FF64 src1 tmp
     return (CondCode True cond code__2)



More information about the ghc-commits mailing list