diff options
author | Ian Lynagh <igloo@earth.li> | 2011-07-15 19:06:04 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-07-15 19:11:34 +0100 |
commit | ec7b75121e09d4dc996fdba61efebff1a79536cb (patch) | |
tree | b707d7473fd84ea1419d3232d1ca86ac46b19c66 /compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs | |
parent | 730301c60e6ccd9ed4fb248bcd2399f938a43d25 (diff) | |
download | haskell-ec7b75121e09d4dc996fdba61efebff1a79536cb.tar.gz |
Remove more defaultTargetPlatform uses
Diffstat (limited to 'compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs')
-rw-r--r-- | compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs index 07cfc0f825..5a413d341e 100644 --- a/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs +++ b/compiler/nativeGen/RegAlloc/Linear/FreeRegs.hs @@ -58,12 +58,9 @@ instance FR SPARC.FreeRegs where frInitFreeRegs = SPARC.initFreeRegs frReleaseReg = SPARC.releaseReg --- TODO: We shouldn't be using defaultTargetPlatform here. --- We should be passing DynFlags in instead, and looking at --- its targetPlatform. - -maxSpillSlots :: Int -maxSpillSlots = case platformArch defaultTargetPlatform of +maxSpillSlots :: Platform -> Int +maxSpillSlots platform + = case platformArch platform of ArchX86 -> X86.Instr.maxSpillSlots ArchX86_64 -> X86.Instr.maxSpillSlots ArchPPC -> PPC.Instr.maxSpillSlots |