summaryrefslogtreecommitdiff
path: root/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-10 12:45:34 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-10 12:45:34 +0100
commitc85539630eef593061ac223c18d248355f78a921 (patch)
treecd21284a268aae09a01a9aa08a0b55031561d1e5 /compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
parent0ee44def597152e6b25ac6647041542a6b1ee6b4 (diff)
downloadhaskell-c85539630eef593061ac223c18d248355f78a921.tar.gz
Remove some CPP
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs')
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs13
1 files changed, 10 insertions, 3 deletions
diff --git a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
index 887af1758a..4a5af75ce8 100644
--- a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs
@@ -33,9 +33,10 @@ import Platform
-- getFreeRegs cls f = filter ( (==cls) . regClass . RealReg ) f
-- allocateReg f r = filter (/= r) f
-import qualified RegAlloc.Linear.PPC.FreeRegs as PPC
-import qualified RegAlloc.Linear.SPARC.FreeRegs as SPARC
-import qualified RegAlloc.Linear.X86.FreeRegs as X86
+import qualified RegAlloc.Linear.PPC.FreeRegs as PPC
+import qualified RegAlloc.Linear.SPARC.FreeRegs as SPARC
+import qualified RegAlloc.Linear.X86.FreeRegs as X86
+import qualified RegAlloc.Linear.X86_64.FreeRegs as X86_64
import qualified PPC.Instr
import qualified SPARC.Instr
@@ -53,6 +54,12 @@ instance FR X86.FreeRegs where
frInitFreeRegs = X86.initFreeRegs
frReleaseReg = \_ -> X86.releaseReg
+instance FR X86_64.FreeRegs where
+ frAllocateReg = \_ -> X86_64.allocateReg
+ frGetFreeRegs = X86_64.getFreeRegs
+ frInitFreeRegs = X86_64.initFreeRegs
+ frReleaseReg = \_ -> X86_64.releaseReg
+
instance FR PPC.FreeRegs where
frAllocateReg = \_ -> PPC.allocateReg
frGetFreeRegs = \_ -> PPC.getFreeRegs