X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FPprMach.hs;h=1e6f45847d94be50b0de0a2abcb7ba230709dc7e;hb=1353826e5159c9a5a81e75e0b7459271f27c08ea;hp=199fd364989cca38318e6cf7b06d42944964d36a;hpb=0df5099f0c2088e2ccbb5b8974a7eae4d77eaa1c;p=ghc-hetmet.git diff --git a/compiler/nativeGen/PprMach.hs b/compiler/nativeGen/PprMach.hs index 199fd36..1e6f458 100644 --- a/compiler/nativeGen/PprMach.hs +++ b/compiler/nativeGen/PprMach.hs @@ -21,15 +21,15 @@ 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 CLabel ( CLabel, pprCLabel, externallyVisibleCLabel, labelDynamic, mkAsmTempLabel, entryLblToInfoLbl ) @@ -402,11 +402,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 +692,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 +2086,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 +2110,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 ]