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 )
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
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
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
]
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 ]