9 #include "nativeGen/NCG.h"
10 #include "HsVersions.h"
23 mkVirtualReg :: Unique -> Size -> VirtualReg
26 FF32 -> VirtualRegSSE u
27 FF64 -> VirtualRegSSE u
29 _other -> VirtualRegI u
31 regDotColor :: RealReg -> SDoc
33 = let Just str = lookupUFM regColors reg
36 regColors :: UniqFM [Char]
37 regColors = listToUFM (normalRegColors ++ fpRegColors)
39 -- TODO: We shouldn't be using defaultTargetPlatform here.
40 -- We should be passing DynFlags in instead, and looking at
41 -- its targetPlatform.
43 normalRegColors :: [(Reg,String)]
44 normalRegColors = case platformArch defaultTargetPlatform of
45 ArchX86 -> [ (eax, "#00ff00")
49 ArchX86_64 -> [ (rax, "#00ff00"), (eax, "#00ff00")
50 , (rbx, "#0000ff"), (ebx, "#0000ff")
51 , (rcx, "#00ffff"), (ecx, "#00ffff")
52 , (rdx, "#0080ff"), (edx, "#00ffff")
61 ArchPPC -> panic "X86 normalRegColors ArchPPC"
62 ArchPPC_64 -> panic "X86 normalRegColors ArchPPC_64"
63 ArchSPARC -> panic "X86 normalRegColors ArchSPARC"
64 ArchUnknown -> panic "X86 normalRegColors ArchUnknown"
66 fpRegColors :: [(Reg,String)]
73 , (fake5, "#5500ff") ]
75 ++ zip (map regSingle [24..39]) (repeat "red")