Ignore:
Timestamp:
Dec 6, 2011, 5:04:13 PM (8 years ago)
Author:
tranquil
Message:
  • turned to argument-less return statements for RTLabs and RTL (there was a hidden invariant, for which the arguments of return statements where equal to the f_result field of the function definition: they were useless and an optimization was breaking the compilation)
  • corrected a bug in liveness analysis I had introduced
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Deliverables/D2.2/8051/src/ERTL/ERTLInterpret.ml

    r1572 r1589  
    436436
    437437let compute_result st ret_regs =
    438   let vs = List.map (fun r -> get_arg r st) ret_regs in
     438  let vs = List.map (fun r -> get_reg (Hdw r) st) ret_regs in
    439439  let f res v = res && (Val.is_int v) in
    440440  let is_int vs = (List.length vs > 0) && (List.fold_left f true vs) in
     
    452452  if debug then print_state lbls_offs st ;
    453453  match fetch_stmt lbls_offs st with
    454     | ERTL.St_return ret_regs when Val.eq_address (get_ra st) st.exit ->
    455       print_and_return_result (compute_result st ret_regs, List.rev st.trace)
     454    | ERTL.St_return when Val.eq_address (get_ra st) st.exit ->
     455      print_and_return_result (compute_result st I8051.rets, List.rev st.trace)
    456456    | stmt ->
    457457      let st' = interpret_stmt lbls_offs st stmt in
Note: See TracChangeset for help on using the changeset viewer.