Ignore:
Timestamp:
Mar 2, 2011, 11:06:58 PM (9 years ago)
Author:
ayache
Message:

Bug fixs and signed division hack in D2.2.

File:
1 edited

Legend:

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

    r619 r624  
    422422    | ERTL.St_cost (cost_label, next_lbl) ->
    423423      let graph = Label.Map.add lbl (ERTL.St_skip next_lbl) def.ERTL.f_graph in
    424       (cost_label, { def with ERTL.f_graph = graph })
     424      (Some cost_label, { def with ERTL.f_graph = graph })
    425425    | ERTL.St_skip lbl | ERTL.St_comment (_, lbl) | ERTL.St_get_hdw (_, _, lbl)
    426426    | ERTL.St_set_hdw (_, _, lbl) | ERTL.St_hdw_to_hdw (_, _, lbl)
     
    435435      aux lbl
    436436    | ERTL.St_condacc _ | ERTL.St_return _ ->
    437       (* Should be impossible: the first cost label is found after some linear
    438          instructions. *)
    439       assert false in
     437      (* No cost label found (no labelling performed). Indeed, the first cost
     438         label must after some linear instructions. *)
     439      (None, def) in
    440440  aux def.ERTL.f_entry
    441441
    442442let move_first_cost_label_up_internal def =
    443443  let (cost_label, def) = find_and_remove_first_cost_label def in
    444   generate (ERTL.St_cost (cost_label, def.ERTL.f_entry)) def
     444  match cost_label with
     445    | None -> def
     446    | Some cost_label ->
     447      generate (ERTL.St_cost (cost_label, def.ERTL.f_entry)) def
    445448
    446449let move_first_cost_label_up (id, def) =
Note: See TracChangeset for help on using the changeset viewer.