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/LIN/LINInterpret.ml

    r1542 r1568  
    9696  else error ("Unknown hardware register " ^ (I8051.print_register r) ^ ".")
    9797
     98let get_arg a st = match a with
     99  | LTL.Imm i -> Val.of_int i
     100  | LTL.Reg r -> get_reg r st
     101
    98102let push st v =
    99103  let mem = Mem.store st.mem chunk st.isp v in
     
    262266
    263267    | LIN.St_op2 (op2, srcr) ->
    264       let (v, carry) =
    265         Eval.op2 st.carry op2
    266           (get_reg I8051.a st)
    267           (get_reg srcr st) in
     268      let (v, carry) = 
     269        Eval.op2 st.carry op2
     270          (get_reg I8051.a st)
     271          (get_arg srcr st) in
    268272      let st = change_carry st carry in
    269273      let st = add_reg I8051.a v st in
Note: See TracChangeset for help on using the changeset viewer.