diff options
author | Ian Lynagh <igloo@earth.li> | 2011-10-19 21:49:26 +0100 |
---|---|---|
committer | Ian Lynagh <igloo@earth.li> | 2011-10-19 21:49:26 +0100 |
commit | bc876206b80f060ad1bbbaa681d1171d1980cdfc (patch) | |
tree | 32f4bf6615260cf5ce940468474ae0520859cd58 /compiler/nativeGen/X86/RegInfo.hs | |
parent | 7dd60dddc194cd2f32d3685f396e8d09fcb2ce42 (diff) | |
download | haskell-bc876206b80f060ad1bbbaa681d1171d1980cdfc.tar.gz |
A little more CPP removal
Diffstat (limited to 'compiler/nativeGen/X86/RegInfo.hs')
-rw-r--r-- | compiler/nativeGen/X86/RegInfo.hs | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 36b749ffda..7f094f80e4 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -38,28 +38,22 @@ regColors platform = listToUFM (normalRegColors platform ++ fpRegColors) normalRegColors :: Platform -> [(Reg,String)] normalRegColors platform - = case platformArch platform of - ArchX86 -> [ (eax, "#00ff00") - , (ebx, "#0000ff") - , (ecx, "#00ffff") - , (edx, "#0080ff") ] - ArchX86_64 -> [ (rax, "#00ff00"), (eax, "#00ff00") - , (rbx, "#0000ff"), (ebx, "#0000ff") - , (rcx, "#00ffff"), (ecx, "#00ffff") - , (rdx, "#0080ff"), (edx, "#00ffff") - , (r8, "#00ff80") - , (r9, "#008080") - , (r10, "#0040ff") - , (r11, "#00ff40") - , (r12, "#008040") - , (r13, "#004080") - , (r14, "#004040") - , (r15, "#002080") ] - ArchPPC -> panic "X86 normalRegColors ArchPPC" - ArchPPC_64 -> panic "X86 normalRegColors ArchPPC_64" - ArchSPARC -> panic "X86 normalRegColors ArchSPARC" - ArchARM _ _ -> panic "X86 normalRegColors ArchARM" - ArchUnknown -> panic "X86 normalRegColors ArchUnknown" + | target32Bit platform = [ (eax, "#00ff00") + , (ebx, "#0000ff") + , (ecx, "#00ffff") + , (edx, "#0080ff") ] + | otherwise = [ (rax, "#00ff00"), (eax, "#00ff00") + , (rbx, "#0000ff"), (ebx, "#0000ff") + , (rcx, "#00ffff"), (ecx, "#00ffff") + , (rdx, "#0080ff"), (edx, "#00ffff") + , (r8, "#00ff80") + , (r9, "#008080") + , (r10, "#0040ff") + , (r11, "#00ff40") + , (r12, "#008040") + , (r13, "#004080") + , (r14, "#004040") + , (r15, "#002080") ] fpRegColors :: [(Reg,String)] fpRegColors = |