X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FnativeGen%2FPprMach.hs;h=55e3930786dc161c3b2a253bdde2c011f8a7dfce;hp=199fd364989cca38318e6cf7b06d42944964d36a;hb=232e72122fa7f08690e3be2bb9f8a7f8024e37d5;hpb=0df5099f0c2088e2ccbb5b8974a7eae4d77eaa1c diff --git a/compiler/nativeGen/PprMach.hs b/compiler/nativeGen/PprMach.hs index 199fd36..55e3930 100644 --- a/compiler/nativeGen/PprMach.hs +++ b/compiler/nativeGen/PprMach.hs @@ -21,15 +21,16 @@ module PprMach ( pprNatCmmTop, pprBasicBlock, pprSectionHeader, pprData, - pprInstr, pprSize, pprUserReg + pprInstr, pprSize, pprUserReg, pprImm ) where #include "HsVersions.h" import BlockId import Cmm -import MachRegs -- may differ per-platform -import MachInstrs +import Regs -- may differ per-platform +import Instrs +import Regs import CLabel ( CLabel, pprCLabel, externallyVisibleCLabel, labelDynamic, mkAsmTempLabel, entryLblToInfoLbl ) @@ -402,11 +403,14 @@ pprSize x = ptext (case x of FF32 -> sLit "" FF64 -> sLit "d" ) + +-- suffix to store/ ST instruction pprStSize :: Size -> Doc pprStSize x = ptext (case x of II8 -> sLit "b" II16 -> sLit "h" II32 -> sLit "" + II64 -> sLit "x" FF32 -> sLit "" FF64 -> sLit "d" #endif @@ -689,7 +693,7 @@ pprData :: CmmStatic -> Doc pprData (CmmAlign bytes) = pprAlign bytes pprData (CmmDataLabel lbl) = pprLabel lbl pprData (CmmString str) = pprASCII str -pprData (CmmUninitialised bytes) = ptext (sLit ".space ") <> int bytes +pprData (CmmUninitialised bytes) = ptext (sLit ".skip ") <> int bytes pprData (CmmStaticLit lit) = pprDataItem lit pprGloblDecl :: CLabel -> Doc @@ -2083,6 +2087,7 @@ pprInstr (FxTOy size1 size2 reg1 reg2) ptext (case size2 of II32 -> sLit "i\t" + II64 -> sLit "x\t" FF32 -> sLit "s\t" FF64 -> sLit "d\t"), pprReg reg1, comma, pprReg reg2 @@ -2106,6 +2111,7 @@ pprInstr (BF cond b (BlockId id)) ] pprInstr (JMP addr) = (<>) (ptext (sLit "\tjmp\t")) (pprAddr addr) +pprInstr (JMP_TBL op ids) = pprInstr (JMP op) pprInstr (CALL (Left imm) n _) = hcat [ ptext (sLit "\tcall\t"), pprImm imm, comma, int n ]