Skip to content
Snippets Groups Projects
Commit b7b61f60 authored by Julian Seward's avatar Julian Seward
Browse files

[project @ 2000-01-17 10:48:08 by sewardj]

Print a couple of blank lines in final assembly output in between basic
blocks, to make it easier to match up with the output of -ddump-stix.
parent d1e36a2f
No related merge requests found
......@@ -8,6 +8,7 @@ module AsmCodeGen ( nativeCodeGen ) where
#include "HsVersions.h"
import IO ( Handle )
import List ( intersperse )
import MachMisc
import MachRegs
......@@ -104,9 +105,10 @@ codeGen :: [[StixTree]] -> UniqSM SDoc
codeGen stixFinal
= mapUs genMachCode stixFinal `thenUs` \ dynamic_codes ->
let
static_instrs = scheduleMachCode dynamic_codes
static_instrss = scheduleMachCode dynamic_codes
docs = map (vcat . map pprInstr) static_instrss
in
returnUs (vcat (map pprInstr static_instrs))
returnUs (vcat (intersperse (char ' ' $$ char ' ') docs))
\end{code}
Top level code generator for a chunk of stix code:
......@@ -124,10 +126,10 @@ exposed via the OrdList, but more might occur, so further analysis
might be needed.
\begin{code}
scheduleMachCode :: [InstrList] -> [Instr]
scheduleMachCode :: [InstrList] -> [[Instr]]
scheduleMachCode
= concat . map (runRegAllocate freeRegsState reservedRegs)
= map (runRegAllocate freeRegsState reservedRegs)
where
freeRegsState = mkMRegsState (extractMappedRegNos freeRegs)
\end{code}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment