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/ERTL/ERTLPrinter.ml

    r1542 r1568  
    3737let print_result rl = print_reg_list "[" "]" " ; " Register.print rl
    3838
     39let print_arg = function
     40  | RTL.Imm i -> string_of_int i
     41  | RTL.Reg r -> Register.print r
    3942
    4043let print_statement = function
     
    5457  | ERTL.St_set_hdw (r1, r2, lbl) ->
    5558    Printf.sprintf "move %s, %s --> %s"
    56       (I8051.print_register r1) (Register.print r2) lbl
     59      (I8051.print_register r1) (print_arg r2) lbl
    5760  | ERTL.St_hdw_to_hdw (r1, r2, lbl) ->
    5861    Printf.sprintf "move %s, %s --> %s"
     
    7275  | ERTL.St_addrL (dstr, id, lbl) ->
    7376    Printf.sprintf "addrL %s, %s --> %s" (Register.print dstr) id lbl
    74   | ERTL.St_int (dstr, i, lbl) ->
    75     Printf.sprintf "imm %s, %d --> %s" (Register.print dstr) i lbl
     77  (* | ERTL.St_int (dstr, i, lbl) -> *)
     78  (*   Printf.sprintf "imm %s, %d --> %s" (Register.print dstr) i lbl *)
    7679  | ERTL.St_move (dstr, srcr, lbl) ->
    7780    Printf.sprintf "move %s, %s --> %s"
    78       (Register.print dstr) (Register.print srcr) lbl
     81      (Register.print dstr) (print_arg srcr) lbl
    7982  | ERTL.St_opaccsA (opaccs, dstr, srcr1, srcr2, lbl) ->
    8083    Printf.sprintf "%sA %s, %s, %s --> %s"
     
    102105      (Register.print dstr)
    103106      (Register.print srcr1)
    104       (Register.print srcr2)
     107      (print_arg srcr2)
    105108      lbl
    106109  | ERTL.St_clear_carry lbl ->
Note: See TracChangeset for help on using the changeset viewer.