Ignore:
Timestamp:
Dec 2, 2011, 3:13:04 PM (8 years ago)
Author:
tranquil
Message:
  • new form of translation written in graphUtilites (mainly as a test before implementation in Matita)
  • rewritten multiplication in RTLasbToRTL
File:
1 edited

Legend:

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

    r1572 r1584  
    1919
    2020let change_label lbl = function
    21   | ERTL.St_skip _ -> ERTL.St_skip lbl
    22   | ERTL.St_comment (s, _) -> ERTL.St_comment (s, lbl)
    23   | ERTL.St_cost (cost_lbl, _) -> ERTL.St_cost (cost_lbl, lbl)
    24   | ERTL.St_ind_0 (i, _) -> ERTL.St_ind_0 (i, lbl)
    25   | ERTL.St_ind_inc (i, _) -> ERTL.St_ind_inc (i, lbl)
    26   | ERTL.St_get_hdw (r1, r2, _) -> ERTL.St_get_hdw (r1, r2, lbl)
    27   | ERTL.St_set_hdw (r1, r2, _) -> ERTL.St_set_hdw (r1, r2, lbl)
    28   | ERTL.St_hdw_to_hdw (r1, r2, _) -> ERTL.St_hdw_to_hdw (r1, r2, lbl)
    29   | ERTL.St_newframe _ -> ERTL.St_newframe lbl
    30   | ERTL.St_delframe _ -> ERTL.St_delframe lbl
    31   | ERTL.St_framesize (r, _) -> ERTL.St_framesize (r, lbl)
    32   | ERTL.St_pop (r, _) -> ERTL.St_pop (r, lbl)
    33   | ERTL.St_push (r, _) -> ERTL.St_push (r, lbl)
    34   | ERTL.St_addrH (r, id, _) -> ERTL.St_addrH (r, id, lbl)
    35   | ERTL.St_addrL (r, id, _) -> ERTL.St_addrL (r, id, lbl)
    36   | ERTL.St_move (r1, a, _) -> ERTL.St_move (r1, a, lbl)
    37   | ERTL.St_opaccsA (opaccs, dstr, srcr1, srcr2, _) ->
    38     ERTL.St_opaccsA (opaccs, dstr, srcr1, srcr2, lbl)
    39   | ERTL.St_opaccsB (opaccs, dstr, srcr1, srcr2, _) ->
    40     ERTL.St_opaccsB (opaccs, dstr, srcr1, srcr2, lbl)
    41   | ERTL.St_op1 (op1, dstr, srcr, _) -> ERTL.St_op1 (op1, dstr, srcr, lbl)
    42   | ERTL.St_op2 (op2, dstr, srcr1, srcr2, _) ->
    43     ERTL.St_op2 (op2, dstr, srcr1, srcr2, lbl)
    44   | ERTL.St_clear_carry _ -> ERTL.St_clear_carry lbl
    45   | ERTL.St_set_carry _ -> ERTL.St_set_carry lbl
    46   | ERTL.St_load (dstrs, addr1, addr2, _) ->
    47     ERTL.St_load (dstrs, addr1, addr2, lbl)
    48   | ERTL.St_store (addr1, addr2, srcrs, _) ->
    49     ERTL.St_store (addr1, addr2, srcrs, lbl)
    50   | ERTL.St_call_id (f, nb_args, _) -> ERTL.St_call_id (f, nb_args, lbl)
    51   | ERTL.St_call_ptr (f1, f2, nb_args, _) ->
    52     ERTL.St_call_ptr (f1, f2, nb_args, lbl)
    5321  | ERTL.St_cond _ as inst -> inst
    5422  | ERTL.St_return _ as inst -> inst
     23  | stmt -> ERTLGraph.fill_succs stmt [lbl]
    5524
    5625(* Add a list of instruction in a graph, from one label to another, by creating
Note: See TracChangeset for help on using the changeset viewer.