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/alpha/emit/alphaAsm.sml
ViewVC logotype

Diff of /sml/trunk/src/MLRISC/alpha/emit/alphaAsm.sml

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

revision 1002, Fri Nov 30 17:11:33 2001 UTC revision 1003, Fri Dec 7 02:45:32 2001 UTC
# Line 278  Line 278 
278       | asm_osf_user_palcode (I.WRUNIQUE) = "wrunique"       | asm_osf_user_palcode (I.WRUNIQUE) = "wrunique"
279     and emit_osf_user_palcode x = emit (asm_osf_user_palcode x)     and emit_osf_user_palcode x = emit (asm_osf_user_palcode x)
280    
281  (*#line 483.7 "alpha/alpha.mdl"*)  (*#line 482.7 "alpha/alpha.mdl"*)
282     fun isZero (I.LABop le) = (MLTreeEval.valueOf le) = 0     fun isZero (I.LABop le) = (MLTreeEval.valueOf le) = 0
283       | isZero _ = false       | isZero _ = false
284     fun emitInstr' instr =     fun emitInstr' instr =
285         (case instr of         (case instr of
286           I.DEFFREG FP =>           I.LDA{r, b, d} => (if ((isZero d) andalso (CellsBasis.sameCell (r,
          ( emit "/* deffreg\t";  
            emitCell FP;  
            emit " */" )  
        | I.LDA{r, b, d} => (if ((isZero d) andalso (CellsBasis.sameCell (r,  
287              b)))              b)))
288              then ()              then ()
289              else              else
# Line 399  Line 395 
395             emit_label lab )             emit_label lab )
396         | I.OPERATE{oper, ra, rb, rc} =>         | I.OPERATE{oper, ra, rb, rc} =>
397           let           let
398  (*#line 578.15 "alpha/alpha.mdl"*)  (*#line 571.15 "alpha/alpha.mdl"*)
399               fun disp () =               fun disp () =
400                   ( emit_operate oper;                   ( emit_operate oper;
401                     emit "\t";                     emit "\t";
# Line 482  Line 478 
478         | I.CALL_PAL{code, def, use} =>         | I.CALL_PAL{code, def, use} =>
479           ( emit "call_pal ";           ( emit "call_pal ";
480             emit_osf_user_palcode code )             emit_osf_user_palcode code )
        | I.ANNOTATION{i, a} =>  
          ( comment (Annotations.toString a);  
            nl ();  
            emitInstr i )  
481         | I.SOURCE{} => emit "source"         | I.SOURCE{} => emit "source"
482         | I.SINK{} => emit "sink"         | I.SINK{} => emit "sink"
483         | I.PHI{} => emit "phi"         | I.PHI{} => emit "phi"
484         )         )
485            and emitInstr i = (tab(); emitInstr' i; nl())        in  tab(); emitInstr' instr; nl()
486            and emitInstrIndented i = (indent(); emitInstr' i; nl())        end (* emitter *)
487          and emitInstrIndented i = (indent(); emitInstr i; nl())
488            and emitInstrs instrs =            and emitInstrs instrs =
489             app (if !indent_copies then emitInstrIndented             app (if !indent_copies then emitInstrIndented
490                  else emitInstr) instrs                  else emitInstr) instrs
491        in  emitInstr instr end  
492          and emitInstr(I.ANNOTATION{i,a}) =
493               ( comment(Annotations.toString a);
494                  nl();
495                  emitInstr i )
496            | emitInstr(I.LIVE{regs, spilled})  =
497                comment("live= " ^ CellsBasis.CellSet.toString regs ^
498                        "spilled= " ^ CellsBasis.CellSet.toString spilled)
499            | emitInstr(I.KILL{regs, spilled})  =
500                comment("killed:: " ^ CellsBasis.CellSet.toString regs ^
501                        "spilled:: " ^ CellsBasis.CellSet.toString spilled)
502            | emitInstr(I.INSTR i) = emitter i
503            | emitInstr _ = error "emitInstr"
504    
505     in  S.STREAM{beginCluster=init,     in  S.STREAM{beginCluster=init,
506                  pseudoOp=pseudoOp,                  pseudoOp=pseudoOp,
507                  emit=emitter,                  emit=emitInstr,
508                  endCluster=fail,                  endCluster=fail,
509                  defineLabel=defineLabel,                  defineLabel=defineLabel,
510                  entryLabel=entryLabel,                  entryLabel=entryLabel,

Legend:
Removed from v.1002  
changed lines
  Added in v.1003

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