X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FX86%2FRegInfo.hs;h=eb8e82c82f0fdd7c1c4c49b287d870fa95425409;hb=335b9f366ac440259318777c4c07e4fa42fbbec6;hp=f47859e399ba587d24b24eb4241b79fb5f4b176f;hpb=9d9eef1f78e25c716e2c0c7559005b730f425231;p=ghc-hetmet.git diff --git a/compiler/nativeGen/X86/RegInfo.hs b/compiler/nativeGen/X86/RegInfo.hs index f47859e..eb8e82c 100644 --- a/compiler/nativeGen/X86/RegInfo.hs +++ b/compiler/nativeGen/X86/RegInfo.hs @@ -9,7 +9,6 @@ where #include "nativeGen/NCG.h" #include "HsVersions.h" -import X86.Regs import Size import Reg @@ -18,17 +17,17 @@ import Unique #if i386_TARGET_ARCH || x86_64_TARGET_ARCH import UniqFM +import X86.Regs #endif 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,19 @@ regColors , (r13, "#004080") , (r14, "#004040") , (r15, "#002080") ] - - ++ zip (map RealReg [16..31]) (repeat "red") + ++ fpRegColors #else regDotColor :: Reg -> SDoc regDotColor = panic "not defined" #endif + +fpRegColors :: [(Reg,String)] +fpRegColors = + [ (fake0, "#ff00ff") + , (fake1, "#ff00aa") + , (fake2, "#aa00ff") + , (fake3, "#aa00aa") + , (fake4, "#ff0055") + , (fake5, "#5500ff") ] + + ++ zip (map regSingle [24..39]) (repeat "red")