X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FX86%2FRegInfo.hs;h=21b594e38faced9ae85dd1d266a7a395369a646b;hb=81ca050634c59d6b9a42a6bdc8224902f20ec542;hp=3c84641c220ce4f7d23862e06c46c17fb96c1376;hpb=2d498de3fd7a8f60621c601e419fe7cb14788b1c;p=ghc-hetmet.git diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index 3c84641..21b594e 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -23,12 +23,11 @@ import X86.Regs mkVirtualReg :: Unique -> Size -> VirtualReg mkVirtualReg u size - | not (isFloatSize size) = VirtualRegI u - | otherwise = case size of - FF32 -> VirtualRegD u - FF64 -> VirtualRegD u - _ -> panic "mkVirtualReg" + FF32 -> VirtualRegSSE u + FF64 -> VirtualRegSSE u + FF80 -> VirtualRegD u + _other -> VirtualRegI u -- reg colors for x86 @@ -44,15 +43,8 @@ regColors $ [ (eax, "#00ff00") , (ebx, "#0000ff") , (ecx, "#00ffff") - , (edx, "#0080ff") - - , (fake0, "#ff00ff") - , (fake1, "#ff00aa") - , (fake2, "#aa00ff") - , (fake3, "#aa00aa") - , (fake4, "#ff0055") - , (fake5, "#5500ff") ] - + , (edx, "#0080ff") ] + ++ fpRegColors -- reg colors for x86_64 #elif x86_64_TARGET_ARCH @@ -76,9 +68,21 @@ regColors , (r13, "#004080") , (r14, "#004040") , (r15, "#002080") ] - - ++ zip (map RealReg [16..31]) (repeat "red") + ++ fpRegColors #else regDotColor :: Reg -> SDoc regDotColor = panic "not defined" #endif + +#if i386_TARGET_ARCH || x86_64_TARGET_ARCH +fpRegColors :: [(Reg,String)] +fpRegColors = + [ (fake0, "#ff00ff") + , (fake1, "#ff00aa") + , (fake2, "#aa00ff") + , (fake3, "#aa00aa") + , (fake4, "#ff0055") + , (fake5, "#5500ff") ] + + ++ zip (map regSingle [24..39]) (repeat "red") +#endif