diff options
author | Abhiroop Sarkar <asiamgenius@gmail.com> | 2018-09-27 15:28:46 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-07-01 17:02:29 -0400 |
commit | ff823a08f897e770efda4e89c43618dc6e30bb65 (patch) | |
tree | f26a80bcb060c8439d2daf8cefc9cb367bb3b388 /compiler/nativeGen/RegClass.hs | |
parent | bd660edeb783a74e5ca3f1f82713b2aeedae19dc (diff) | |
download | haskell-wip/simd.tar.gz |
Add support for SIMD operations in the NCGwip/simd
This adds support for constructing vector types from Float#, Double# etc
and performing arithmetic operations on them
Cleaned-Up-By: Ben Gamari <ben@well-typed.com>
Diffstat (limited to 'compiler/nativeGen/RegClass.hs')
-rw-r--r-- | compiler/nativeGen/RegClass.hs | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/compiler/nativeGen/RegClass.hs b/compiler/nativeGen/RegClass.hs index fbbb786817..d73a3409ac 100644 --- a/compiler/nativeGen/RegClass.hs +++ b/compiler/nativeGen/RegClass.hs @@ -1,15 +1,14 @@ -- | An architecture independent description of a register's class. module RegClass - ( RegClass (..) ) - -where + ( RegClass(..) + , allRegClasses + ) where import GhcPrelude import Outputable import Unique - -- | The class of a register. -- Used in the register allocator. -- We treat all registers in a class as being interchangable. @@ -18,7 +17,11 @@ data RegClass = RcInteger | RcFloat | RcDouble - deriving Eq + deriving (Eq, Show) + +allRegClasses :: [RegClass] +allRegClasses = + [ RcInteger, RcFloat, RcDouble ] instance Uniquable RegClass where @@ -27,6 +30,6 @@ instance Uniquable RegClass where getUnique RcDouble = mkRegClassUnique 2 instance Outputable RegClass where - ppr RcInteger = Outputable.text "I" - ppr RcFloat = Outputable.text "F" - ppr RcDouble = Outputable.text "D" + ppr RcInteger = Outputable.text "I" + ppr RcFloat = Outputable.text "F" + ppr RcDouble = Outputable.text "D" |