Ignore:
Timestamp:
Nov 25, 2011, 7:43:39 PM (8 years ago)
Author:
tranquil
Message:
  • Immediates introduced (but not fully used yet in RTLabs to RTL pass)
  • translation streamlined
  • BUGGY: interpretation fails in LTL, trying to fetch a function with incorrect address
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/RTL/RTLPrinter.ml

    r1542 r1568  
    1616
    1717let print_reg = Register.print
     18
     19let print_arg = function
     20  | RTL.Reg r -> print_reg r
     21  | RTL.Imm i -> string_of_int i
    1822
    1923let reg_set_to_list rs =
     
    4448  | RTL.St_cost (cost_lbl, lbl) ->
    4549    let cost_lbl = CostLabel.string_of_cost_label ~pretty:true cost_lbl in
    46     Printf.sprintf "emit %s --> %s" cost_lbl lbl
     50    Printf.sprintf "_emit %s --> %s" cost_lbl lbl
    4751  | RTL.St_ind_0 (i, lbl) ->
    48     Printf.sprintf "index %d --> %s" i lbl
     52    Printf.sprintf "_index %d --> %s" i lbl
    4953  | RTL.St_ind_inc (i, lbl) ->
    50     Printf.sprintf "increment %d --> %s" i lbl
     54    Printf.sprintf "_increment %d --> %s" i lbl
    5155  | RTL.St_addr (dstr1, dstr2, id, lbl) ->
    52     Printf.sprintf "imm (%s, %s), %s --> %s"
     56    Printf.sprintf "move (%s, %s), %s --> %s"
    5357      (print_reg dstr1) (print_reg dstr2) id lbl
    5458  | RTL.St_stackaddr (dstr1, dstr2, lbl) ->
    55     Printf.sprintf "imm (%s, %s), STACK --> %s"
     59    Printf.sprintf "move (%s, %s), STACK --> %s"
    5660      (print_reg dstr1) (print_reg dstr2) lbl
    57   | RTL.St_int (dstr, i, lbl) ->
    58     Printf.sprintf "imm %s, %d --> %s" (print_reg dstr) i lbl
     61  (* | RTL.St_int (dstr, i, lbl) -> *)
     62  (*   Printf.sprintf "imm %s, %d --> %s" (print_reg dstr) i lbl *)
    5963  | RTL.St_move (dstr, srcr, lbl) ->
    6064    Printf.sprintf "move %s, %s --> %s"
    61       (print_reg dstr) (print_reg srcr) lbl
     65      (print_reg dstr) (print_arg srcr) lbl
    6266  | RTL.St_opaccs (opaccs, dstr1, dstr2, srcr1, srcr2, lbl) ->
    6367    Printf.sprintf "%s (%s, %s) %s, %s --> %s"
     
    7680      (print_reg dstr)
    7781      (print_reg srcr1)
    78       (print_reg srcr2)
     82      (print_arg srcr2)
    7983      lbl
    8084  | RTL.St_clear_carry lbl ->
Note: See TracChangeset for help on using the changeset viewer.