X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FX86%2FPpr.hs;h=f26e2e6c0868cf8eb8822385848709a47821e89f;hb=62db6241c578f2b02e266b4dd0b535e0f59950bf;hp=0ca230b0a32de36b202ac6349eb81d43f814b542;hpb=d9e0cfba383d8bbff5f5b7428a683cfdfb7b95b9;p=ghc-hetmet.git diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs index 0ca230b..f26e2e6 100644 --- a/compiler/nativeGen/X86/Ppr.hs +++ b/compiler/nativeGen/X86/Ppr.hs @@ -35,6 +35,7 @@ import PprBase import BlockId import Cmm import CLabel +import Config import Unique ( pprUnique ) import Pretty import FastString @@ -42,6 +43,7 @@ import qualified Outputable import Outputable (panic, Outputable) import Data.Word +import Distribution.System #if i386_TARGET_ARCH && darwin_TARGET_OS import Data.Bits @@ -161,15 +163,11 @@ instance Outputable Instr where ppr instr = Outputable.docToSDoc $ pprInstr instr -#if i386_TARGET_ARCH || x86_64_TARGET_ARCH pprUserReg :: Reg -> Doc -pprUserReg = pprReg IF_ARCH_i386(II32,) IF_ARCH_x86_64(II64,) - -#else -pprUserReg :: Reg -> Doc -pprUserReg = panic "X86.Ppr.pprUserReg: not defined" - -#endif +pprUserReg + | cTargetArch == I386 = pprReg II32 + | cTargetArch == X86_64 = pprReg II64 + | otherwise = panic "X86.Ppr.pprUserReg: not defined" pprReg :: Size -> Reg -> Doc