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

Diff of /sml/branches/SMLNJ/src/MLRISC/alpha/emit/alphaAsm.sml

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

revision 468, Wed Nov 10 22:42:52 1999 UTC revision 469, Wed Nov 10 22:42:52 1999 UTC
# Line 43  Line 43 
43         fun entryLabel lab = defineLabel lab         fun entryLabel lab = defineLabel lab
44         fun comment msg = emit("\t/* " ^ msg ^ " */")         fun comment msg = emit("\t/* " ^ msg ^ " */")
45         fun annotation a = (comment(Annotations.toString a); nl())         fun annotation a = (comment(Annotations.toString a); nl())
        fun blockName b = (comment(S.B.toString b); nl())  
46         fun emit_region mem = comment(I.Region.toString mem)         fun emit_region mem = comment(I.Region.toString mem)
47         fun pseudoOp pOp = emit(P.toString pOp)         fun pseudoOp pOp = emit(P.toString pOp)
48         fun init size = (comment("Code Size = " ^ ms size); nl())         fun init size = (comment("Code Size = " ^ ms size); nl())
# Line 254  Line 253 
253       | asm_fcmove (I.FCMOVENE) = "fcmovene"       | asm_fcmove (I.FCMOVENE) = "fcmovene"
254     and emit_fcmove x = (emit (asm_fcmove x))     and emit_fcmove x = (emit (asm_fcmove x))
255    
256       fun isZero (I.CONSTop c) = ((Constant.valueOf c) = 0)
257         | isZero _ = false
258    
259     fun emitInstr instr =     fun emitInstr instr =
260         ((tab ());         ((tab ());
261    
# Line 263  Line 265 
265          ((emit "/* deffreg\t");          ((emit "/* deffreg\t");
266          (emit_FP FP);          (emit_FP FP);
267          (emit " */"))          (emit " */"))
268        | I.LDA{r, b, d} =>        | I.LDA{r, b, d} => (if (isZero d)andalso (r = b)
269               then ()
270               else
271          ((emit "lda\t");          ((emit "lda\t");
272          (emit_GP r);          (emit_GP r);
273          (emit ", ");          (emit ", ");
# Line 273  Line 277 
277             else             else
278             ((emit "(");             ((emit "(");
279             (emit_GP b);             (emit_GP b);
280             (emit ")"))))                (emit ")")))))
281        | I.LDAH{r, b, d} =>        | I.LDAH{r, b, d} =>
282          ((emit "ldah\t");          ((emit "ldah\t");
283          (emit_GP r);          (emit_GP r);
# Line 358  Line 362 
362          (emit_label label))          (emit_label label))
363        | I.OPERATE{oper, ra, rb, rc} => let        | I.OPERATE{oper, ra, rb, rc} => let
364    
365  (*#line 306.1 "alpha/alpha.md"*)  (*#line 313.1 "alpha/alpha.md"*)
366    
367             fun f (oper, ra, rb, rc) =             fun f (oper, ra, rb, rc) =
368                 ((emit oper);                 ((emit oper);
# Line 468  Line 472 
472                  entryLabel=entryLabel,                  entryLabel=entryLabel,
473                  comment=comment,                  comment=comment,
474                  exitBlock=doNothing,                  exitBlock=doNothing,
                 blockName=blockName,  
475                  annotation=annotation,                  annotation=annotation,
476                  phi=doNothing,                  phi=doNothing,
477                  alias=doNothing                  alias=doNothing

Legend:
Removed from v.468  
changed lines
  Added in v.469

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