Ignore:
Timestamp:
Nov 1, 2011, 6:31:24 PM (9 years ago)
Author:
tranquil
Message:
  • corrected a bug
  • implemented copy propagation
  • enhanced constant propagation with some algebraic equalities
  • temporarily added immediates to RTLabs, to be seen if it is useful
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051-indexed-labels-branch/src/RTLabs/RTLabsPrinter.ml

    r1473 r1477  
    9595        (print_reg r)
    9696
     97let print_arg = function
     98        | RTLabs.Reg r -> print_reg r
     99        | RTLabs.Imm (c, t) ->
     100                Printf.sprintf "(%s)%s" (Primitive.print_type t) (print_cst c)
     101
    97102let print_op2 op r s = Printf.sprintf "%s %s %s"
    98   (print_reg r)
     103  (print_arg r)
    99104  (match op with
    100105  | AST.Op_add -> "+"
     
    117122  | AST.Op_cmpp cmp -> (print_cmp cmp) ^ "p"
    118123  | AST.Op_cmpu cmp -> (print_cmp cmp) ^ "u")
    119         (print_reg s)
     124        (print_arg s)
    120125
    121126
     
    166171  (print_reg destr)
    167172        (Memory.string_of_quantity q)
    168         (print_reg addr)
     173        (print_arg addr)
    169174        lbl
    170175  | RTLabs.St_store (q, addr, srcr, lbl) ->
    171176      Printf.sprintf "*(%s)%s := %s --> %s"
    172177  (Memory.string_of_quantity q)
    173         (print_reg addr)
    174         (print_reg srcr)
     178        (print_arg addr)
     179        (print_arg srcr)
    175180        lbl
    176181  | RTLabs.St_call_id (f, args, Some r, sg, lbl) ->
Note: See TracChangeset for help on using the changeset viewer.