Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/trunk/src/MLRISC/hppa/emit/hppaAsm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/hppa/emit/hppaAsm.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 593, Tue Apr 4 07:26:33 2000 UTC revision 594, Tue Apr 4 23:41:47 2000 UTC
# Line 19  Line 19 
19    
20     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"
21     val show_region  = MLRiscControl.getFlag "asm-show-region"     val show_region  = MLRiscControl.getFlag "asm-show-region"
22       val indent_copies = MLRiscControl.getFlag "asm-indent-copies"
23    
24     fun error msg = MLRiscErrorMsg.error("HppaAsmEmitter",msg)     fun error msg = MLRiscErrorMsg.error("HppaAsmEmitter",msg)
25    
# Line 32  Line 33 
33         fun emit s = (tabbing(!tabs); tabs := 0; newline := false; emit' s)         fun emit s = (tabbing(!tabs); tabs := 0; newline := false; emit' s)
34         fun nl() = (tabs := 0; if !newline then () else (newline := true; emit' "\n"))         fun nl() = (tabs := 0; if !newline then () else (newline := true; emit' "\n"))
35         fun comma() = emit ","         fun comma() = emit ","
36         fun tab() = tabs := !tabs + 1         fun tab() = tabs := 1
37           fun indent() = tabs := 2
38         fun ms n = let val s = Int.toString n         fun ms n = let val s = Int.toString n
39                    in  if n<0 then "-"^String.substring(s,1,size s-1)                    in  if n<0 then "-"^String.substring(s,1,size s-1)
40                        else s                        else s
# Line 270  Line 272 
272  (*#line 633.7 "hppa/hppa.md"*)  (*#line 633.7 "hppa/hppa.md"*)
273     fun emit_nop false = ()     fun emit_nop false = ()
274       | emit_nop true = emit "\n\tnop"       | emit_nop true = emit "\n\tnop"
275     fun emitInstr instr =     fun emitInstr' instr =
        ( tab ();  
   
276         (         (
277          case instr of          case instr of
278          I.LOADI{li, r, i, t, mem} =>          I.LOADI{li, r, i, t, mem} =>
# Line 587  Line 587 
587        | I.ANNOTATION{i, a} =>        | I.ANNOTATION{i, a} =>
588          ( emitInstr i;          ( emitInstr i;
589          comment (Annotations.toString a))          comment (Annotations.toString a))
590         );         )
591         nl ())            and emitInstr i = (tab(); emitInstr' i; nl())
592            and emitInstrs [] = ()            and emitInstrIndented i = (indent(); emitInstr' i; nl())
593              | emitInstrs (i::is) =            and emitInstrs instrs =
594             (emitInstr i; app (fn i => (tab(); emitInstr i)) is)             app (if !indent_copies then emitInstrIndented
595                    else emitInstr) instrs
596        in  emitInstr end        in  emitInstr end
597    
598     in  S.STREAM{beginCluster=init,     in  S.STREAM{beginCluster=init,

Legend:
Removed from v.593  
changed lines
  Added in v.594

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0