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/sparc/emit/sparcAsm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/sparc/emit/sparcAsm.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 22  Line 22 
22    
23     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"     val show_cellset = MLRiscControl.getFlag "asm-show-cellset"
24     val show_region  = MLRiscControl.getFlag "asm-show-region"     val show_region  = MLRiscControl.getFlag "asm-show-region"
25       val indent_copies = MLRiscControl.getFlag "asm-indent-copies"
26    
27     fun error msg = MLRiscErrorMsg.error("SparcAsmEmitter",msg)     fun error msg = MLRiscErrorMsg.error("SparcAsmEmitter",msg)
28    
# Line 35  Line 36 
36         fun emit s = (tabbing(!tabs); tabs := 0; newline := false; emit' s)         fun emit s = (tabbing(!tabs); tabs := 0; newline := false; emit' s)
37         fun nl() = (tabs := 0; if !newline then () else (newline := true; emit' "\n"))         fun nl() = (tabs := 0; if !newline then () else (newline := true; emit' "\n"))
38         fun comma() = emit ","         fun comma() = emit ","
39         fun tab() = tabs := !tabs + 1         fun tab() = tabs := 1
40           fun indent() = tabs := 2
41         fun ms n = let val s = Int.toString n         fun ms n = let val s = Int.toString n
42                    in  if n<0 then "-"^String.substring(s,1,size s-1)                    in  if n<0 then "-"^String.substring(s,1,size s-1)
43                        else s                        else s
# Line 279  Line 281 
281  (*#line 479.7 "sparc/sparc.md"*)  (*#line 479.7 "sparc/sparc.md"*)
282     fun emit_cc false = ()     fun emit_cc false = ()
283       | emit_cc true = emit "cc"       | emit_cc true = emit "cc"
284     fun emitInstr instr =     fun emitInstr' instr =
        ( tab ();  
   
285         (         (
286          case instr of          case instr of
287          I.LOAD{l, d, r, i, mem} =>          I.LOAD{l, d, r, i, mem} =>
# Line 566  Line 566 
566        | I.ANNOTATION{i, a} =>        | I.ANNOTATION{i, a} =>
567          ( emitInstr i;          ( emitInstr i;
568          comment (Annotations.toString a))          comment (Annotations.toString a))
569         );         )
570         nl ())            and emitInstr i = (tab(); emitInstr' i; nl())
571            and emitInstrs [] = ()            and emitInstrIndented i = (indent(); emitInstr' i; nl())
572              | emitInstrs (i::is) =            and emitInstrs instrs =
573             (emitInstr i; app (fn i => (tab(); emitInstr i)) is)             app (if !indent_copies then emitInstrIndented
574                    else emitInstr) instrs
575        in  emitInstr end        in  emitInstr end
576    
577     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