[commit: ghc] : Add a bits128 type to C--. (1a918e0)

Geoffrey Mainland gmainlan at microsoft.com
Thu Jan 31 10:53:00 CET 2013


Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : 

http://hackage.haskell.org/trac/ghc/changeset/1a918e0010cb0dcb6bfaa2564863ad0de2b57742

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

commit 1a918e0010cb0dcb6bfaa2564863ad0de2b57742
Author: Geoffrey Mainland <gmainlan at microsoft.com>
Date:   Fri Oct 19 09:09:23 2012 +0100

    Add a bits128 type to C--.

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

 compiler/cmm/CmmLex.x   |    3 +++
 compiler/cmm/CmmParse.y |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x
index 718eb27..81227eb 100644
--- a/compiler/cmm/CmmLex.x
+++ b/compiler/cmm/CmmLex.x
@@ -163,6 +163,7 @@ data CmmToken
   | CmmT_bits16
   | CmmT_bits32
   | CmmT_bits64
+  | CmmT_bits128
   | CmmT_float32
   | CmmT_float64
   | CmmT_gcptr
@@ -242,6 +243,7 @@ reservedWordsFM = listToUFM $
 	( "bits16",		CmmT_bits16 ),
 	( "bits32",		CmmT_bits32 ),
 	( "bits64",		CmmT_bits64 ),
+	( "bits128",		CmmT_bits128 ),
 	( "float32",		CmmT_float32 ),
 	( "float64",		CmmT_float64 ),
 -- New forms
@@ -249,6 +251,7 @@ reservedWordsFM = listToUFM $
 	( "b16",		CmmT_bits16 ),
 	( "b32",		CmmT_bits32 ),
 	( "b64",		CmmT_bits64 ),
+	( "b128",		CmmT_bits128 ),
 	( "f32",		CmmT_float32 ),
 	( "f64",		CmmT_float64 ),
 	( "gcptr",		CmmT_gcptr )
diff --git a/compiler/cmm/CmmParse.y b/compiler/cmm/CmmParse.y
index edeeebb..cb3bf0c 100644
--- a/compiler/cmm/CmmParse.y
+++ b/compiler/cmm/CmmParse.y
@@ -288,6 +288,7 @@ import Data.Maybe
         'bits16'        { L _ (CmmT_bits16) }
         'bits32'        { L _ (CmmT_bits32) }
         'bits64'        { L _ (CmmT_bits64) }
+        'bits128'       { L _ (CmmT_bits128) }
         'float32'       { L _ (CmmT_float32) }
         'float64'       { L _ (CmmT_float64) }
         'gcptr'         { L _ (CmmT_gcptr) }
@@ -772,6 +773,7 @@ typenot8 :: { CmmType }
         : 'bits16'              { b16 }
         | 'bits32'              { b32 }
         | 'bits64'              { b64 }
+        | 'bits128'             { b128 }
         | 'float32'             { f32 }
         | 'float64'             { f64 }
         | 'gcptr'               {% do dflags <- getDynFlags; return $ gcWord dflags }





More information about the ghc-commits mailing list