summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Mainland <gmainlan@microsoft.com>2012-10-19 09:09:23 +0100
committerGeoffrey Mainland <gmainlan@microsoft.com>2013-02-01 22:00:24 +0000
commit4906460ad21ca2e90c0e2d9d50368fdc13c71bf2 (patch)
tree40a468b7fd390f5bbd2ec52ebaa457b6c3fb6a65
parent515ba6f18b6ed8ac9167588b8c6099ef85d5e517 (diff)
downloadhaskell-4906460ad21ca2e90c0e2d9d50368fdc13c71bf2.tar.gz
Add a bits128 type to C--.
-rw-r--r--compiler/cmm/CmmLex.x3
-rw-r--r--compiler/cmm/CmmParse.y2
2 files changed, 5 insertions, 0 deletions
diff --git a/compiler/cmm/CmmLex.x b/compiler/cmm/CmmLex.x
index 718eb27c82..81227eb05f 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 edeeebb9db..cb3bf0c829 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 }