diff options
author | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-02-14 18:52:00 +0000 |
---|---|---|
committer | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-09-22 22:33:59 -0400 |
commit | e074c1c23307649bd2d240d40a73d3829b06a4b4 (patch) | |
tree | 487320573dcd2c2b7f9a239b80ff67d6191f8032 /compiler/codeGen/StgCmmArgRep.hs | |
parent | 9d47e583e14923745380445ee52b16e69e926ebe (diff) | |
download | haskell-e074c1c23307649bd2d240d40a73d3829b06a4b4.tar.gz |
Add support for 256-bit-wide vectors.
Diffstat (limited to 'compiler/codeGen/StgCmmArgRep.hs')
-rw-r--r-- | compiler/codeGen/StgCmmArgRep.hs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/codeGen/StgCmmArgRep.hs b/compiler/codeGen/StgCmmArgRep.hs index bd228d4617..26569cffdd 100644 --- a/compiler/codeGen/StgCmmArgRep.hs +++ b/compiler/codeGen/StgCmmArgRep.hs @@ -47,6 +47,7 @@ data ArgRep = P -- GC Ptr | F -- Float | D -- Double | V16 -- 16-byte (128-bit) vectors of Float/Double/Int8/Word32/etc. + | V32 -- 32-byte (256-bit) vectors of Float/Double/Int8/Word32/etc. instance Outputable ArgRep where ppr = text . argRepString argRepString :: ArgRep -> String @@ -57,6 +58,7 @@ argRepString V = "V" argRepString F = "F" argRepString D = "D" argRepString V16 = "V16" +argRepString V32 = "V32" toArgRep :: PrimRep -> ArgRep toArgRep VoidRep = V @@ -68,9 +70,10 @@ toArgRep Int64Rep = L toArgRep Word64Rep = L toArgRep FloatRep = F toArgRep DoubleRep = D -toArgRep (VecRep len elem) - | len*primElemRepSizeB elem == 16 = V16 - | otherwise = error "toArgRep: bad vector primrep" +toArgRep (VecRep len elem) = case len*primElemRepSizeB elem of + 16 -> V16 + 32 -> V32 + _ -> error "toArgRep: bad vector primrep" isNonV :: ArgRep -> Bool isNonV V = False @@ -84,6 +87,7 @@ argRepSizeW dflags L = wORD64_SIZE `quot` wORD_SIZE dflags argRepSizeW dflags D = dOUBLE_SIZE dflags `quot` wORD_SIZE dflags argRepSizeW _ V = 0 argRepSizeW dflags V16 = 16 `quot` wORD_SIZE dflags +argRepSizeW dflags V32 = 32 `quot` wORD_SIZE dflags idArgRep :: Id -> ArgRep idArgRep = toArgRep . idPrimRep @@ -132,4 +136,5 @@ slowCallPattern (F: _) = (fsLit "stg_ap_f", 1) slowCallPattern (D: _) = (fsLit "stg_ap_d", 1) slowCallPattern (L: _) = (fsLit "stg_ap_l", 1) slowCallPattern (V16: _) = (fsLit "stg_ap_v16", 1) +slowCallPattern (V32: _) = (fsLit "stg_ap_v32", 1) slowCallPattern [] = (fsLit "stg_ap_0", 0) |