diff options
author | Gabor Greif <ggreif@gmail.com> | 2014-08-08 18:01:19 +0200 |
---|---|---|
committer | Gabor Greif <ggreif@gmail.com> | 2014-08-08 18:01:19 +0200 |
commit | 5f003d228340c3ce8e500f9053f353c58dc1dc94 (patch) | |
tree | a855b0f173ff635b48354e1136ef6cbb2a1214a4 /compiler/nativeGen/RegClass.hs | |
parent | ff9c5570395bcacf8963149b3a8475f5644ce694 (diff) | |
parent | dff0623d5ab13222c06b3ff6b32793e05b417970 (diff) | |
download | haskell-wip/generics-propeq.tar.gz |
Merge branch 'master' into wip/generics-propeqwip/generics-propeq
Conflicts:
compiler/typecheck/TcGenGenerics.lhs
Diffstat (limited to 'compiler/nativeGen/RegClass.hs')
-rw-r--r-- | compiler/nativeGen/RegClass.hs | 48 |
1 files changed, 20 insertions, 28 deletions
diff --git a/compiler/nativeGen/RegClass.hs b/compiler/nativeGen/RegClass.hs index cac4e64221..0c793173cb 100644 --- a/compiler/nativeGen/RegClass.hs +++ b/compiler/nativeGen/RegClass.hs @@ -1,41 +1,33 @@ -{-# 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 - - -- | An architecture independent description of a register's class. -module RegClass - ( RegClass (..) ) +module RegClass + ( RegClass (..) ) where -import Outputable -import Unique +import Outputable +import Unique --- | The class of a register. --- Used in the register allocator. --- We treat all registers in a class as being interchangable. +-- | The class of a register. +-- Used in the register allocator. +-- We treat all registers in a class as being interchangable. -- -data RegClass - = RcInteger - | RcFloat - | RcDouble - | RcDoubleSSE -- x86 only: the SSE regs are a separate class - deriving Eq +data RegClass + = RcInteger + | RcFloat + | RcDouble + | RcDoubleSSE -- x86 only: the SSE regs are a separate class + deriving Eq instance Uniquable RegClass where - getUnique RcInteger = mkRegClassUnique 0 - getUnique RcFloat = mkRegClassUnique 1 - getUnique RcDouble = mkRegClassUnique 2 + getUnique RcInteger = mkRegClassUnique 0 + getUnique RcFloat = mkRegClassUnique 1 + getUnique RcDouble = mkRegClassUnique 2 getUnique RcDoubleSSE = mkRegClassUnique 3 instance Outputable RegClass where - ppr RcInteger = Outputable.text "I" - ppr RcFloat = Outputable.text "F" - ppr RcDouble = Outputable.text "D" - ppr RcDoubleSSE = Outputable.text "S" + ppr RcInteger = Outputable.text "I" + ppr RcFloat = Outputable.text "F" + ppr RcDouble = Outputable.text "D" + ppr RcDoubleSSE = Outputable.text "S" |